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

Re: [Xen-users] Xen memory allocation for dom0 and domU



Thanks Ian.

On Wed, Feb 4, 2015 at 5:09 AM, Ian Campbell <Ian.Campbell@xxxxxxxxxx> wrote:
> On Tue, 2015-02-03 at 22:37 -0500, Jintack Lim wrote:
>> Hi all,
>>
>> This is a kind of basic question.
>>
>> I have a cubietruck (armv7) board which has 2G of memory.
>> I'm using Xen 4.5.
>>
>> I want to allocate 1.5G to domU and as much as possible to dom0.
>> It turned out that I only can allocate 128M of memory for dom0.
>> When I allocated 256M or 384M, I got an error.
>> Log is attached at the bottom.
>
> Jut to make sure I understand: if you boot dom0 with 128M then you can
> start a 1.5G domU, but if you boot dom0 with 256M then you cannot start
> the 1.5G domU?

Yes.

>
>> I'm looking at tools/libxc/xc_dom_arm.c,
>> and xen/docs/misc/libxl_memory.txt
>> However, if there is any written guide(or rule) to allocate memory for
>> dom0 and domU, it'll be much helpful!!
>
> The only real guide is to make sure the system has enough free RAM, or
> is at least able to balloon dom0 down to free the needed memory.
>
>> domainbuilder: detail: populate_one_size: populated 0x2ae/0x300
>> entries with shift 9
>> domainbuilder: detail: populate_one_size: populated 0x343/0xa400
>> entries with shift 0
>> domainbuilder: detail: populate_guest_memory: Not enough RAM
>> xc: error: panic: xc_dom_boot.c:154: xc_dom_boot_mem_init: can't
>> allocate low memory for domain: Out of memory
>
> It appears you are just running out of memory, what does "xl info" in
> dom0 say when you have just booted (i.e. without having started a
> guest)? The most interesting numbers will be total_memory and
> free_memory.


When I booted with 384M, this is what I got.
total_memory           : 2048
free_memory            : 1375
(289M is missing)

and this is withm 256M
total_memory           : 2048
free_memory            : 1503
(289M is missing as well)

>
> How are you configuring the amount of dom0 memory? With dom0_mem on the
> hypervisor command line?

Yes, I use this command line in uboot scr file.

console=dtuart dtuart=/soc@01c00000/serial@01c28000
dom0_mem=384M,max:384M dom0_max_vcpus=1

>
> Don't forget that Xen itself will consume some RAM, according to your
> numbers it's something between 256M and 350M on this system (that's more
> than my gut feeling expects, but not way out).
>

Yes, it seems Xen is consuming 289M.
Is it expected?

> Ian.
>
>

Thanks,
Jintack


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users


 


Rackspace

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