Hi, I wonder how much memory the hypervisor needs. I have the following vms running: xen26:~# xm list Name ID Mem VCPUs State Time(s) Domain-0 0 725 1 r----- 2064.7 g-hlsan9ib 1 4096 4 - b---- 160.9 g-lp549ugs 19 1024 4 - b---- 83.0 g-lpjj78e9 2 1024 2 - b---- 156.1 g-nt731fct 17 2048 2 - b---- 116.5 g-resl3iqi 4 2048 4 - b---- 326.7 g-rujbc3il 5 2048 4 - b---- 192.6 g-v72lkt0b 6 1024 2 - b---- 197.5 725+4096+1024+1024+2048+2048+2048+1024 = 14037mb dom0 has fixed 725mb of memory, the server has 16gb of memory. if try to launch another 2048mb vm i get the following: xen26:~# xm create /etc/xen/g-ida7k5fo.cfg Using config file "/etc/xen/g-ida7k5fo.cfg". Error: Not enough free memory and enable-dom0-ballooning is False, so I cannot release any more. I need 2138112 KiB but only have 1930744. so if i take the 16384mb of ram minus the used space and the space xen sys it still has i get: 16384 - 14037 - 1930744/1024 ~= 461.5mb does the hypervisor really need 460mb of memory? is there a way to calculate how much memory the hypervisior needs? lg philipp _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Gary W. Smith
2009-Feb-17 21:48 UTC
RE: [Xen-users] how much memory does the hypervisor need
Philipp, I''ve been pre-allocating 384mb (by setting it in grub) on all of my xen hosts (running CentOS 5.2 / xen 3.3.0 -- gitco). I started doing this some time ago because I run into baloon driver issues when I don''t do it (where some or all of the DomU''s will lose network connectivity). This value seems to work well for us. Then again, we are running very base Dom0''s. That is, minimal install + xen. total used free shared buffers cached Mem: 393216 333288 59928 0 8376 160560 -/+ buffers/cache: 164352 228864 Swap: 8385920 172 8385748 I''m not sure what the best practive is though. What I do know is that by doing it this way when you run xm top you will know exactly how much memory is available to allocate to new VM''s. Gary PS: sorry for top posting, OWA doesn''t give me the option. ________________________________ From: xen-users-bounces@lists.xensource.com on behalf of Philipp Schmid Sent: Tue 2/17/2009 1:29 PM To: xen-users@lists.xensource.com Subject: [Xen-users] how much memory does the hypervisor need Hi, I wonder how much memory the hypervisor needs. I have the following vms running: xen26:~# xm list Name ID Mem VCPUs State Time(s) Domain-0 0 725 1 r----- 2064.7 g-hlsan9ib 1 4096 4 - b---- 160.9 g-lp549ugs 19 1024 4 - b---- 83.0 g-lpjj78e9 2 1024 2 - b---- 156.1 g-nt731fct 17 2048 2 - b---- 116.5 g-resl3iqi 4 2048 4 - b---- 326.7 g-rujbc3il 5 2048 4 - b---- 192.6 g-v72lkt0b 6 1024 2 - b---- 197.5 725+4096+1024+1024+2048+2048+2048+1024 = 14037mb dom0 has fixed 725mb of memory, the server has 16gb of memory. if try to launch another 2048mb vm i get the following: xen26:~# xm create /etc/xen/g-ida7k5fo.cfg Using config file "/etc/xen/g-ida7k5fo.cfg". Error: Not enough free memory and enable-dom0-ballooning is False, so I cannot release any more. I need 2138112 KiB but only have 1930744. so if i take the 16384mb of ram minus the used space and the space xen sys it still has i get: 16384 - 14037 - 1930744/1024 ~= 461.5mb does the hypervisor really need 460mb of memory? is there a way to calculate how much memory the hypervisior needs? lg philipp _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Thomas Goirand
2009-Feb-18 04:55 UTC
Re: [Xen-users] how much memory does the hypervisor need
Philipp Schmid wrote:> so if i take the 16384mb of ram minus the used space and the space xen > sys it still has i get: > > 16384 - 14037 - 1930744/1024 ~= 461.5mb > > does the hypervisor really need 460mb of memory? > is there a way to calculate how much memory the hypervisior needs? > > lg philippThere is no need to do such calculation. Type "xm info" and it will tell you how much memory you have left. But anyway, I don''t think that Xen is wrong when it tells you there is not enough RAM left. If you wish to resize the dom0, you can do like this: xm mem-set Domain-0 384 This will set your dom0 with 384 MB of RAM, which is quite enough if you don''t run too many things in the dom0. At the time of xen 2.0.7, with sarge, we used to set 128 MB of RAM, and it was quite ok. Now, with newer operating systems, 384 MB seems to be a reasonable value with which we never have issues (note that we set 512 MB of swap). As said Gary, a good idea is to set the dom0 memory footprint in your grub config, and/or NOT let it baloon out too much (for example by setting the minimum in xend-config.sxp). Best Regards, Thomas Goirand -- Thomas Goirand GPLHost CEO Web: http://www.gplhost.com GPLHost:>_ Open source hosting worldwide Web spaces featuring our LGPL control panel and Xen VPS Locations in Singapore, Sydney, Seattle, Florida, Paris, London, Barcelona and Israel _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users