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

Re: [Xen-users] Can we run more virtual machine than the memory avaible?



> > It's a big problem for me if you create a virtual network with 100
> > hosts (30MB per host) you need 3 Go per host!!  I think this is the
> > disadvantage  of xen
>
> It may be a disadvantage, but it happens to be the design choosen for Xen.
> Xen has limitations, which may cause it to be a disadvantage in some
> respects.

Yes.

Note that you can still swap within the domains, and the domains themselves 
are able to make better (well, more informed) resource management decisions 
regarding swapping that the rest of the machine.

It'd be nice to support bursty memory usage patterns (e.g. if only a few 
virtual machines are wanting lots of memory then give it to them).  This 
should be possible to automate using the balloon driver, without requiring 
actual overcommit.

> We could obviously use Dom0 for the swapping process (at least in the sense
> of using it's disk drivers), so that's not a big issue.

Yep, we'd need some sort of Xen<->dom0 interface for doing the swapping, and 
updating the memory map.

It'd certainly make things a bit complicated.  For instance, I'd imagine it 
would make it less straightforward for guests to manage their own pagetables 
(who gets control over the "present" bit?), and running guests on shadow 
pagetables would be less efficient.

> The hypervisor has
> NO KNOWLEDGE of what's in which page, so it's not able to choose a page
> correctly.

Yep.  In fact, if guests can swap too it's even worse: double paging can occur 
if a guest wants to page out data that's already paged out by the hypervisor.  
The hypervisor must fault it back in because the guest accessed it, but the 
guest immediately pages it out again.  Ouch.

> Of course, the OS has some special call that is called when the 
> system is to "lock" a page in memory, and in a para-virtualized
> environment, this could be intercepted and used to prevent the pages from
> being paged out. But in the case of a unmodified OS, this would definitely
> not work, as there's not a single special operation to track this
> information - the OS would just have some internal table of some sort
> (binary tree, hash-list, linear array, bitmap or whatever the OS designer
> decided was the best way to track a bunch of memory pages...)

Well, locking shouldn't be a problem except in domains with physical device 
access.  You wouldn't want to page those!

However, there are still the semantic issues that performance-related 
information is being lost because it's not visible to the hypervisor.  I 
believe IBM have / are considering some features in z/VM to allow guests to 
hint the characteristics of their pages to the hypervisor so that it can make 
better decisions.  The Disco hypervisor used to use a weird swap device to 
avoid double paging (not sure how applicable that would be to Xen, though).  
And I suspect there's some interesting work that could be done in trying to 
infer characteristics of guest pages without the guest hinting.

VMware ESX hypervisor allows overcommit of memory (don't know about other 
VMwares, but I suspect they might allow swapping, they're not hypervisors 
tho).  It also uses a combination of unifying identical pages, and balloon 
drivers to maximise memory efficiency without resorting to swap, though.  
It's quite a complicated scheme, but it'd more obvious in ESX since they use 
shadow pagetables and have device drivers in the hypervisor already.

Cheers,
Mark

> I don't think this will be implemented in Xen for a LONG time.
>
> --
> Mats
>
> > Le 22 juin 06 à 15:22, Harald Schioeberg a écrit :
> > > -----BEGIN PGP SIGNED MESSAGE-----
> > > Hash: SHA1
> > >
> > > Thats not possible, you'll need at least 664MB + 32 MB for the
> > > hypervisor + some overhead, xen won't use exactly 30MB but
> >
> > a little
> >
> > > bit
> > > more.
> > >
> > > one thing: if you want to use the thing to simmulate some network
> > > behaviour: xen currently supports only 3 virtual interfaces
> >
> > per domU,
> >
> > > that cripples my virtual network as well.
> > >
> > > harald
> > >
> > > Rachid Abdoun wrote:
> > >> Hi,
> > >>
> > >> I'd like to create a virtual network with xen who have more tha 20
> > >> hosts. Every host has 30MB in his configuration file. The total of
> > >> memory is
> > >>
> > >> 20X30 = 600MB
> > >>
> > >> +
> > >>
> > >> 64MB for the dom0
> > >> --------------------------
> > >> = 664MB
> > >>
> > >> but I only have 512MB on my workstation. Can this virtual network
> > >> possible with xen? Or you need to have enough ram!?
> > >>
> > >> Thank you
> > >>
> > >> _______________________________________________
> > >> Xen-users mailing list
> > >> Xen-users@xxxxxxxxxxxxxxxxxxx
> > >> http://lists.xensource.com/xen-users
> > >
> > > -----BEGIN PGP SIGNATURE-----
> > > Version: GnuPG v1.4.2.1 (GNU/Linux)
> > >
> > > iD8DBQFEmpmOJgyxs71kcx4RAmwEAKCAXO8kKBxdhZrNP5TWhP6QfbQCygCfcewF
> > > GbnXcFYWxm/QqFA/++pCTm4=
> > > =Qm6I
> > > -----END PGP SIGNATURE-----
> >
> > _______________________________________________
> > Xen-users mailing list
> > Xen-users@xxxxxxxxxxxxxxxxxxx
> > http://lists.xensource.com/xen-users
>
> _______________________________________________
> Xen-users mailing list
> Xen-users@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-users

-- 
Dave: Just a question. What use is a unicyle with no seat?  And no pedals!
Mark: To answer a question with a question: What use is a skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a wheel!

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users


 


Rackspace

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