[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] Dom0 Memory?

  • To: <ray@xxxxxxxxx>, <xen-users@xxxxxxxxxxxxx>
  • From: "Ian Tobin" <itobin@xxxxxxxxxxxxx>
  • Date: Fri, 11 May 2012 09:11:28 +0100
  • Delivery-date: Fri, 11 May 2012 08:12:48 +0000
  • List-id: Xen user discussion <xen-users.lists.xen.org>
  • Thread-index: Ac0vCKG3NOyaOikTT7i3TJKS13pSFgAREYbQ
  • Thread-topic: [Xen-users] Dom0 Memory?


There is still a bug. 

For example I have 16Gb RAM, 512 dedicated to Dom0, 2 Gb dedicated to VM1 which 
leaves me this amount of RAM

Xl info

total_memory           : 15869
free_memory            : 13124

this is correct as 512MB is missing because it is assigned to Dom0.

Now I create a new config file for VM2 and I set the RAM

memory = 12288

Now this should be fine and allow me to boot the VM as I should still have a 
bit of memory left over.

Xl create vm2

libxl: error: libxl.c:2150:libxl_set_memory_target new target 0 for dom0 is 
below the minimum threshold

libxl: error: libxl.c:2150:libxl_set_memory_target new target 0 for dom0 is 
below the minimum threshold

libxl: error: libxl.c:2150:libxl_set_memory_target new target 0 for dom0 is 
below the minimum threshold

failed to free memory for the domain

Why it is trying to take memory from dom0??



-----Original Message-----
From: xen-users-bounces@xxxxxxxxxxxxx [mailto:xen-users-bounces@xxxxxxxxxxxxx] 
On Behalf Of ray@xxxxxxxxx
Sent: 11 May 2012 00:56
To: xen-users@xxxxxxxxxxxxx
Subject: Re: [Xen-users] Dom0 Memory?

On Wed, 2012-05-09 at 17:52 +0200, Flavio wrote:
> > What does 'xm info' say?
> # xl info
> total_memory : 8107
> free_memory : 6968
So, 8GB of RAM is what Xen knows, ~7 of them being free... What's the problem?

> As you can see, my 8GB of RAM have disappeared.
> What can you say about that?
Uh? :-O

Ok, this might be a bit too technical, but perhaps still of help:

I'm also sure this has been mentioned in this or another thread related to this 

Also trying to quickly summarize what's happening, no, your memory _has_not_ 
disappeared. Actually, it is right there for your VMs to use it (and xl 
invocation above shows right that).

With dom0_mem=1G you told Xen that one of your VM (the one that it will 
automatically call 'Domain0' and that it will automatically create on
boot) will use 1G of your 8G of RAM. If you now try to create another VM (say 
'VM_1') with 2G of RAM, it will just do that, and you'll have 1G
+2G=3G out of 8G of your RAM dedicated to these two VMs, while the other
5G are still free.

Have you tried that? If you do, try running `xl info' on Dom0 again after that. 
Try also SSH-ing in 'VM_1' and asking (e.g., via `free -m') how many total and 
free memory it has. As one should expect, it will say it has 2GB of RAM in 
total... Does this make sense?

So, again, the reason why you're not seeing 7GB of RAM in Dom0 is because 
they're not there! Dom0 is a virtual machine to which you've given 1GB of RAM 
via the cmdline... Having only 1GB of RAM is just doing right what you asked 

I can understand that it might look a bit tricky, but what you seem to be 
missing here is you should consider Dom0 pretty much like any other VM that Xen 
is managing as the hypervisor.

Hope of being of some help.

Those were interesting articles.  I'm left with a couple questions.
1)  How does one determine how much memory to allocate?
2)  Is there a way to garauntee that dom0 never has to use a page file?
3)  Sorry for the unrelated component - That wiki page was great.  When 
building for the most current version of Xen, what is a good way to find all 
the related wiki pages?


Xen-users mailing list

Xen-users mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.