<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div><span>Hi Eric,</span></div><div><br><span></span></div><div><span>Thank you for your reply. After doing some research, it seems the host(not the guest) needs to request the memory. I'm not short on memory so I guess that is why I did not see any balloon activity.</span></div><div><span><br></span></div><div><span> I also read(off of IBM) where it can cause the guest to run out of cache and increase block I/O activity which makes no sense to me- sense the balloon only expands and takes of memory in the guest that is not used. </span></div><div><br></div><div><br></div><div>-dman</div><div><br></div><div><br></div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><font face="Arial" size="2"><hr size="1"><b><span
 style="font-weight:bold;">From:</span></b> Eric Blake <eblake@redhat.com><br><b><span style="font-weight: bold;">To:</span></b> d hee <coolio@ymail.com><br><b><span style="font-weight: bold;">Cc:</span></b> "libvirt-users@redhat.com" <libvirt-users@redhat.com><br><b><span style="font-weight: bold;">Sent:</span></b> Monday, October 17, 2011 12:43 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [libvirt-users] Virtio Balloon- Can not see the results<br></font><br>
On 10/13/2011 12:00 AM, d hee wrote:<br>> with kvm and virtio- would -m 1024 take proceedence over -balloon<br>> virtio? when i use both together, i see memory stay around 1024 MB less on my host side. I know the guest is not taking but a fraction of that ram, so I would expect the virtio balloon to take the majority of the guests ram and hand it back to the host. this is using the free util/command to take snapshots of the host memory.<br><br>Some helpful reading:<br><a href="https://rwmj.wordpress.com/2010/07/17/virtio-balloon/" target="_blank">https://rwmj.wordpress.com/2010/07/17/virtio-balloon/</a><br>http://publib.boulder.ibm.com/infocenter/lnxinfo/v3r0m0/index.jsp?topic=%2Fliaat%2Fliaatbpballooning.htm<br><br>Remember that libvirt defaults to using both -m (maximum memory) and a virtio balloon (using -device virtio-balloon-pci, rather than -balloon, but the concept is the same).  As far as I know, there is _no way_ with current qemu to
 start a guest with less than maximum memory; rather, you are forced to start with maximum then rely on balloon to reduce the usage back down.  And this, unfortunately, requires guest cooperation. If the guest doesn't know how to use the virtio balloon driver, then you are stuck - the guest uses the maximum memory.  That said, from the host side, memory usage is still under normal host memory management rules, even if ballooning doesn't work, where the host can swap out pages that have not yet been touched by the guest, so that not all of the memory attributed to the guest is actually tying up host pages.<br><br>There's certainly room for improvement here, but it has to start with qemu improvements.<br><br>-- Eric Blake   <a ymailto="mailto:eblake@redhat.com" href="mailto:eblake@redhat.com">eblake@redhat.com</a>    +1-801-349-2682<br>Libvirt virtualization library http://libvirt.org<br><br><br></div></div></div></body></html>