Bug 747010
Summary: | ksmtuned uses "vsz" instead of "rsz" when calculating qemu-kvm mem usage ( KSM turn on too early ) | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Attila Darazs <adarazs> | ||||
Component: | qemu-kvm | Assignee: | Justin M. Forbes <jforbes> | ||||
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 6.2 | CC: | acathrow, areis, danken, iheim, juzhang, michen, minovotn, mkenneth, oramraz, shuang, shu, tburke, virt-bugs, virt-maint, ykaul | ||||
Target Milestone: | rc | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | qemu-kvm-0.12.1.2-2.240.el6 | Doc Type: | Bug Fix | ||||
Doc Text: |
Cause:
Incorrect value has been used to calculate qemu-kvm memory usage (and turn on KSM).
Consequence:
KSM (Kernel Samepage Merging) turned on too early.
Fix:
Use real memory size instead of virtual memory size for calculating qemu-kvm memory usage.
Result:
Turning on KSM is more optimized
|
Story Points: | --- | ||||
Clone Of: | Environment: | ||||||
Last Closed: | 2012-06-20 11:35:14 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Attila Darazs
2011-10-18 15:06:27 UTC
Created attachment 567690 [details]
Upstream patch for this
This patch has been upstream for quite some time and should fix the issue.
Verified on qemu-kvm-0.12.1.2-2.248.el6.x86_64: 1. edit /etc/ksmtuned.conf # uncomment the following if you want ksmtuned debug info LOGFILE=/var/log/ksmtuned DEBUG=1 2. #service ksmtuned restart 3. check "committed memory" at /var/log/ksmtuned Test suggest that, on a 8G host, boot guest of 4G, ksm is activated until the 8th guest boot up. However, i find a little flaw: Thu Mar 15 23:37:44 CST 2012: total 7379492 Thu Mar 15 23:37:44 CST 2012: sleep 22 Thu Mar 15 23:37:44 CST 2012: thres 1475898 ... Thu Mar 15 23:47:45 CST 2012: 7005790 > 7379492, start ksm Thu Mar 15 23:47:45 CST 2012: 1467916 < 1475898, boost Thu Mar 15 23:47:45 CST 2012: KSMCTL start 300 22 here "7005790 > 7379492", ksm is activated when: [ $[committed + thres] -lt $total -a $free -gt $thres ] is false But after use rsz instead of vsz, free < thres will always happen before committed + thres > total, for there are other processes taking memory, this won't affect ksm functioning, just log confuses people, worth fixing? Since qemu-kvm 262 removes kvm-ksmtuned-should-use-rsz-instead-of-vsz.patch from rpm spec file, move this back to assigned. (In reply to comment #12) > Since qemu-kvm 262 removes kvm-ksmtuned-should-use-rsz-instead-of-vsz.patch > from rpm spec file, move this back to assigned. The patch is for the SPEC file and it has been applied manually so moving back to ON_QA. Nothing changed but the patch file is no longer here because it's not necessary to have it here. Michal Ok, then only the log problem, if it's not important, i am willing to verify this bug. Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Cause: Incorrect value has been used to start ksmtuned. Consequence: KSM (Kernel Samepage Merging) turned on too early. Fix: Use real memory size instead of virtual memory size for calculating qemu-kvm memory usage. Result: Turning on KSM is more optimized Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1,5 +1,5 @@ Cause: -Incorrect value has been used to start ksmtuned. +Incorrect value has been used to calculate qemu-kvm memory usage (and turn on KSM). Consequence: KSM (Kernel Samepage Merging) turned on too early. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2012-0746.html |