# Gentoo and Xen current status

## AchilleTalon

Anyone out there can tell us what is the current status of Xen with Gentoo?

I mean, the xen-sources tree is masked since September 2008, does it mean the kernel is not longer patched for Xen in Gentoo? If yes, any plans for the future or it is left asis and unmaintained?

Should I look elsewhere for virtualization with Gentoo? VMware, KVM or anything else?

TIA

----------

## Mad Merlin

Xen has quickly fallen out of favour for virtulization on Linux. In my eyes, the reasons are:

- requires special Xen patches to the kernel, which only apply to 2.6.18

- 2.6.18 is ancient, doesn't support any modern hardware

- special Xen patches break ACPI and makes 3D acceleration for the host require painful contortions, if it works at all (thus not suitable for a laptop or a desktop)

- hardware accelerated virtualization (with VMX or SVM) is an afterthought

At this point I wouldn't recommend Xen for any new deployments, although existing servers which are dedicated to Xen are probably humming along just fine.

I would quite strongly recommend KVM (emerge qemu-kvm), it has none of the above problems and is disgustingly simple to start using. Try this for example:

```

qemu-img create gentoo-kvm.img 20G

qemu-kvm -m 512 -hda gentoo-kvm.img -cdrom install-amd64-minimal-20091203.iso

```

You can, of course, substitute the iso I have there for any bootable CD/DVD.

----------

## trikolon

that is not all correct.

in portage are soem suse backports for kernel 2.6.29 and xen 4.0 is planed to release at the end of feb. it will has a new kernel (.31 or .32) and will have features like acpi and so on..

----------

## Mad Merlin

 *trikolon wrote:*   

> that is not all correct.
> 
> in portage are soem suse backports for kernel 2.6.29 and xen 4.0 is planed to release at the end of feb. it will has a new kernel (.31 or .32) and will have features like acpi and so on..

 

That may be true, but ultimately all of that should have worked from day one, the fact that it didn't is one of the major problems with Xen -- it's the wrong approach to virtualization. In a related note, that's the most cited reason in the kernel community for why Xen won't make it into the vanilla kernel in its current state. If that's not enough, RHEL has discontinued new development on Xen and is now supporting KVM instead, likewise for IBM.

Don't get me wrong, I'm not saying Xen is useless and has no place in today's world, but rather that its place is shrinking by the day. 4 years ago Xen's future looked very bright, it was the only game in town for running a full Linux system on Linux at anything resembling a tolerable speed. However, hardware changed and brought us shiny new goodies in the form of VMX and SVM, and Xen didn't really adapt. The rest is history.

----------

## linuxtuxhellsinki

Don't get me wrong, but if you don't need 3D (or windows) Xen outperforms all of the others and it doesn't need VMX/SVM cpu (for Linux).       But I'm also looking for KVM to evolve and narrow the cap.

----------

## Mad Merlin

 *linuxtuxhellsinki wrote:*   

> Don't get me wrong, but if you don't need 3D (or windows) Xen outperforms all of the others and it doesn't need VMX/SVM cpu (for Linux).       But I'm also looking for KVM to evolve and narrow the cap.

 

I don't know that Xen actually outperforms KVM these days. In my experience, CPU intensive apps run at 80-85% the speed of the underlying hardware with KVM, which is really quite fast in my books.

It likely depends heavily on your particular application and hardware, as there's many benchmarks out there that conclude in favour of both KVM and Xen. Also, most of the benchmarks are old. It'd be interesting to see KVM 0.12.2 on 2.6.32 (or 2.6.33 in a week or so) vs whatever the most recent release of Xen is.

----------

## Mad Merlin

Actually, disregard that 80-85% figure... I had done a quick off the cuff test without realizing that my CPU heatsink had partially fallen off and my CPU was throttling itself... I've since noticed and fixed that.

Anyways, this time around, the KVM VM is running at ~99.5% of the host's speed for a purely CPU bound task... which is downright impressive.

----------

## cach0rr0

 *linuxtuxhellsinki wrote:*   

> Don't get me wrong, but if you don't need 3D (or windows) Xen outperforms all of the others

 

even OpenVZ? I haven't looked at any of this in nearly a year, but I'm about to rebuild my current hardened rig to be a standard gentoo build with a bunch of hardened guests. Curious how things look nowadays.

----------

## linuxtuxhellsinki

 *cach0rr0 wrote:*   

>  *linuxtuxhellsinki wrote:*   Don't get me wrong, but if you don't need 3D (or windows) Xen outperforms all of the others 
> 
> even OpenVZ? I haven't looked at any of this in nearly a year

 

Nope,  but that's different and I meant 'full virtualization' like vmware/kvm/xen where the paravirtualization was the point why it performs better than the others and it doesn't need VMX/SVM cpu (for Linux) was the other    :Rolling Eyes: 

Edit:  And one thing which bother me with KVM is that why there is so "mixed" guest support with different versions of distros ?

http://www.linux-kvm.org/page/Guest_Support_Status

----------

## Mad Merlin

 *linuxtuxhellsinki wrote:*   

> Edit:  And one thing which bother me with KVM is that why there is so "mixed" guest support with different versions of distros ?
> 
> http://www.linux-kvm.org/page/Guest_Support_Status

 

Most of those test results are with kvm-88 or older (ie, quite old now), I would guess that most if not all of them work now. FWIW, kvm-88 and older were regular development snapshots.

----------

