Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
+++ This bug was initially created as a clone of Bug #1012604 +++
Description of problem:
This time around ksmtuned doesn’t find qemu processes when set_process_name in /etc/libvirt/qemu.conf is NOT changed from the default 0.
This is because qemu was recently changed to incorporate qemu-kvm, and the qemu-kvm program now just exec-s the respective qemu-system-* binary with the right arguments. The process list will therefore show only qemu-system-* processes as representing the VMs.
With ksmtuned looking for processes of either "qemu-kvm" or "qemu:something" (with "something" being the respective VM name, as it happens when set_process_name=1), these qemu-system-* processes will slip through.
Version of selected components:
ksm-1.4.2-9.fc19.x86_64
qemu-system-x86-1.4.2-9.fc19.x86_64
Additional info:
There doesn’t seem to exist a functional specification as to which qemu processes ksmtuned should take into account, i.e. only those started by libvirt or also those started by other means, and by what criteria is should apply to tell them apart.
However, to find qemu-system.* processes in addition to all those that were previously found, the regexp on line 74 of ksmtuned can simply be changed to read ^qemu(-(kvm|system-.+)|:.{1,11})$
--- Additional comment from Cole Robinson on 2013-10-31 16:24:25 EDT ---
Thanks for the suggestion and bug report, moving to POST since there's a fix
--- Additional comment from Fedora Update System on 2013-11-05 20:26:55 EST ---
qemu-1.4.2-13.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/qemu-1.4.2-13.fc19
here's the diff we applied in fedora (fixes another bug as well):
diff --git a/ksmtuned b/ksmtuned
index c96507c..7bc5743 100644
--- a/ksmtuned
+++ b/ksmtuned
@@ -71,10 +71,10 @@ KSMCTL () {
committed_memory () {
# calculate how much memory is committed to running qemu processes
local pidlist
- pidlist=$(pgrep -d ' ' -- '^qemu(-kvm|:.{1,11})$')
+ pidlist=$(pgrep -d ' ' -- '^qemu(-(kvm|system-.+)|:.{1,11})$')
if [ -n "$pidlist" ]; then
ps -p "$pidlist" -o rsz=
- fi | awk '{ sum += $1 }; END { print sum }'
+ fi | awk '{ sum += $1 }; END { print 0+sum }'
}
free_memory () {
Comment 2Miroslav Rezanina
2013-11-18 07:44:16 UTC
This patch is not needed for RHEL 7 as it uses qemu-kvm binary and no qemu-system-* is present.
Comment 3Miroslav Rezanina
2013-11-18 08:09:36 UTC
Reopen and rename. As we have problem with set_process_name=1 and need fix introduce to fedora with bz 955230 (that cause problem fixed with bz 1012604).
Patch:
committed_memory () {
# calculate how much memory is committed to running qemu processes
- local progname
- progname=${1:-qemu-kvm}
- ps -C "$progname" -o rsz | awk '{ sum += $1 }; END { print sum }'
+ local pidlist
+ pidlist=$(pgrep -d ' ' -- '^qemu(-kvm|:.{1,11})$')
+ if [ -n "$pidlist" ]; then
+ ps -p "$pidlist" -o rsz=
+ fi | awk '{ sum += $1 }; END { print sum }'
}
free_memory () {
Comment 4Miroslav Rezanina
2013-11-20 09:28:11 UTC
*** Bug 976336 has been marked as a duplicate of this bug. ***
Verified on qemu-kvm-1.5.3-30.el7.x86_64:
#/usr/sbin/ksmtuned
committed_memory () {
local pidlist
pidlist=$(pgrep -d ' ' -- '^qemu(-kvm|:.{1,11})$')
if [ -n "$pidlist" ]; then
ps -p "$pidlist" -o rsz=
fi | awk '{ sum += $1 }; END { print 0+sum }'
}
Patch applied, just in bug 1027418, there is update:
- fi | awk '{ sum += $1 }; END { print sum }'
+ fi | awk '{ sum += $1 }; END { print 0+sum }'
Verified.
This request was resolved in Red Hat Enterprise Linux 7.0.
Contact your manager or support representative in case you have further questions about the request.