WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] Ballooning and Free memory in xm info

To: Stefan de Konink <skinkie@xxxxxxxxx>
Subject: Re: [Xen-users] Ballooning and Free memory in xm info
From: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Date: Sat, 19 Jul 2008 17:36:24 +0100
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Sat, 19 Jul 2008 09:37:03 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <488216B6.8070105@xxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <48820E32.9080201@xxxxxxxxx> <200807191723.50486.mark.williamson@xxxxxxxxxxxx> <488216B6.8070105@xxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.9
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 economy

Ah, 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@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users