Bug 680190
Summary: | unable to set swap_hard_limit tunable by virsh memtune | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Alex Jia <ajia> |
Component: | libvirt | Assignee: | Jiri Denemark <jdenemar> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 6.1 | CC: | ajia, dyuan, eblake, jdenemar, jyang, llim, treydock, xen-maint, yoyzhang |
Target Milestone: | rc | Keywords: | Documentation |
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-0.8.7-16.el6 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2011-05-19 13:28:13 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: |
Description
Alex Jia
2011-02-24 15:48:54 UTC
Too small value is given for "swap hard limit". virsh # start test Domain test started virsh # memtune test hard_limit : unlimited soft_limit : unlimited swap_hard_limit: unlimited virsh # memtune test --hard-limit 1024000 virsh # memtune test --swap-hard-limit 1023000 error: Unable to change memory parameters error: unable to set swap_hard_limit tunable: Invalid argument virsh # memtune test --swap-hard-limit 1024000 virsh # memtune test --swap-hard-limit 1024001 virsh # memtune test hard_limit : 1024000 kB soft_limit : unlimited swap_hard_limit: 1024004 kB virsh # memtune test --swap-hard-limit 1023999 virsh # memtune test hard_limit : 1024000 kB soft_limit : unlimited swap_hard_limit: 1024000 kB NB, 1024001 is rounded up to 1024004, 1023999 is rounded up to 1024000. I beleive if you set value of "<swap_hard_limit>" smaller than of "<hard_limit>", same error will be raised up. Note that "memsw" means "memory+swap", so, somehow it's NOTABUG, but probly we need doc improvements. upstream 78ba748ef1 fix the document problem. The upstream commit commit 78ba748ef14c520ff1c4af2b5b0a44586ac49c8c Author: Nikunj A. Dadhania <nikunj.ibm.com> Date: Wed Mar 16 10:37:12 2011 +0530 virsh: fix memtune's help message for swap_hard_limit is incomplete and needs a follow-up patch. The follow-up patch has been sent upstream: https://www.redhat.com/archives/libvir-list/2011-March/msg01506.html # virsh memtune rhel6_x86_64_kvm error: Unable to get number of memory parameters error: this function is not supported by the connection driver: qemuDomainGetMemoryParameters Current kvm hypervisor doesn't support the function, Is this a expected result? Additional info: # virsh list Id Name State ---------------------------------- 2 rhel6_x86_64_kvm running # virsh dominfo rhel6_x86_64_kvm Id: 2 Name: rhel6_x86_64_kvm UUID: 82092589-bce2-6e75-ecd4-d0ffa9e36651 OS Type: hvm State: running CPU(s): 1 CPU time: 37.1s Max memory: 524288 kB Used memory: 524288 kB Persistent: yes Autostart: disable Security model: selinux Security DOI: 0 Security label: system_u:system_r:svirt_t:s0:c17,c124 (enforcing) # uname -r 2.6.32-130.el6.x86_64 # rpm -q qemu-kvm qemu-kvm-0.12.1.2-2.153.el6.x86_64 # rpm -q libvirt libvirt-0.8.7-16.el6.x86_64 No, that's not expected. Are you sure you are running the right libvirtd version? virsh memtune works as expected for me with the latest libvirt-0.8.7-17.el6 package. (In reply to comment #8) > No, that's not expected. Are you sure you are running the right libvirtd > version? virsh memtune works as expected for me with the latest > libvirt-0.8.7-17.el6 package. Hi Jiri, I saw 'Fixed In Version: libvirt-0.8.7-16.el6' on the right top, so I used -16 version to verify the bug, please update 'Fixed In Version' for the bug. And will use -17 to verify the bug again. Alex The bug has been verified on rhel6.1 snapshot3(2.6.32-130.el6.x86_64) with libvirt-0.8.7-17.el6.x86_64. # virsh start rhel6_x86_64_kvm Domain rhel6_x86_64_kvm started # virsh memtune rhel6_x86_64_kvm hard_limit : unlimited soft_limit : unlimited swap_hard_limit: unlimited # virsh memtune rhel6_x86_64_kvm --hard-limit 1024000 # virsh memtune rhel6_x86_64_kvm hard_limit : 1024000 kB soft_limit : unlimited swap_hard_limit: unlimited # virsh memtune rhel6_x86_64_kvm --swap-hard-limit 1024000 # virsh memtune rhel6_x86_64_kvm hard_limit : 1024000 kB soft_limit : unlimited swap_hard_limit: 1024000 kB # virsh memtune rhel6_x86_64_kvm --swap-hard-limit 1024001 [root@localhost Libvirt]# virsh memtune rhel6_x86_64_kvm hard_limit : 1024000 kB soft_limit : unlimited swap_hard_limit: 1024004 kB # virsh memtune rhel6_x86_64_kvm --swap-hard-limit 1023999 # virsh memtune rhel6_x86_64_kvm hard_limit : 1024000 kB soft_limit : unlimited swap_hard_limit: 1024000 kB (In reply to comment #9) > (In reply to comment #8) > > No, that's not expected. Are you sure you are running the right libvirtd > > version? virsh memtune works as expected for me with the latest > > libvirt-0.8.7-17.el6 package. > > Hi Jiri, > I saw 'Fixed In Version: libvirt-0.8.7-16.el6' on the right top, so I used -16 > version to verify the bug, please update 'Fixed In Version' for the bug. It should also work with -16 and even older packages. The only thing we fixed for this BZ was documentation of memtune command and that was done in -16 so Fixed In Version is correct. Since you got an error about unsupported qemuDomainGetMemoryParameters API, an ancient libvirtd must have been running. An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-0596.html This still seems to be a problem in 0.8.7-18. The memtune function does not seem supported. # virsh memtune store_0 error: Unable to get number of memory parameters error: this function is not supported by the connection driver: qemuDomainGetMemoryParameters # virsh dominfo store_0 Id: 4 Name: store_0 UUID: 2b4b0dab-4160-d396-34be-10572b478dd6 OS Type: hvm State: running CPU(s): 1 CPU time: 153.4s Max memory: 2048000 kB Used memory: 2048000 kB Persistent: yes Autostart: disable Security model: selinux Security DOI: 0 Security label: system_u:system_r:svirt_t:s0:c194,c863 (enforcing) # uname -r 2.6.32-131.17.1.el6.x86_64 # rpm -q qemu-kvm qemu-kvm-0.12.1.2-2.160.el6_1.8.x86_64 # rpm -q libvirt libvirt-0.8.7-18.el6_1.1.x86_64 |