Bug 626958
Summary: | enable virtio balloon stats | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Dor Laor <dlaor> |
Component: | qemu-kvm | Assignee: | Luiz Capitulino <lcapitulino> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | high | ||
Version: | 7.0 | CC: | ajia, areis, bcao, berrange, bsarathy, bugproxy, flang, gcosta, hannsj_uhl, hchiramm, hhuang, juli, juzhang, lcapitulino, lihuang, mkenneth, moshiro, mprivozn, qzhang, syeghiay, tburke, veillard, virt-maint, ypu |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | 1.4.0 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | 623903 | Environment: | |
Last Closed: | 2014-06-13 11:49:44 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: | 623903 | ||
Bug Blocks: | 580953, 639534, 684953, 756082, 782183, 810856 |
Comment 1
Luiz Capitulino
2010-09-08 17:48:08 UTC
*** Bug 696098 has been marked as a duplicate of this bug. *** ------- 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 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 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 *** Bug 623096 has been marked as a duplicate of this bug. *** *** Bug 639534 has been marked as a duplicate of this bug. *** ------- Comment From pradeepkumars.com 2011-12-09 20:05 EDT------- Hello Redhat Any updates on this? 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. 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. 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 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 # (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. (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. (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. 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. Rename bug to 'enable virtio balloon stats', as it has never been enabled in production to be 're-enabled'. ------- 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 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 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 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 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 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. 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. |