You need to take into account both the free_memory that Xen is showing and the memory assigned to dom0. The default behavior of Xen is to give all of the memory to dom0 at boot time (unless you use the dom0_mem boot parameter mentioned earlier) and then shrink dom0's memory as you start domUs. However, when you shut down a domU, although the memory is freed back to Xen, it does not show up in dom0 - it just stays "free." So, on the first server, where you have 8190 total and 0 free, that doesn't necessarily mean you can't start another domU, it may just be that all or most of it is assigned to dom0. From your original message, the top line shows 8386888K total, 6336300k used, and 2050588k free. This means that it's seeing all 8GB, that 6GB are used by dom0 and the domUs you have running, and that 2GB are totally free - not used by dom0 or any of the domUs. You're not missing any RAM, and, yes, you should be able to create two more domUs with 1GB of RAM each. After that, you'll still have some memory (what's assigned to dom0) available to create another domU or two, assuming your dom0 doesn't need all 3GB.
-Nick
>>> Heiko <rupertt@xxxxxxxxx> 2009/01/07 04:50 >>>
On Wed, Jan 7, 2009 at 12:44 PM, Simon Hobson <linux@xxxxxxxxxxxxxxxx> wrote:
> Heiko wrote:
>
>> I have some dom0 which have 8GB RAM, but when I look with xm list, it
>> just shows me 6GB,
>> I need to setup some new VM, each with 1GB, so I should have with 3VM
>> still 5GB free,
>> but im only seeing 3GB.
>> Can I just create 2 new VM with each 1GB and still have 3GB for the dom0?
>>
>> #xm top
>> xentop - 11:31:17 Xen 3.1.0-53.1.14.el5
>> 4 domains: 1 running, 3 blocked, 0 paused, 0 crashed, 0 dying, 0 shutdown
>> Mem: 8386888k total, 6336300k used, 2050588k free CPUs: 8 @ 2327MHz
>>
>> #xm list:
>> Name ID Mem(MiB) VCPUs State
>> Time(s)
>> Domain-0 0 3057 8 r-----
>> 1265671.8
>> xxx-vm2 12 999 2 r----- 4074.0
>> xxxx-vm2 11 999 2 -b---- 620.2
>> xxxxxx-vm2 7 999 2 -b---- 238229.7
>
> It could be that the combination of OS & hardware limits the host to "under
> 4G" for itself, and so that's all that shows up. The rest of the ram could
> well be available to be divvied up between guests though.
>
> You can also explicitly limit host ram usage, and I believe this is
> recommended for two reasons :
> 1) Some kernel tables are sized according to memory at boot time - so when
> the memory is ballooned down, the kernel tables are bigger than they need to
> be.
> 2) When I upgraded Xen at home over Christmas, I came up with an error
> (can't recall what) which was specific to running Dom0 without a memory
> limit.
>
> You limit Dom0 memory by adding "dom0_mem=<some value>" to your Xen kernel
> line, like this :
>>
>> kernel /xen-3.2-1-amd64.gz dom0_mem=512M
>
Hello,
i dont have any of these entry on my servers.
xm info gives me something different on each server.
total_memory : 8190
free_memory : 0
total_memory : 8190
free_memory : 1000
total_memory : 8190
free_memory : 2002
total_memory : 8190
free_memory : 1000
does it mean in the last case, that when xm list gives me 3GB for dom0,
that I can create 2 1GB VMs and still have 2GB for the dom0 Server?
greetings
>
>
> --
> Simon Hobson
>
> Visit
http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
> author Gladys Hobson. Novels - poetry - short stories - ideal as
> Christmas stocking fillers. Some available as e-books.
>
> _______________________________________________
> Xen-users mailing list
> Xen-users@xxxxxxxxxxxxxxxxxxx
>
http://lists.xensource.com/xen-users>