Still catching up from Red Hat Summit…

Red Hat Summit was an amazing event for Red Hat, open source, and open virtualization.

I’ll be writing up my thoughts real-soon-now, but in the meantime, take a look at this video of my friend Andy Cathrow and me talking about the value of Red Hat Enterprise Virtualization and the roadmap for RHEV 3.1. I’ve been told it’s good, but honestly I can’t stand to watch myself on video so I’ve not watched it.

I present a couple of interesting slides towards the end of my presentation on value for performance that I’ll talk more about this week.

KVM is still Linux. Xen is still not.

It’s been gratifying to see lots of folks finding my site a couple of months after my first post, reading the article “KVM is Linux, Xen is Not“, and retweeting it to a broader audience. I seem to have hit a nerve, and I hope I have provided some value in helping folks understand the differences between KVM and Xen.

If you’ve read in the last couple of weeks, you probably noticed that posting has attracted some less than positive comments from Xen adherents.

All cards on the table: I am a KVM adherent. I work for Red Hat, and I work on a KVM-based product. Moreover, I personally believe that KVM is the best technology going forward for open source virtualization.

My goal in the post was to point out the architectural differences between Xen and KVM, before and after the inclusion of some Xen code beginning with Linux 3.0. And yes, to poke some fun at Citrix and Oracle.

Based on the recent comments I’ve gotten, I thought it was worth writing a short post before going on to other topics.

I was tempted to do some editing to the original post (a footnote here, a qualification there), but aside from fixing a couple of incorrect links, I decided to let it stand as originally written and posted for better or worse.

I do apologize for initially pointing to the incorrect article as the attribution link for Simon Crosby’s quote. I have made that correction in the post.

But unless there are technical inaccuracies, I am not making any further edits. You the reader can decide if I was fair, pushing things to make a point, or way off base and need to apologize for muckraking.

Let’s step back in time a bit…

Now, the post is a bit out of its historical context. After all I wrote most of it in July of 2011 for a different forum to address a real issue–the confusion about what Xen being “accepted” into Linux actually means.

Confusion still reigns

Almost a year later, people still ask what that announcement from Oracle and Citrix means. And still the overwhelming impression that people come away with from reading the coverage and talking to sales people is that Xen is now integrated into Linux, and that KVM’s advantages in that regard are moot.

Addressing that confusion was the ultimate intent of the post.

Was it a bit cheeky to call out the Oracle and Citrix at the top of the article? Sure. Guilty as charged. It helped get the post out to a broader audience than I  expected for what at its heart is a relatively dry but important architectural distinction.

Is there anything technically inaccurate in the post? I haven’t heard of anything yet, but I commit to immediately correct any technical inaccuracies.

Did I not give the people behind the posts the benefit of the doubt? Maybe. I admit I was fixated on the inaccuracies and FUD circulating at the time.

I will say this: if you understand enough about the architecture of Xen, of KVM, and the process of including code in the Linux kernel, then reading in full the cited articles will give you an accurate account of what the Xen announcement means for Xen and for KVM.

If however you don’t know hypervisor architectures that well, or you only read the press and second hand accounts, or what a sales person told you, or the headlines and soundbites, then you probably got the wrong impression. This article was written for you.

Enough said.

I’m moving on to other topics. Feel free to comment.

KVM is Linux. Xen is Not.

Last year there was a lot of talk from Citrix, XenSource, and Oracle about the acceptance of certain Xen code and drivers into the Linux 3.0 kernel. I still hear it today. They’re implying that it means the Xen has been as tightly integrated into the Linux kernel as KVM. And I’m here to tell you that they are wrong.

Here’s what Oracle and Citrix have said on the matter:

“I’ve heard over the last few years, competitors use “There is no Xen support in Linux” as a tagline to create FUD with the Xen userbase and promote alternatives. Well, it’s all there people.”Wim Coekaert, Oracle

“During all the fuss of Citrix Synergy last week, an event of pretty earth-shattering importance occurred in the open source world: all key Xen code was accepted into the Linux mainline kernel.” Simon Crosby, Citrix

Wrong!

The Oracle and Citrix marketing on this issue are misleading to say the least. It implies that the recent acceptance of some Xen enablement code into the Linux kernel equates to integration, or that the Xen architecture doesn’t matter now that some of  their code is in Linux.

KVM is still the only Linux kernel-integrated hypervisor technology. End of sentence. End of story.

There is no special KVM enablement needed in the Linux kernel. KVM is integrated into the Linux kernel. KVM uses Linux for everything from device management to CPU scheduling, memory page sharing, better algorithms for making use of lots of cores and lots of memory, and tying into all the hardware virtualization technology AMD and Intel have been building into x86 for the past 5 years.

Xen is no more mainline or mainstream today in 2012 when it comes to Linux than it was in 2007 when KVM was accepted into the Linux kernel, or 2009 when Red Hat decided to move forward with KVM instead of Xen and integrated KVM into RHEL.

OK, then, what’s the Real Scoop?

Xen has still not been accepted (and probably never will be) into the Linux kernel, and cannot leverage directly Linux technologies such as transparent huge pages, CFS scheduler, paging, memory overcommitment with KSM, etc. for its hypervisor technology. You still need to install the Xen kernel on bare metal and build a special VM called a Dom0 to manage it and to provide device drivers. And you still have the suboptimal Xen architecture with Xen-Dom0-DomU. See the ugly diagrams below for more details.

The announcement of Xen and Linux 3.0 means two (and only two) things:

1. The paravirtualized drivers that Xen uses will be integrated into Linux starting with 3.0. This means that just like virtio (KVM/Libvirt) and pv-scsi (VMware), the pv-ops drivers used for accelerated disk and NIC will be available in any Linux 3.x+ guest without having to integrate drivers. This leaves Microsoft Hyper-V alone in requiring integrating drivers for guests.

2. A Linux 3.0 or higher guest can be used unmodified as a Dom0. Remember Dom0 is where the console operating system resides and is also a slave for certain IO from the guests. It is not Xen itself. Xen still resides on the bare metal and is still a separate project from Linux that has to duplicate effort to support hardware and new virtualization technologies.

In summary, it will be slightly easier to use future versions of Linux guests with current and future versions of Xen, and it will be slightly easier to use future versions of Linux as a Dom0 for current and future versions of Xen.

If you want to use a pre-3.0 Linux as a Dom0 it won’t work without modifications. If you want to use pre-3.0 Linux guests, you still need to hack in the drivers.

Not such a big deal after all. So does this change anything for KVM?

In a word, No.

One of KVM’s strengths is that it is integrated into the Linux kernel and therefore can utilize Linux features for things that hypervisors do besides just being a hypervisor.

Xen hypervisor is still a separate project and a completely separate code base, and features that KVM can use for virtualization and inherits from Linux (scheduling, paging, frequency scaling and hardware enablement, for example) will still need to be separately implemented in Xen. This is part of the design of Xen and is not going to change.

KVM Architecture

Elegant, isn’t it?

KVM Architecture

Xen Architecture

What a mess…

Xen Before Linux 3.0

Xen After Linux 3.0

What did they say? Word for word. I’m taking down names.

Here’s links to the various blogs Citrix and Oracle have put out:

http://blogs.citrix.com/2011/05/30/xen-celebrates-the-final-step-of-a-four-year-odyssey/

http://blogs.oracle.com/wim/entry/linux_mainline_contains_all_the