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] allocating memory to dom0

To: "john maclean" <jayeola@xxxxxxxxx>, xen-users@xxxxxxxxxxxxxxxxxxx
Subject: RE: [Xen-users] allocating memory to dom0
From: "Petersson, Mats" <Mats.Petersson@xxxxxxx>
Date: Fri, 20 Oct 2006 10:42:26 +0200
Delivery-date: Fri, 20 Oct 2006 12:50:23 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <4170c1720610191443v7015aa8bm61092f35d8b642f2@xxxxxxxxxxxxxx>
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>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcbzyDVjg+eN9sDOQ+CtxxV/Zq9JBAAWmDWg
Thread-topic: [Xen-users] allocating memory to dom0
 

> -----Original Message-----
> From: xen-users-bounces@xxxxxxxxxxxxxxxxxxx 
> [mailto:xen-users-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of 
> john maclean
> Sent: 19 October 2006 22:44
> To: xen-users@xxxxxxxxxxxxxxxxxxx
> Subject: [Xen-users] allocating memory to dom0
> 
> Hey chaps, having a minor dispute with a friend. According the README
> in the Xen sources....
> "
>    The Xen command line takes a number of optional arguments described
>    in the manual. The most common is 'dom0_mem=xxxM' which sets the
>    amount of memory to allocate for use by your initial virtual
>    machine (known as domain 0). Note that Xen itself reserves about
>    32MB memory for internal use, which is not available for allocation
>    to virtual machines.
> .."
> 
> I've taken this to mean that one allocates say, half of one's RAM to
> dom0 with the command `dom0_mem=xxxM`. The domUs will then use up to
> the other half of the box's RAM. Is this correct?
> 
> My buddy says that this is unnecessary as the dom0 only needs 32M of
> ram. It will give the RAM away to the domU chaps until it has no more
> RAM to spare.

Neither of you are directly wrong... 

You can let Dom0 sacrifice it's own memory for the DomU - I personally
prefer to know where I stand - if I lock Dom0 to (say) 256MB, then I
know how much memory is available to DomU's. You may be able to run a
Dom0 on 32MB, but I'd say that you need a bit more than that if you're
using a standard installation, 100MB+ would be more realistic. 

One reason to use a fixed Dom0 memory amount is that some Kernel
allocations are based on percentages of the memory, and once they have
been made, the can't be trivially changed, which means that there may be
(say) 5% of the 16GB of RAM used for some buffer-space or such (5% of
16GB is 820 MB). If you set the dom0_mem to 256MB, the kernel will use
5% of 256MB for that buffer, and you'll have those 800MB available later
on. 

There is a setting in the file /etc/xend-config.sxp that sets how much
minimum Dom0 memory is. Not sure what the default is - it can be changed
up or down. 

--
Mats
> 
> -- 
> John Maclean  - 07739 171 531
> MSc (DIC)
> 
> _______________________________________________
> Xen-users mailing list
> Xen-users@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-users
> 
> 
> 



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