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.
Bug 626958 - enable virtio balloon stats
Summary: enable virtio balloon stats
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm
Version: 7.0
Hardware: All
OS: Linux
high
medium
Target Milestone: rc
: ---
Assignee: Luiz Capitulino
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 639534 696098 (view as bug list)
Depends On: 623903
Blocks: 580953 639534 684953 756082 782183 810856
TreeView+ depends on / blocked
 
Reported: 2010-08-24 18:22 UTC by Dor Laor
Modified: 2018-11-28 21:56 UTC (History)
24 users (show)

Fixed In Version: 1.4.0
Doc Type: Bug Fix
Doc Text:
Clone Of: 623903
Environment:
Last Closed: 2014-06-13 11:49:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 988448 1 None None None 2021-01-20 06:05:38 UTC

Internal Links: 988448

Comment 1 Luiz Capitulino 2010-09-08 17:48:08 UTC
Clearing Devel Whiteboard, as it contains information from the cloned bug.

Comment 6 Amit Shah 2011-05-30 10:33:58 UTC
*** Bug 696098 has been marked as a duplicate of this bug. ***

Comment 7 IBM Bug Proxy 2011-08-26 13:10:31 UTC
------- Comment From vahegde1.ibm.com 2011-08-26 09:09 EDT-------
Hi Red Hat ,

Verified with libvirt-0.9.4-0rc1.2.el6.x86_64.rpm which is available in RHN and this issue got fixed.

Will this be included in RHEL6.2 ? can you please confirm

Thanks
Vasant

Comment 8 Luiz Capitulino 2011-08-26 17:48:44 UTC
Vasant,

What issue are you referring to? Bug 623903 has been fixed for a long time now, but the stats feature still doesn't work as far as I know.

Comment 9 IBM Bug Proxy 2011-08-29 13:30:38 UTC
------- Comment From vahegde1.ibm.com 2011-08-29 09:24 EDT-------
HI Luiz  / Red Hat,
(In reply to comment #15)
> Vasant,
>
> What issue are you referring to? Bug 623903 has been fixed for a long time now,
> but the stats feature still doesn't work as far as I know.

Sorry for the confusion.
You are right. I can just see actual memory with memstat command, not complete stats.

----------------------------------------------------
virsh # dommemstat 1
actual 2097152
----------------------------------------------------

Thanks
Vasant

Comment 12 Luiz Capitulino 2011-12-09 18:23:30 UTC
*** Bug 623096 has been marked as a duplicate of this bug. ***

Comment 13 Luiz Capitulino 2011-12-09 18:31:02 UTC
*** Bug 639534 has been marked as a duplicate of this bug. ***

Comment 14 IBM Bug Proxy 2011-12-10 01:12:25 UTC
------- Comment From pradeepkumars.com 2011-12-09 20:05 EDT-------
Hello Redhat

Any updates on this?

Comment 15 Luiz Capitulino 2011-12-10 01:34:09 UTC
This is currently stalled upstream. We'll have to add a new QMP command for this, the most important question is whether the command will have to be asynchronous or not.

If it can be a synchronous command, then it could be added now. Otherwise, this will have to wait for the full QAPI support upstream (which will probably bring asynchronous command support). In that case this is RHEL7.0 material.

Comment 16 Luiz Capitulino 2012-01-19 16:57:32 UTC
I'm reviving this one and submitted an RFC series today:

http://lists.gnu.org/archive/html/qemu-devel/2012-01/msg02478.html

The approach I'm taking with that series is to have a QMP command that sends a request to the guest and then when the guest responds the statistics is sent to the client by means of an QMP event.

Let's see what upstream thinks about it.

Comment 19 Luiz Capitulino 2012-02-17 19:27:49 UTC
Anthony suggested making this a device property of virtio-balloon under QOM:

http://lists.gnu.org/archive/html/qemu-devel/2012-02/msg02390.html

The first implication is that this won't make it for 6.3, a second and more importantly implication is that QOM is likely to be 7.0 material (meaning that this feature won't be available in RHEL6).

If anyone has any objections, please say.

PS: We'll have to wait until 6.4 to know whether or not we'll have QOM for it.

Comment 23 IBM Bug Proxy 2012-05-24 04:30:55 UTC
------- Comment From pradeepkumars.com 2012-05-24 04:23 EDT-------
virsh dommemstat works fine in RHEL 6.3

------- Comment From pradeepkumars.com 2012-05-24 04:25 EDT-------
on 6.3 (2.6.32-270.el6.x86_64),

virsh # dommemstat rhel63-64-2
actual 8092456
rss 7702496

virsh #

Comment 25 Daniel Berrangé 2012-05-24 19:15:18 UTC
(In reply to comment #23)
> virsh dommemstat works fine in RHEL 6.3
> on 6.3 (2.6.32-270.el6.x86_64),
> 
> virsh # dommemstat rhel63-64-2
> actual 8092456
> rss 7702496

The 'dommemstat' command can retrieve data from a number of sources, some of these are host based, others are guest based. The 'actual' and 'rss' fields are both host sourced memory stats.   The swap-in, swap-out, major-fault, minor-fault, available stats are all guest sourced via virtio-balloon.

So, yes 'dommemstat' returns data in 6.3, but this is *not* the stuff we need from virtio-balloon stats.

Comment 26 Luiz Capitulino 2012-05-24 19:18:38 UTC
(In reply to comment #25)
> (In reply to comment #23)
> > virsh dommemstat works fine in RHEL 6.3
> > on 6.3 (2.6.32-270.el6.x86_64),
> > 
> > virsh # dommemstat rhel63-64-2
> > actual 8092456
> > rss 7702496
> 
> The 'dommemstat' command can retrieve data from a number of sources, some of
> these are host based, others are guest based. The 'actual' and 'rss' fields
> are both host sourced memory stats.   The swap-in, swap-out, major-fault,
> minor-fault, available stats are all guest sourced via virtio-balloon.

Thanks for clarifying, Daniel.

> So, yes 'dommemstat' returns data in 6.3, but this is *not* the stuff we
> need from virtio-balloon stats.

Absolutely, the fact that dommemstat returns that doesn't mean we should close this bz.

This is still on my queue and should resume my work on this soon.

Comment 27 Ademar Reis 2012-07-19 23:00:55 UTC
(In reply to comment #25)
> (In reply to comment #23)
> > virsh dommemstat works fine in RHEL 6.3
> > on 6.3 (2.6.32-270.el6.x86_64),
> > 
> > virsh # dommemstat rhel63-64-2
> > actual 8092456
> > rss 7702496
> 
> The 'dommemstat' command can retrieve data from a number of sources, some of
> these are host based, others are guest based. The 'actual' and 'rss' fields
> are both host sourced memory stats.   The swap-in, swap-out, major-fault,
> minor-fault, available stats are all guest sourced via virtio-balloon.
> 
> So, yes 'dommemstat' returns data in 6.3, but this is *not* the stuff we
> need from virtio-balloon stats.

Looks like that's a source of confusion. If we don't fix the balloon stats in 6.4, we should at least document dommemstat better, to make users aware of this limitation.

Comment 28 Bhavna Sarathy 2012-07-23 17:36:12 UTC
The virtio balloon stats is disabled both upstream and in RHEL. It has always been disabled in RHEL, and so this bug is not a regression. Our plan is to implement this using QOM (qemu object model), which is currently in the works upstream.  We do not have plans to backport QOM infrastructure into RHEL6 stream as it is very intrusive, and has not stabilized upstream at.  

The title of this bug is "re-enable virtio balloon stats", but this was never enabled in RHEL6.  Adding a major feature in KVM will follow the normal upstream development and Virtualization roadmap intersections.  However, we can address any bugs that are relevant to the RHEL6.4 stream.

I recommend moving this feature request to RHEL7.

Comment 29 Luiz Capitulino 2012-07-23 20:01:35 UTC
Rename bug to 'enable virtio balloon stats', as it has never been enabled in production to be 're-enabled'.

Comment 30 IBM Bug Proxy 2012-08-27 05:10:26 UTC
------- Comment From onmahaja.com 2012-08-27 05:05 EDT-------
verified this on upstream setup - this still doesn't show up virtio balloon stats. Waiting until RHEL6.4 stream to check if resolution is available for this.

-- Onkar

Comment 31 Luiz Capitulino 2012-08-27 13:11:07 UTC
This hasn't being fixed upstream yet and is being targeted for RHEL7.0, which means it won't be available in RHEL6.4 either.

Comment 33 IBM Bug Proxy 2012-12-17 13:50:29 UTC
------- Comment From onmahaja.com 2012-12-17 09:08 EDT-------
Patches for this have been posted upstream -

http://lists.gnu.org/archive/html/qemu-devel/2012-12/msg02188.html

Comment 35 Luiz Capitulino 2013-01-29 12:11:48 UTC
Merged upstream (git log 58513b..045a70). The document docs/virtio-balloon-stats.txt explains how to test this feature:

http://git.qemu.org/?p=qemu.git;a=blob_plain;f=docs/virtio-balloon-stats.txt;hb=HEAD

Comment 39 langfang 2013-04-12 09:41:53 UTC
Test this bug as following version:
Host:
# uname -r
3.9.0-0.rc6.50.el7.x86_64
# rpm -q qemu-kvm
qemu-kvm-1.4.0-2.el7.x86_64

Guest:rhel7
3.9.0-0.rc6.50.el7.x86_64


Steps:
1.Boot guest with balloon device
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7 

2.Tried command 

{"name": "qom-list-types"},{"name": "qom-get"}, {"name": "qom-set"}, {"name": "qom-list"},virsh dommemstat $domain

Attention:

/machine/i440fx/pci.0/child[7],the number [7] is same "addr=0x7 "

Senario 1)
{ "execute": "qom-list", 
             "arguments": { "path": "/machine/i440fx/pci.0/child[7]" } }

--->output data 

{ "execute": "qom-list-types"}--->output data

Senario 2)
*Enables polling in the specified interval (value >0)

{ "execute": "qom-set",
             "arguments": { "path": "/machine/i440fx/pci.0/child[7]",
                         "property": "guest-stats-polling-interval", "value": 2 } }
{"return": {}}

{ "execute": "qom-get",
  "arguments": { "path": "/machine/i440fx/pci.0/child[7]",
  "property": "guest-stats" } }
{"return": {"stats": {"stat-swap-out": 8192, "stat-free-memory": 453890048, "stat-minor-faults": 12087347, "stat-major-faults": 3476, "stat-total-memory": 835887104, "stat-swap-in": 0}, "last-update": 1365758588}}

{ "execute": "qom-get",
  "arguments": { "path": "/machine/i440fx/pci.0/child[7]",
  "property": "guest-stats" } }
{"return": {"stats": {"stat-swap-out": 8192, "stat-free-memory": 452493312, "stat-minor-faults": 12088549, "stat-major-faults": 3476, "stat-total-memory": 835887104, "stat-swap-in": 0}, "last-update": 1365758668}}---> the value changed

Senario 3)
*Disables polling,Previous polled statistics are still valid and can be queried.(Value =0)

{ "execute": "qom-set",
             "arguments": { "path": "/machine/i440fx/pci.0/child[7]",
			 "property": "guest-stats-polling-interval", "value": 0 } }

{ "execute": "qom-get",
  "arguments": { "path": "/machine/i440fx/pci.0/child[7]",
  "property": "guest-stats" } }
{"return": {"stats": {"stat-swap-out": 8192, "stat-free-memory": 452349952, "stat-minor-faults": 12091179, "stat-major-faults": 3476, "stat-total-memory": 835887104, "stat-swap-in": 0}, "last-update": 1365759004}}

{ "execute": "qom-get",
  "arguments": { "path": "/machine/i440fx/pci.0/child[7]",
  "property": "guest-stats" } }
{"return": {"stats": {"stat-swap-out": 8192, "stat-free-memory": 452349952, "stat-minor-faults": 12091179, "stat-major-faults": 3476, "stat-total-memory": 835887104, "stat-swap-in": 0}, "last-update": 1365759004}}-->Values not change any more


Senario 4)
# virsh dommemstat qqqqq
actual 1048576
rss 246112

Comment 40 Jun Li 2013-12-30 08:52:34 UTC
Verify this bug as followings:

Version-Release number of selected component (if applicable):
3.10.0-64.el7.x86_64
qemu-kvm-1.5.3-30.el7.x86_64

==========
*** win8.1-32 guest.
Note:inside guest should execute "blnsrv -i".
Steps:
1.Boot guest with balloon device
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7 

2.Tried command 
{"name": "qom-list-types"},{"name": "qom-get"}, {"name": "qom-set"}, {"name": "qom-list"}

------
Senario 1)
{ "execute": "qom-list", 
             "arguments": { "path": "/machine/peripheral/balloon0" } }

--->output data 

{ "execute": "qom-list-types"}--->output data
--
Senario 2)
*Enables polling in the specified interval (value >0)

{ "execute": "qom-set",
             "arguments": { "path": "/machine/peripheral/balloon0",
                         "property": "guest-stats-polling-interval", "value": 2 } }
--
{ "execute": "qom-get",
  "arguments": { "path": "/machine/peripheral/balloon0",
  "property": "guest-stats" } }
{"return": {"stats": {"stat-swap-out": 0, "stat-free-memory": 2147483647, "stat-minor-faults": 3, "stat-major-faults": 0, "stat-total-memory": 2147483647, "stat-swap-in": 0}, "last-update": 1388392710}}
-----
Senario 3)
*Disables polling,Previous polled statistics are still valid and can be queried.(Value =0)

{ "execute": "qom-set",
             "arguments": { "path": "/machine/peripheral/balloon0",
			 "property": "guest-stats-polling-interval", "value": 0 } }

{ "execute": "qom-get",
  "arguments": { "path": "/machine/peripheral/balloon0",
  "property": "guest-stats" } }
{"return": {"stats": {"stat-swap-out": 0, "stat-free-memory": 2147483647, "stat-minor-faults": 0, "stat-major-faults": 0, "stat-total-memory": 2147483647, "stat-swap-in": 0}, "last-update": 1388392746}}

{ "execute": "qom-get",
  "arguments": { "path": "/machine/peripheral/balloon0",
  "property": "guest-stats" } }
{"return": {"stats": {"stat-swap-out": 0, "stat-free-memory": 2147483647, "stat-minor-faults": 0, "stat-major-faults": 0, "stat-total-memory": 2147483647, "stat-swap-in": 0}, "last-update": 1388392746}}
===========
*** Rhel7.0 guest:
Steps:
1.Boot guest with balloon device
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7 

2.Tried command 
{"name": "qom-list-types"},{"name": "qom-get"}, {"name": "qom-set"}, {"name": "qom-list"}

------
Senario 1)
{ "execute": "qom-list", 
             "arguments": { "path": "/machine/peripheral/balloon0" } }

--->output data 

{ "execute": "qom-list-types"}--->output data
--
Senario 2)
*Enables polling in the specified interval (value >0)

{ "execute": "qom-set",
             "arguments": { "path": "/machine/peripheral/balloon0",
                         "property": "guest-stats-polling-interval", "value": 2 } }

{ "execute": "qom-get",
  "arguments": { "path": "/machine/peripheral/balloon0",
  "property": "guest-stats" } }
{"return": {"stats": {"stat-swap-out": 0, "stat-free-memory": 3470868480, "stat-minor-faults": 1082554, "stat-major-faults": 1389, "stat-total-memory": 4010504192, "stat-swap-in": 0}, "last-update": 1388393334}}
-----
Senario 3)
*Disables polling,Previous polled statistics are still valid and can be queried.(Value =0)

{ "execute": "qom-set",
             "arguments": { "path": "/machine/peripheral/balloon0",
			 "property": "guest-stats-polling-interval", "value": 0 } }

{ "execute": "qom-get",
  "arguments": { "path": "/machine/peripheral/balloon0",
  "property": "guest-stats" } }
{"return": {"stats": {"stat-swap-out": 0, "stat-free-memory": 3465347072, "stat-minor-faults": 1093097, "stat-major-faults": 1418, "stat-total-memory": 4010504192, "stat-swap-in": 0}, "last-update": 1388393358}}
--
{ "execute": "qom-get",
  "arguments": { "path": "/machine/peripheral/balloon0",
  "property": "guest-stats" } }
{"return": {"stats": {"stat-swap-out": 0, "stat-free-memory": 3465347072, "stat-minor-faults": 1093097, "stat-major-faults": 1418, "stat-total-memory": 4010504192, "stat-swap-in": 0}, "last-update": 1388393358}}
================
Based on above test, this bug has been veryfied.

Comment 41 juzhang 2013-12-30 08:58:56 UTC
According to comment39 and comment40, set this issue as verified.

Comment 43 Ludek Smid 2014-06-13 11:49:44 UTC
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.


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