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

[Xen-users] Re: Contending RAM

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-users] Re: Contending RAM
From: Matthew Palmer <mpalmer@xxxxxxxxxxx>
Date: Thu, 1 Jun 2006 08:12:54 +1000
Delivery-date: Wed, 31 May 2006 15:47:04 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C61FFBEF-5188-46D8-AC7C-C3E52320430A@xxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <C61FFBEF-5188-46D8-AC7C-C3E52320430A@xxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
On Wed, May 31, 2006 at 07:54:02PM +0100, Andy Davidson wrote:
> We have 4GB on each host computer.  We like to install 10 or so  
> virtual machines on each host.  This leaves each VM very resource  
> starved.  Since we only tend to hit environments on an ad-hoc basis,  
> we need the vms available, but a lot of resources get wasted as they  
> tend to be hit one after the other.
> 
> Ideally, we'd like to content system ram - so each machine is  
> configured to have 1GB available.  This obviously means we need to  
> contend memory .. probably 3:1 (including the requirements of the  
> Dom-0). Is this possible ?

As others have said, Xen doesn't overcommit memory.  My guess is that the
decision won't be changed any time soon, either, as the big question is:
what happens when everything *really* needs all that RAM?  Bad Things, since
the hypervisor has no idea about virtual memory / swap space.

You can semi-automate the whole thing, though, by having some sort of tiny
daemon that monitors some system parameter, and tells the hypervisor that it
needs more RAM when it thinks it does.  The simplest solution would just be
a simple LRU scheme which held most VMs at 256MB, and gave the two VMs which
most recently said "holy crap, I need RAM!" a full 1GB.  More tricksyness
could get you a block-request scheme, by the 256MB -- everyone starts with
256MB, and when it really runs out it asks for another 256MB, and so on --
again, you wouldn't want to go beyond your 1GB limit, presumably.

The difficult part in this is determining when a machine needs more RAM. 
I'd say that heavy I/O on the swap partition would be a good indication, but
I'm not sure how to monitor that (It's got to be *somewhere* in /proc,
though).  One thing that's certain -- just monitoring how much RAM is
consumed, or how much is allocated to processes, isn't going to work, since
things will tend to just gobble up everything they can anyway.  You need a
better metric than that.

- Matt

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

<Prev in Thread] Current Thread [Next in Thread>