Getting started with Linux-VServer (Linux.com)
Posted Jun 24, 2006 9:47 UTC (Sat) by
drag (subscriber, #31333)
In reply to:
Getting started with Linux-VServer (Linux.com) by saneax
Parent article:
Getting started with Linux-VServer (Linux.com)
Depends what you mean by "sweetly"
Xen has the advantage of higher compatability and lower administrative effort by simply running multiple servers.. It's the same as running multiple machines, but it's with just one machine.
Vserver isn't realy a virtual environment though. At least not like Xen.
Vserver is realy like chroot on steriods. Much more secure, much more complete. You can control what sort of access is allowed to special files and /proc. You are suppose to be able to allow users to run root inside the chroot environment and not worry about them breaking out of it.
The principal advantage of Vserver is that you have much more efficient utilization of resources. Even though Xen does fast 'para-'virtualization, there is still some overhead. Everything is handled by the same server. I/O is handled more intellegently. Memory is handled more efficiently. Shared libraries are still shared libraries (I beleive).
With Xen if you have two servers you have to devide up the memory in a fairly non-dynamic fasion between the two systems. Any memory one system doesn't use the other one can't take advantage of. This isn't a problem with Vserver. One kernel, one set of device drivers, one memory space, one scedular you have deal with for disk I/O.
That sort of thing.
Xen of course is nice so you can have even stronger seperation between systems. You have the ability to run different operating systems. With vserver you can't realy do that.
So vserver is apropriate were Xen isn't.. and visa versa.
For instance on one low-buck demostration at my work I setup a small webserver to run in a vserver environment. It was Debian stable..
This vserver environment was located on a DRBD share, which allowed me to keep a mirrored copy of the partition located elsewere on the the network.
Between the two mirrors I used Linux-HA so they could keep track to the vserver environment.
So for the demo I booted up one machine. It started, then started the vserver, and I could access the web server. Then I booted up the second machine and waited for the drbd share to resyncronize.
After that was done then I literally pulled the plug on original machine. The second drbd share became the primary one, the Linux-ha stuff detected the other system was done and ran the scripts to fsck the drbd share, to mount it, then startup the vserver. Within 15 seconds the webserver was back up and fine with absolutely no human interaction. Then when the original machine came back online that resynced automaticly and prepared itself to take over in case the second machine went down.
Now with Xen I could of definately done it. I've used Xen before and I like it a LOT.
But it would of been a lot more work, it would of required more extensive kernel modifications.. Also the machines were old 200mhz dells with 64 megs of RAM. I could of literally run dozens of vserver environments on those systems.. With Xen I would of had a very hard time running more then 2.
Xen can do stuff that vserver can't do (other then just running multiple different operating systems), too.
For instance a fellow I know migrated LIVE Xen images from one geographical location to another in order to avoid those hurricanes from the other year. There was NO DOWN TIME. Not even something that could be measured in seconds. That stuff is very very cool.
(
Log in to post comments)