Hello everyone, i just installed xen on standard debian etch server. 4gb ram, Q6600 machine. I am running two hvm guests, one windows 2k3, the other debian etch, both with 512mb ram allocated. What i dont understand is that when i start a guest OS the amount of total ram known to the host machine seems to vanish? Free -m and top both report that with both guests running i only have 2.9gb of total system memory. If i attempt to start a third guest, hvm xubuntu, with 512mb of ram allocated to it i get the error "Error: (12, ''Cannot allocate memory'')" Please forgive me for such a trivial question, but i have searched these forums and google to the best of my ability and i keep coming up blank :( -- View this message in context: http://www.nabble.com/Vanishing-memory--Whats-going-on--tp18269784p18269784.html Sent from the Xen - User mailing list archive at Nabble.com. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
bleomycin wrote:> Hello everyone, i just installed xen on standard debian etch server. 4gb ram, > Q6600 machine. I am running two hvm guests, one windows 2k3, the other > debian etch, both with 512mb ram allocated. What i dont understand is that > when i start a guest OS the amount of total ram known to the host machine > seems to vanish? Free -m and top both report that with both guests running i > only have 2.9gb of total system memory. If i attempt to start a third guest, > hvm xubuntu, with 512mb of ram allocated to it i get the error "Error: (12, > ''Cannot allocate memory'')" Please forgive me for such a trivial question, > but i have searched these forums and google to the best of my ability and i > keep coming up blank :( >What you''re looking at with "free -m" is, I would imagine, the memory available to dom0 and that would make sense as the hypervisor takes a slice and then each domU takes 0.5GB leaving you with just shy of 3GB. If you can''t create a third domU then its because the balloon driver in dom0 can''t reclaim enough memory to start the new domain: generally speaking the balloon driver will "acquire" memory from the cache. You could try setting dom0_mem=1024M (for example) on the kernel command line in grub (there''s a kernel line and a couple of module lines normally). That will leave you with just short of 3GB for guests. Oh, and if you have the choice then go for pv guests rather than hvm because having a kernel that knows its in a virtual environment is generally an advantage. jch _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
John Haxby-3 wrote:> > > What you''re looking at with "free -m" is, I would imagine, the memory > available to dom0 and that would make sense as the hypervisor takes a > slice and then each domU takes 0.5GB leaving you with just shy of 3GB. > > If you can''t create a third domU then its because the balloon driver in > dom0 can''t reclaim enough memory to start the new domain: generally > speaking the balloon driver will "acquire" memory from the cache. > > You could try setting dom0_mem=1024M (for example) on the kernel command > line in grub (there''s a kernel line and a couple of module lines > normally). That will leave you with just short of 3GB for guests. > > Oh, and if you have the choice then go for pv guests rather than hvm > because having a kernel that knows its in a virtual environment is > generally an advantage. > > jch > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users > >Thank you very much for the reply. I must not fully understand the point of hvm. Other than being used to run windows, I thought hvm was required to take full advantage of intel/amd''s VT technology built into the newer processors? Or is that handled automatically regardless of hvm? -- View this message in context: http://www.nabble.com/Vanishing-memory--Whats-going-on--tp18269784p18298577.html Sent from the Xen - User mailing list archive at Nabble.com. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Sat, Jul 05, 2008 at 08:43:24PM -0700, bleomycin wrote:> Thank you very much for the reply. I must not fully understand the point of > hvm. Other than being used to run windows, I thought hvm was required to > take full advantage of intel/amd''s VT technology built into the newer > processors? Or is that handled automatically regardless of hvm?I think you have been fooled by marketing. The VT technology doesn''t make virtualization better in general; it''s however required in order to virtualize Windows and any other OS that cannot work in PVM. But at any point, PVM is much better than HVM; and VT doesn''t give you any advantage if the guest runs in PVM. In other words, the fastest way to run a guest is PVM mode, and VT support means nothing in that case. That is, if I understand the situation correctly. Corrections welcome! regards, iustin _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Sunday 06 July 2008, Iustin Pop wrote:> On Sat, Jul 05, 2008 at 08:43:24PM -0700, bleomycin wrote: > > Thank you very much for the reply. I must not fully understand the point > > of hvm. Other than being used to run windows, I thought hvm was required > > to take full advantage of intel/amd''s VT technology built into the newer > > processors? Or is that handled automatically regardless of hvm? > > I think you have been fooled by marketing. > > The VT technology doesn''t make virtualization better in general; it''s > however required in order to virtualize Windows and any other OS that > cannot work in PVM. > > But at any point, PVM is much better than HVM; and VT doesn''t give you > any advantage if the guest runs in PVM. In other words, the fastest way > to run a guest is PVM mode, and VT support means nothing in that case. > > That is, if I understand the situation correctly. Corrections welcome!That''s pretty much the current situation! I would add that by combining HVM and PV technologies carefully it might be possible to achieve even better performance, potentially with less invasive code modifications to the guest! This isn''t done in Xen, though - you either use PVM of HVM, with PVM generally being faster. Cheers, Mark -- Push Me Pull You - Distributed SCM tool (http://www.cl.cam.ac.uk/~maw48/pmpu/) _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Sunday 06 July 2008, bleomycin wrote: <snip>> Thank you very much for the reply. I must not fully understand the point of > hvm. Other than being used to run windows, I thought hvm was required to > take full advantage of intel/amd''s VT technology built into the newer > processors? Or is that handled automatically regardless of hvm?HVM is used only for running unmodified guest OSes. That might be Windows, or you might have a requirement to run a specific Linux (or FreeBSD or other) guest that doesn''t have a Xen-aware kernel (it might be a very old Linux that you need to support, for instance). PV gives the highest levels of performance to a Xen guest, where available. There''s not a way of using HVM hardware to accelerate PV guests at the moment but PV is still generally as-good-as or better performing than HVM. Cheers, Mark -- Push Me Pull You - Distributed SCM tool (http://www.cl.cam.ac.uk/~maw48/pmpu/) _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
I''d like to expand a bit on John''s excellent points... On Friday 04 July 2008, John Haxby wrote:> bleomycin wrote: > > Hello everyone, i just installed xen on standard debian etch server. 4gb > > ram, Q6600 machine. I am running two hvm guests, one windows 2k3, the > > other debian etch, both with 512mb ram allocated. What i dont understand > > is that when i start a guest OS the amount of total ram known to the host > > machine seems to vanish? Free -m and top both report that with both > > guests running i only have 2.9gb of total system memory. If i attempt to > > start a third guest, hvm xubuntu, with 512mb of ram allocated to it i get > > the error "Error: (12, ''Cannot allocate memory'')" Please forgive me for > > such a trivial question, but i have searched these forums and google to > > the best of my ability and i keep coming up blank :( > > What you''re looking at with "free -m" is, I would imagine, the memory > available to dom0 and that would make sense as the hypervisor takes a > slice and then each domU takes 0.5GB leaving you with just shy of 3GB.Yep. The important point to understand is that by default, Xen gives dom0 all of the free memory in the machine (i.e. all the memory that the Xen hypervisor isn''t using itself) but that dom0 has to *give back* this memory so that it can be *given* to other domains. This results in dom0''s view of the total memory shrinking. To get a *true* idea of the free memory available in the entire machine, you use "xm info". In practice, there will be very little free memory available by default, since it is reclaimed dynamically from dom0.> If you can''t create a third domU then its because the balloon driver in > dom0 can''t reclaim enough memory to start the new domain: generally > speaking the balloon driver will "acquire" memory from the cache.Yep, agreed.> You could try setting dom0_mem=1024M (for example) on the kernel command > line in grub (there''s a kernel line and a couple of module lines > normally). That will leave you with just short of 3GB for guests.You can also adjust the value of dom0-min-mem in /etc/xen/xend-config.sxp in order to allow dom0 to be shrunk smaller in order to free space for other guests. For production servers with a stable set of guests, it''s generally recommended to disable auto-ballooning (automatic resizing) of dom0 by setting dom0-min-mem to the special value of 0, then set the dom0_mem= parameter on the Xen commandline so that dom0 starts with the right proportion of machine memory.> Oh, and if you have the choice then go for pv guests rather than hvm > because having a kernel that knows its in a virtual environment is > generally an advantage.Yep. Cheers, Mark -- Push Me Pull You - Distributed SCM tool (http://www.cl.cam.ac.uk/~maw48/pmpu/) _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users