[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Whats effect of EXTRA_MEM_RATIO
On Tue, Jul 16, 2013 at 9:12 PM, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> wrote:
Hi Konrad, I checked the struct page but was'nt able to sum up its exact size for a PV kernel but it does go in lowmem. I did something else to tackle the EXTRA_MEM_RATIO problem for me.
There are few situations 1. PV 3.4.50 kernel does not know about static max mem for domain & it always starts with base memory 2. The scalability of domain is decided by this EXTRA_MEM_RATIO which is = 10 as default.
3. 10x scalability is always there irrespective of max mem (even if base mem = max mem). Because its pragma #define EXTRA_MEM_RATIO (10) 4. To achieve 10x scalability the guest kernel has to make page table entries and looses considerable amount of RAM. e.g on Debian guest with base & max mem = 512MB, for EXTRA_MEM_RATIO=10 free command shows 327MB total memory so a loss of 512MB - 327MB = 185MB
on same Debian with base & max mem = 512MB, for EXTRA_MEM_RATIO=1 free shows 485MB total memory so a loss of 512MB - 485MB = 27MB only. Now to avoid this problem I made extra_mem_ratio as a boot kernel param and now I can customize the "extra_mem_ratio" variable in grub.cfg depending on my expected scalability. e.g.
kernel /vmlinuz-3.4.50-8.el6.x86_64 ro root=/dev/mapper/vg_94762034-lv_root rd_LVM_LV=vg_94762034/lv_swap rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg_94762034/lv_root KEYTABLE=us console=hvc0 rd_NO_MD quiet SYSFONT=latarcyrheb-sun16 rhgb crashkernel=auto extra_mem_ratio=4 rd_NO_DM
There is no need to recompile guest kernel each time to change EXTRA_MEM_RATIO EXTRA_MEM_RATIO in Kernel 3.x looks like a threat for PV XEN Guests as 10 is a magic hard coded figure for scalability. Your views please ? With reference to highmem and lowmem, I found that the lowmem is kernel space and highmem is userspace. This means that the available RAM is divided and memory page structures are filled in lowmem which could be 1/3 of base memory. So for bigger scalability, lowmem would be filled with pages only to address the scalability.
_______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |