Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 623096 - qemu need to provide memory information without full balloon statistics
qemu need to provide memory information without full balloon statistics
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.0
All Linux
low Severity high
: beta
: ---
Assigned To: Luiz Capitulino
Virtualization Bugs
: Reopened, RHELNAK
Depends On: 617286
Blocks: 580953
  Show dependency treegraph
 
Reported: 2010-08-11 06:26 EDT by Daniel Veillard
Modified: 2013-01-09 18:00 EST (History)
15 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 617286
Environment:
Last Closed: 2011-12-09 13:29:34 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Comment 2 RHEL Product and Program Management 2010-08-11 06:58:35 EDT
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **
Comment 3 Daniel Veillard 2010-08-11 09:13:28 EDT
Copying comment #16 from original libvirt bug

Okay, I have been able to go into one of those boxes:

[root@intel-XE7450-512-1 ~]# w
 20:47:10 up  9:03,  7 users,  load average: 107.63, 105.43, 105.66
...
[root@intel-XE7450-512-1 ~]# ps auxwww | grep qemu-kvm | wc -l
101

all of those domains are running Windows 2008R2 in core mode and 
under libvirt control

I could reproduce the problem with the help of Guannan Ren

[root@intel-XE7450-512-1 ~]# time virsh list > /tmp/list
real    8m32.513s
user    0m0.153s
sys     0m1.039s

I gdb' attached to the libvirtd daemon and traced into qemudDomainGetInfo
the first call to qemudGetProcessInfo returns immediately, but the
qemuMonitorGetBalloonInfo() call takes a bit of lag.
Then I experimented a bit and noticed the following:

[root@intel-XE7450-512-1 ~]# time virsh dominfo wintest1 > /dev/null

real 0m1.988s
user 0m0.008s
sys 0m0.178s

but ....

[root@intel-XE7450-512-1 ~]# time virsh dominfo wintest99 > /dev/null

real 0m7.129s
user 0m0.012s
sys 0m0.396s
[root@intel-XE7450-512-1 ~]#

  So some VM takes way longuer to answer than others

I gdb attached again on libvirtd and traced again in qemudDomainGetInfo
when called asking for this specific domain info and no surprize gdb
waited for nearly 10 second returning from that step

5213             err = qemuMonitorGetBalloonInfo(priv->mon, &balloon);
(gdb) 

tracing deeper we actually issue the command though JSON interface in
qemuMonitorJSONGetBalloonInfo()

912     virJSONValuePtr cmd = qemuMonitorJSONMakeCommand("query-balloon",
(gdb) 
916     *currmem = 0;
(gdb) 
918     if (!cmd)
(gdb) 
921     ret = qemuMonitorJSONCommand(mon, cmd, &reply);

and that step is taking nearly 10s for this domain
I hadn't a good way to retry this with a domain without balooning
in the immediate but I'm gonna try if possible,

Daniel
Comment 4 Daniel Berrange 2010-08-11 09:52:02 EDT
I believe there are many changes required here

 - A command to query the current balloon level / memory statistics known by QEMU
 - A command to query trigger a refresh of memory statistics from the guest
 - Event notification to client whenever the balloon level or memory statistics change.
Comment 6 Luiz Capitulino 2010-08-18 10:33:36 EDT
IIUC, the original bug doesn't have anything to do with the query-balloon command, which makes this BZ low priority.

Having separate commands makes sense, but I fear that we'll be unable to change the current query-balloon command, as we're probably going to make the current QMP API stable.

I will discuss this issue upstream.
Comment 11 Luiz Capitulino 2011-12-09 13:23:30 EST

*** This bug has been marked as a duplicate of bug 626958 ***
Comment 12 Luiz Capitulino 2011-12-09 13:26:48 EST
oops, this is not a duplicate. Revert.
Comment 13 Luiz Capitulino 2011-12-09 13:29:34 EST
This is already fixed in rhel6 and upstream, the query-balloon command won't return any memory statistics.

For the next chapters on how the statistics will be returned, please see bug 626958.

Note You need to log in before you can comment on or make changes to this bug.