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/
Home Products Support Community News


Re: [Xen-devel] Re: [Xen-users] Max. PV and HVM Guests

To: Nick Couchman <Nick.Couchman@xxxxxxxxx>, "Mr. Teo En Ming (Zhang Enming)" <space.time.universe@xxxxxxxxx>, Pasi Kärkkäinen <pasik@xxxxxx>
Subject: Re: [Xen-devel] Re: [Xen-users] Max. PV and HVM Guests
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Mon, 09 Nov 2009 15:18:13 +0000
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, "xen-users@xxxxxxxxxxxxxxxxxxx" <xen-users@xxxxxxxxxxxxxxxxxxx>, Robert Dunkley <Robert@xxxxxxxxx>
Delivery-date: Mon, 09 Nov 2009 07:21:21 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4AF7CD9E020000990002A7CF@xxxxxxxxxxxxxxxxxxxxx>
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>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcphTnf1h1sfxFlJRmeKvhv+7TMHrQAAWKTE
Thread-topic: [Xen-devel] Re: [Xen-users] Max. PV and HVM Guests
User-agent: Microsoft-Entourage/
On 09/11/2009 15:06, "Nick Couchman" <Nick.Couchman@xxxxxxxxx> wrote:

> Really?  I thought current conventional wisdom was to allow Xen to
> self-manage memory in both dom0 and domUs, and not to manually adjust
> this?  I run several Xen systems with anywhere from 8 to 24 GB of RAM
> and 20 to 30 domUs on some of these systems and have *never* specified
> the dom0 memory at boot time - the Xen ballooning has always functioned
> perfectly fine, and never crashed my dom0.  Furthermore, while I'm not
> Linux developer and so not familiar with how Linux calculates buffering
> and caching, I do know that my Linux systems dynamically manage buffers
> and caches, and when memory is reduced or some application requires a
> larger amount of physical memory, Linux reduces the amount of data in
> buffers and caches.

If you are not using dom0 as a general-purpose OS then it is a very good
idea to specify dom0's memory allowance via dom0_mem= and disable
auto-ballooning in the xend-config.sxp. There are a few reasons for this,
the most compelling being that Linux will have a metadata overhead for
tracking memory usage, and this will be a fraction (say a percent or so) of
its initial memory allocation. So, that overhead may be just 2% of 24GB,
say, but then if dom0 gets ballooned down to 1GB it'll be more like 50%!
Clearly you are limited in how far you can balloon down without risking the
OOM killer in dom0.

Apart from that, the auto-ballooner has been implicated in various quirky
bugs in the past -- failing domain creations and migrations for the most
part -- so it's nice to turn it off if you can, as that's one less thing to
fail. And if dom0 is single-purpose you should be able to work out how much
memory it needs for that purpose and statically allocate it. Using
auto-ballooner is actually perverse in this scenario, in that dom0 gets the
least memory when it needs it the most (because it presumably has highest
load when servicing the most VMs, but in that case auto-ballooner has stolen
lots of memory from dom0).

My 2c!

 -- Keir

Xen-users mailing list