[pve-devel] pve-manager : expose balloon to gui

Alexandre DERUMIER aderumier at odiso.com
Mon Dec 10 00:02:33 CET 2012


>>Are you sure ? because source code seem to get all balloon stats (VIRTIO_BALLOON_S_SWAP_IN,VIRTIO_BALLOON_S_SWAP_OUT,VIRTIO_BALLOON_S_MEMFREE...) 
>>https://github.com/YanVugenfirer/kvm-guest-drivers-windows/blob/master/Balloon/app/memstat.cpp 

>>I'll restest it. 


I have just tested it, using last ballon driver,it's working fine for me. (I check values in perfmon, they are same)
(QEMU) qom-get path=/machine/peripheral/balloon0 property=stats-polling-interval
{u'return': 10}
(QEMU) qom-get path=/machine/peripheral/balloon0 property=stats-last-update
{u'return': 1355091093}
(QEMU) qom-get path=/machine/peripheral/balloon0 property=stat-free-memory
{u'return': 1263800320}
(QEMU) qom-get path=/machine/peripheral/balloon0 property=stat-total-memory
{u'return': 2096644096}
(QEMU) qom-get path=/machine/peripheral/balloon0 property=stat-swap-in
{u'return': 0}
(QEMU) qom-get path=/machine/peripheral/balloon0 property=stat-swap-out
{u'return': 0}
(QEMU) qom-get path=/machine/peripheral/balloon0 property=stat-major-faults
{u'return': 4300}
(QEMU) qom-get path=/machine/peripheral/balloon0 property=stat-minor-faults
{u'return': 19507}


>>(But It can be easily extended to get some other counters,it's just using a wmi query to get perf counters) 

buffer cache size can be retreive with : "System Cache Resident Bytes" wmi counter


>>(Note,I'm looking code of qemu-ga for windows, it's pretty poor, only shutdown/power feature seem to be implemented currently. (Not sure we can execute command) 
I confirm that currently we cannot execute command with qemu-ga (linux & windows).



	


----- Mail original ----- 

De: "Alexandre DERUMIER" <aderumier at odiso.com> 
À: "Dietmar Maurer" <dietmar at proxmox.com> 
Cc: pve-devel at pve.proxmox.com 
Envoyé: Dimanche 9 Décembre 2012 22:38:36 
Objet: Re: [pve-devel] pve-manager : expose balloon to gui 

>>I guess we need buffer stats do work effectively. And worse, it seems 
>>the windows driver does not return any stats. 

Are you sure ? because source code seem to get all balloon stats (VIRTIO_BALLOON_S_SWAP_IN,VIRTIO_BALLOON_S_SWAP_OUT,VIRTIO_BALLOON_S_MEMFREE...) 
https://github.com/YanVugenfirer/kvm-guest-drivers-windows/blob/master/Balloon/app/memstat.cpp 

I'll restest it. 

(But It can be easily extended to get some other counters,it's just using a wmi query to get perf counters) 


>>Yes ;-) So lets try the guest-agent (we need that anyways). 

Yes! 
(Note,I'm looking code of qemu-ga for windows, it's pretty poor, only shutdown/power feature seem to be implemented currently. (Not sure we can execute command) 

----- Mail original ----- 

De: "Dietmar Maurer" <dietmar at proxmox.com> 
À: "Alexandre DERUMIER" <aderumier at odiso.com> 
Cc: pve-devel at pve.proxmox.com 
Envoyé: Dimanche 9 Décembre 2012 16:03:31 
Objet: RE: [pve-devel] pve-manager : expose balloon to gui 

> So maybe using free_mem counter is enough ? 
> (We should of course check the swap to see if the kernel is not swapping to 
> keep free mem) 
> 
> 
> But yes, having buffer stats could help a lot. 

I guess we need buffer stats do work effectively. And worse, it seems 
the windows driver does not return any stats. 

> Note that citrix xenserver is using only the min_balloon size defined in vm 
> config, it should be tunned to be enough big to not crash the guest if memory 
> is reduced. 
> (in worst case you should have enough swap in guest to handle the memory 
> reduce) 

we want to be better than that ;-) 

> >>So maybe it is faster to work on the guest-agent infrastructure 
> >>instead. I guess it is much easier to modify the user space tools than a 
> kernel driver. 
> 
> Yes, I think we could implement qemu-ga for this. Easy for linux (get free 
> command result), not sure for windows guest(lauching some scripts ?). 
> I don't have too much time to work on qemu-ga (multiplexing give me 
> headache ;). 
> Can you work on this ? (my old patches works but need to be polished) 

Yes, I will try to get that work. 

> >>Note: fixing the kernel driver is quite easy, but I doubt we can force 
> >>all distrib. to apply/backport those patches. 
> Yes, I don't think distro will backport,I'll just be include in new kernel version. 
> So it can take time. 
> 
> 
> >>They also talk about a kernel-based auto-ballooning feature! I requested 
> more 
> >>information about that. 
> Never heart about this. But it can take time to be ready (years ?) 

Yes ;-) So lets try the guest-agent (we need that anyways). 
_______________________________________________ 
pve-devel mailing list 
pve-devel at pve.proxmox.com 
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel 



More information about the pve-devel mailing list