Years ago when i first started using xen i specified a dom0_mem=xxx in grub. I no longer do this, what i do now is set the dom0_min-mem setting in xend-config.sxp to 1024. I also have a few scripts that run at boot and one of them does a `xm mem-set 0 1024`. after that a xm list 0 shows dom0 allocated 1024 Ram. The problem comes on teh system when i run free or free -m, free shows dom0 using 1336096 with only 1160512 used. This also prevents the other command i run `xm mem-max 0 1024` from running correctly. Anybody know if this is a bug or what may be going on here. Is there anyway to force dom0 to 1024 with out having to specify it in grub? Next problem is the mem usage from xm info. xm info shows the host having a total of 32766 Ram, and a free memory of 12531. when i do a xm list and total the ram for all running domains (including dom0) it doesn''t come out to 12531. How can i get accurate reporting of how much ram the system has, how much each guest is really using, and how much ram is really free? ~Shaun _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Mon, Dec 21, 2009 at 4:01 AM, ShaunR <mailinglists@unix-scripts.com> wrote:> Years ago when i first started using xen i specified a dom0_mem=xxx in grub. > I no longer do thiswhy?>, what i do now is set the dom0_min-mem setting in > xend-config.sxp to 1024it provides two different things. The grub line sets the initial dom0 memory, while xend-config sets the minimum dom0 memory.>. I also have a few scripts that run at boot and one > of them does a `xm mem-set 0 1024`. after that a xm list 0 shows dom0 > allocated 1024 Ram.Without grub.conf line, this essentially do a ballon-down of dom0 memory. It''s different from setting dom0_mem in grub.conf in that this method : - allows dom0 memory to be ballooned-up later - uses up a portion of dom0 memory to maintain the necessary memory structure to be ballooned-up, thus can be a waste of (some) memory.> The problem comes on teh system when i run free or free > -m, free shows dom0 using 1336096 with only 1160512 used. This also > prevents the other command i run `xm mem-max 0 1024` from running correctly. > Anybody know if this is a bug or what may be going on here. Is there > anyway to force dom0 to 1024 with out having to specify it in grub?Not sure what you mean. In essence, I recommend you use dom0_mem.> > Next problem is the mem usage from xm info. xm info shows the host having a > total of 32766 Ram, and a free memory of 12531. when i do a xm list and > total the ram for all running domains (including dom0) it doesn''t come out > to 12531. How can i get accurate reporting of how much ram the system has, > how much each guest is really using, and how much ram is really free?My best guess is that xen itself uses some amount of memory for each running domU. Thus the sum of memory of all running domUs from "xm list" is lower compared to (total_memory - free_memory) from "xm info". -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Sun, Dec 20, 2009 at 01:01:33PM -0800, ShaunR wrote:> Years ago when i first started using xen i specified a dom0_mem=xxx in > grub. I no longer do this, what i do now is set the dom0_min-mem > setting in xend-config.sxp to 1024. I also have a few scripts that run > at boot and one of them does a `xm mem-set 0 1024`. after that a xm > list 0 shows dom0 allocated 1024 Ram. The problem comes on teh system > when i run free or free -m, free shows dom0 using 1336096 with only > 1160512 used. This also prevents the other command i run `xm mem-max 0 > 1024` from running correctly. Anybody know if this is a bug or what may > be going on here. Is there anyway to force dom0 to 1024 with out having > to specify it in grub? >You still should use dom0_mem= parameter in grub.conf. If you boot dom0 with 32 GB of RAM visible to it, and then balloon it down to only 1 GB, the dom0 linux kernel will have problems.. for example some network parameters are calculated based on the boot time amount of memory, and some data structures for memory pages are reserved also based on the boot time amount of memory.. so you''ll waste a lot of RAM in dom0.> Next problem is the mem usage from xm info. xm info shows the host > having a total of 32766 Ram, and a free memory of 12531. when i do a xm > list and total the ram for all running domains (including dom0) it > doesn''t come out to 12531. How can i get accurate reporting of how much > ram the system has, how much each guest is really using, and how much > ram is really free? >Xen hypervisor uses some memory itself, and there''s some overhead for every page of guest memory. Also some memory is reserved for DMA operations etc. The formula to calculate Xen memory overhead: 8kB per 1MB of guest plus 1MB per guest virtual cpu. Also see "xm dmesg" for more information about memory usage/reservations. Hopefully that helps. -- Pasi _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users