Monthly Archives: March 2013

Alpine Linux and Xen

I’ve started working on Alpine Linux and Xen integration some time ago, when I was working as a research assistant at UPC, my college. We had just bought some blades and we needed to deploy Xen on them easily. We realized this blades contained a SD and USB slot, which could be used as a boot device. As it happened, just at this time there was a thread on xen-users about booting Dom0 from a USB stick. This was quite interesting to us because we needed something that we could replicate easily amongst a set of identical servers, apart from the fact that being able to run your Dom0 from RAM has several advantages, as described on the thread.

This is when I started working on getting a Xen Dom0 on a USB/SD card using Alpine Linux. Most of the initial changes focused on getting the toolstack to build and work using uclibc, the libc used by Alpine Linux (which indirectly lead to the adoption of autoconf in the Xen project, but that’s another story…). After some patching on the Xen side, my work focused on modifying Alpine Linux configuration scripts (alpine-conf) and the image builder (alpine-iso). This added a new target to the Alpine build system, a Xen Dom0 LiveCD/USB. The first official release of this new “flavour” debuted in Alpine Linux 2.4, and contained Xen 4.1. Since then the Xen package has been updated to 4.2, and the configuration scripts have seen several improvements that make running a Dom0 from RAM even easier.

Since I’m no longer working for my college, so I’m also no longer maintaining any servers, I’ve decided to ask some Alpine Linux users to give their opinions on why is Alpine a great choice for virtualization. Here are some of the most notable benefits of Alpine Linux as compared to more traditional distributions:

From Der Tiger:

Even the base system installation of any major Linux distribution (e.g. Fedora, Ubuntu) creates much more overhead and requires higher performance hardware, than a smaller OS like Alpine Linux or Voyage Linux, without any considerable benefit. The implementation and distribution of bug fixes fo any non-kernel related problem takes forever in most popular Linux and FreeBSD distributions, while Alpine Linux has a very active XEN users and developers group supplying both, maintenance to XEN and some degree of support through the Alpine Wiki and this mailing list.

From Florian Heigl:

  1. Size: It has a lean codebase, a very vanilla and modern kernel, which makes it realistic to apply changes without risk of introducing new issues. Examples that are relevant for me were: OpenVswitch. Another example is Flashcache (for example Flashcache is still in Catchup on resilience features like ssd loss handling. There might be a nice and tiny patch that does all I want. It is thus really important to be able to add some patches to flashcache with smaller means than “yum -y upgrade”. On a distro that is mostly outdated plus important patches plus backports, this can be much, much harder, resulting in more frustration on my side, not to mention the difference in “OPEX” for doing those changes. Another example would be taming the monster named ixgbe + vnics. This or NPIV are highly relevant functions for virtualization if you want abstraction “done right”. They’re practically impossible to use on major distros without replacing drivers.
  2. Unique features: I found out about Alpine not as a Xen distro – I found it because I was looking for something that goes beyond the commonly available networking options, be it very old (bridging) or newer (openvswitch+gre as the current practice). I want to be able to run a really virtualized infrastructure and after months found out there is only one distro that offers DMVPN. Next I found out that distro is made with a very network-engineeric mindset, being able to run from RAM and actually designed to make that easy. I’ve in the past made CentOS and later OracleVM (google: xen black magic) run “almost stateless” from a readonly root with a lot of ram-backed tmpfs, and it was as far as you can take those RHEL-based distros. You’ll also be just as far from any idea of vendor support with such a setup. Just imagine my surprise when I found Alpine comes with this designed in and commonly run in a ram-backed mode.
Why is that so important?
Because, let’s be honest, dom0 is not important. Important are those VMs I’m running for other people and that pesky dom0 should be incredibly indestructible and immortal so it can always serve them. No matter if all my disks failed, the networking died or the sun is sending nasty rays upsetting my ECC memory (Yes, Alpine helps me with that too because it has a current kernel and so it can read the MCE data passed from Xen).
This is just a small abstract of all the points given, so I would recommend everyone to give a try to Alpine Linux, each release starting from 2.4 comes with a Xen Dom0 LiveCD/USB that can be found at the downloads page. After all you don’t even need to install it to your hard drive 🙂

SCaLE 11X: A very large very small show

A few days ago, I had the privilege of attending SCaLE 11X in Los Angeles. And for me, it truly was a privilege. It had been over 5 years since I had the joy of attending a true Open Source conference of any real size, and what I found at SCaLE really excited me.

I have a fuzzy recollection of the last few events I attended. Those last few were LinuxWorld Expo events — big, glitzy, commercial shindigs where the press announcements, swag, and booth babes seemed to capture the bulk of the attention. By the time the doors closed at LinuxWorld, it was getting hard to find anyone anywhere who did anything but sell something. That’s why my memory is so fuzzy; truth be told, there wasn’t much worth remembering from those last few shows.

But one show I do remember was the 1997 Atlanta Linux Showcase. A simple pipe-and-drape affair, the show consisted of about 500 geeks (about 490 of which were of the overweight white male variety) meeting on a weekend in Atlanta to discuss this neat new operating system called Linux. It featured such notables as Jon “Maddog” Hall, Eric Raymond, and a somewhat subdued young gent named Torvalds. The booths were nothing to remember. The swag was fairly minimal — mostly Linux CDs (which was cool enough at the time).

But, to me, the story was the attendees themselves. There was a light in their eyes. There was a fire in their bellies. All they could talk about was the code they were either hacking or using. Everyone wanted to make the world better, and there was no one — absolutely no one in the world — in a position to say, “No.” I left that show convinced that the sky was the limit for Linux. These folks had the passion to do something great, even if they didn’t have any corporate funding behind them.
Continue reading