Bug 589849
Summary: | [LXC] Changing shutoff guest max memory can effect current memory | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | zhanghaiyan <yoyzhang> |
Component: | libvirt | Assignee: | Jiri Denemark <jdenemar> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | 6.0 | CC: | ajia, berrange, dallan, dyuan, hbrock, llim, mzhan, rwu, xen-maint |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-0.9.9-1.el6 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2012-06-20 06:20:58 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: | |||
Bug Depends On: | |||
Bug Blocks: | 621776 |
Description
zhanghaiyan
2010-05-07 05:20:29 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux major release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Major release. This request is not yet committed for inclusion. FYI upstream has introduced a bunch of new memory tunables into LXC which may interact with this problem http://www.redhat.com/archives/libvir-list/2010-October/msg00208.html This appears to be fixed on current libvirt git (v0.9.7-179-g6b84ee3). Moving to POST. I retest the bug on libvirt-0.9.9-1.el6.x86_64, however, there are some issues still exist: # service cgconfig status Running # virsh -c lxc:/// start toy Domain toy started # virsh -c lxc:/// dominfo toy Id: 24858 Name: toy UUID: d1f4798b-bebf-d93c-1d97-fe1c1cb7c780 OS Type: exe State: running CPU(s): 1 CPU time: 0.0s Max memory: 500000 kB Used memory: 460 kB Persistent: yes Autostart: disable Managed save: unknown Note, Max memory is 500000 kB, and Used memory is 460 kB. # virsh -c lxc:/// setmaxmem toy 600000 # echo $? 0 # virsh -c lxc:/// dominfo toy Id: 24858 Name: toy UUID: d1f4798b-bebf-d93c-1d97-fe1c1cb7c780 OS Type: exe State: running CPU(s): 1 CPU time: 0.0s Max memory: 600000 kB Used memory: 460 kB Persistent: yes Autostart: disable Managed save: unknown Note, as expected, Max memory is 600000 kB. # virsh -c lxc:/// destroy toy Domain toy destroyed # virsh -c lxc:/// setmaxmem toy 800000 # echo $? 0 # virsh -c lxc:/// dominfo toy Id: - Name: toy UUID: d1f4798b-bebf-d93c-1d97-fe1c1cb7c780 OS Type: exe State: shut off CPU(s): 1 Max memory: 800000 kB Used memory: 500000 kB Persistent: yes Autostart: disable Managed save: unknown Note, as expected, Max memory is 800000 kB, but Used memory is 500000 kB, the guest is shut off state, is this a expected result? # virsh -c lxc:/// start toy Domain toy started # virsh -c lxc:/// dominfo toy Id: 24967 Name: toy UUID: d1f4798b-bebf-d93c-1d97-fe1c1cb7c780 OS Type: exe State: running CPU(s): 1 CPU time: 0.0s Max memory: 800000 kB Used memory: 460 kB Persistent: yes Autostart: disable Managed save: unknown Oh, I was finally able to think about this without being confused :-) I believe this is the expected result. I guess you original domain XML had <memory>500000</memory> <currentMemory>500000</currentMemory> Is that right? The "virsh dominfo" command prints "currentMemory" for inactive domains but once the domain is started, "Used memory" is the real memory consumed by the domain. Thus you see 460 kB (and not 500000 kB) when the domain is running. When you destroy the domain, it becomes inactive and dominfo starts printing "currentMemory" for "Used memory" again. "setmaxmem" command only changes the "memory" element leaving "currentMemory" untouched. Move this bug to VERIFIED according to comment 12 and comment 14. 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/RHSA-2012-0748.html |