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? 2. In VM configuration you can set the "minimum" and "maximum" memory size. How the guest operating system "sees" the memory? 3. If I have a machine with 2GB of RAM, can I create two VMs and assign them 2GB of maximum memory? 3.a If Xen fills up the physical RAM used for its VMs, does it use the swap space? Thank you in advance. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Mark Williamson
2007-Aug-22 17:50 UTC
Re: [Xen-users] Question about memory management of Xen
> 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@lists.xensource.com http://lists.xensource.com/xen-users
Luca Manganelli
2007-Aug-23 09:25 UTC
Re: [Xen-users] Question about memory management of Xen
Mark Williamson wrote:> 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. >So, to have more than 4GB on a 32bit: domain0 --> kernel xen with PAE enabled vmX --> these VMs have less than 4GB. Must I install the PAE enabled kernel in them, too?> 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. >So, a VM can release free memory to system RAM, is it true? On VMWARE it''s never released, it only grows. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi Luca, On Thu, Aug 23, 2007 at 11:25:40AM +0200, Luca Manganelli wrote:> Mark Williamson wrote: > >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. > > > So, to have more than 4GB on a 32bit: > domain0 --> kernel xen with PAE enabledKernel and hypervisor need to be PAE-enabled.> vmX --> these VMs have less than 4GB. Must I install the PAE enabled > kernel in them, too?Yes, PAE hypervisor only supports PAE domU kernels. PAE domu kernels are a good idea anyway as they will work with both 64-bit hypervisor and PAE hypervisor.> So, a VM can release free memory to system RAM, is it true? On VMWARE > it''s never released, it only grows.I don''t know the answer to this one, sorry. Cheers, Andy _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users