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] Question about memory management of Xen

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] Question about memory management of Xen
From: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Date: Wed, 22 Aug 2007 18:50:34 +0100
Cc: Luca Manganelli <luca_manganelli@xxxxxxxxxxxxxxxx>
Delivery-date: Wed, 22 Aug 2007 10:51:14 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <46CAB567.3000903@xxxxxxxxxxxxxxxx>
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: <46CAB567.3000903@xxxxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.6
> Hi, I searched accross internet with google but I didn't found enough
> answers to my question:
>
> 1. What is the maximum amount of memory that Xen can manage accross its
> VMs?

If you have 32-bit, non-PAE Xen then 4GB host ram is supported.
For 32-bit PAE Xen it's more - maybe around 16GB, I think?
For 64-bit Xen it's more again.

> 2. In VM configuration you can set the "minimum" and "maximum" memory
> size. How the guest operating system "sees" the memory?

For PV guests:
the guest knows how much memory it has been allocated.  If it wants to grow 
towards its maximum then it requests more memory from Xen and incorporates it 
into its memory space.  If it wants to shrink, then it unmaps that memory and 
returns it to Xen.

From the rest of the OS, this looks like a driver which is just allocating and 
freeing memory as the domain shrinks and grows.

> 3. If I have a machine with 2GB of RAM, can I create two VMs and assign
> them 2GB of maximum memory?

Well, you could give them both 2GB maximums, but they couldn't both be using 
it at once.  Actually, they can't even *think* they're using it at once: the 
configured memory size for each guest would have to fit in the available free 
memory space so that no more than 2GB was used overall (actually, it'll be 
less than 2GB available because dom0 and Xen will use some RAM too).

Xen doesn't do memory overcommit (where the VMs think you have more memory 
than you really do) like VMware.  It also doesn't automatically change VM 
memory size in order to load balance - you have to change VM memory size 
manually.  VMware ESX does this automatically too.

Somebody really ought to write code for Xen to redistribute memory 
automatically between guests according to load; it shouldn't even be *that* 
hard to do.

>   3.a  If Xen fills up the physical RAM used for its VMs, does it use
> the swap space?

No - guests have to fit in the real RAM and are never swapped by Xen.  But you 
can always configure the guests to do their own swapping, like you would for 
a real machine.

Cheers,
Mark

-- 
Dave: Just a question. What use is a unicyle with no seat?  And no pedals!
Mark: To answer a question with a question: What use is a skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a wheel!

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

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