Hi, Is it expected behavior that when ballooning is enabled the amount of free memory visisble is 28k (thus: 0) in free_memory? Stefan _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Mark Williamson
2008-Jul-19 16:23 UTC
Re: [Xen-users] Ballooning and Free memory in xm info
On Saturday 19 July 2008, Stefan de Konink wrote:> Hi, > > > Is it expected behavior that when ballooning is enabled the amount of > free memory visisble is 28k (thus: 0) in free_memory?Do you mean autoballooning of dom0? Before you''ve started and destroyed any guests then I''d guess this is normal - dom0 will have been sized to use all available memory. From Xen''s PoV the memory is not free because dom0 currently owns it; dom0 will free it to Xen before starting a domU when autoballooning is active. Or did you mean something else? Cheers, Mark -- Push Me Pull You - Distributed SCM tool (http://www.cl.cam.ac.uk/~maw48/pmpu/) _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Stefan de Konink
2008-Jul-19 16:30 UTC
Re: [Xen-users] Ballooning and Free memory in xm info
Mark Williamson schreef:> On Saturday 19 July 2008, Stefan de Konink wrote: >> Is it expected behavior that when ballooning is enabled the amount of >> free memory visisble is 28k (thus: 0) in free_memory? > > Do you mean autoballooning of dom0? Before you''ve started and destroyed any > guests then I''d guess this is normal - dom0 will have been sized to use all > available memory. From Xen''s PoV the memory is not free because dom0 > currently owns it; dom0 will free it to Xen before starting a domU when > autoballooning is active. > > Or did you mean something else?Even with one domain active it is still 0. I''m currently creating an cluster economy. One part of the bidding process is new domain is of course free memory. I''m using libvirt, and this is ''smartly'' reporting only 28k free memory with ballooning on. That is probably equal to xm info does in megabytes. I have ''solved'' the issue by specifying dom0_mem=... at the Xen cmdline, but I guess there must be a way to get the value: total_free = xen_total - (dom0_total - dom0_free) (from the ballooning driver) Stefan _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Mark Williamson
2008-Jul-19 16:36 UTC
Re: [Xen-users] Ballooning and Free memory in xm info
On Saturday 19 July 2008, Stefan de Konink wrote:> Mark Williamson schreef: > > On Saturday 19 July 2008, Stefan de Konink wrote: > >> Is it expected behavior that when ballooning is enabled the amount of > >> free memory visisble is 28k (thus: 0) in free_memory? > > > > Do you mean autoballooning of dom0? Before you''ve started and destroyed > > any guests then I''d guess this is normal - dom0 will have been sized to > > use all available memory. From Xen''s PoV the memory is not free because > > dom0 currently owns it; dom0 will free it to Xen before starting a domU > > when autoballooning is active. > > > > Or did you mean something else? > > Even with one domain active it is still 0.I think that''s still expected behaviour; dom0 has given up the memory and it''s all been allocated to the domU. If you were to destroy the domU, then there''d be free memory (apparently it isn''t reclaimed by dom0). There used to be more free memory floating about in the system to act as a pool for the network driver page flipping but this mechanism is not used anymore unless you have a really old guest. This may mean there''s less free memory hanging around with domUs running than you remember seeing before!> I''m currently creating an > cluster economyAh, a nice plan.> One part of the bidding process is new domain is of > course free memory. I''m using libvirt, and this is ''smartly'' reporting > only 28k free memory with ballooning on. That is probably equal to xm > info does in megabytes. > > I have ''solved'' the issue by specifying dom0_mem=... at the Xen cmdline, > but I guess there must be a way to get the value: > > total_free = xen_total - (dom0_total - dom0_free) > > (from the ballooning driver)I was going to suggest you use dom0_mem :-) I think that''s the pragmatic way to go about this... I guess you could try to do some kind of calculation based on the amount of free memory *in* dom0 that it might be able to give back to Xen through ballooning. You should get more predictable performance by just having dom0 at a set memory footprint instead of snatching memory off it occasionally, so unless you *really* need to have it autoballooning I think your approach dom0_mem is appropriate. Make sure to disable autoballooning so you don''t confuse things by accidentally shrinking dom0 further :-) Cheers, Mark -- Push Me Pull You - Distributed SCM tool (http://www.cl.cam.ac.uk/~maw48/pmpu/) _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Stefan de Konink
2008-Jul-19 17:07 UTC
Re: [Xen-users] Ballooning and Free memory in xm info
Mark Williamson schreef:>> I''m currently creating an >> cluster economy > > Ah, a nice plan.It is based around my current REST http-interface to libvirt, so an avahi request is put on the network (offer), and the available cluster nodes can give their tender, lowest will get it. For now I keep it simple; that means no exact migration costs, just the cost of overcommitting with respect to free memory. Our setup require this to work before ip address allocation... but I suppose it would work for anyone with just a switched network as a charm.> Make sure to disable autoballooning so you don''t confuse things by > accidentally shrinking dom0 further :-)Will I get away with dom0_mem or should I pass dom0-min-mem=0 in the xendconfig? Or is there a cmdline param that disables ballooning? Stefan _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Mark Williamson
2008-Jul-19 17:10 UTC
Re: [Xen-users] Ballooning and Free memory in xm info
On Saturday 19 July 2008, Stefan de Konink wrote:> > Make sure to disable autoballooning so you don''t confuse things by > > accidentally shrinking dom0 further :-) > > Will I get away with dom0_mem or should I pass dom0-min-mem=0 in the > xendconfig? Or is there a cmdline param that disables ballooning?The xend config setting is the way to do this. If dom0_mem on the command line is less than dom0-min-mem in the config file then autoballooning won''t happen anyway; it seems sensible to make it explicit, though. Cheers, Mark -- Push Me Pull You - Distributed SCM tool (http://www.cl.cam.ac.uk/~maw48/pmpu/) _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users