Thursday, May 04, 2006

The Virtu(e) In Virtualization

For a change am blogging about tech stuff. You have been warned, proceed at your own risk :).

So, whats the deal with Virtualization, whats all the hype about ? Well you find out :).

For "the too lazy to click a link to read about stuff" types Virtualization is a cool way to simulate a compltete computer inside software. Among its many benefits to an enterprise virtualization can help an organisation establish virtual server farms, virtual clusters & cut down h/w costs at an unprecedented scale. Apart from the obvious advantages this also means saved space in server racks & more energy efficient server rooms.

But heck, forget the enterprise, what about an average programmer like yours truly? Can virtualization help me ? Turns out it can :).

My work involves tinkering with the block io layer in the Linux kernel. As it turns out, I manage to crash my machine once every debug cycle, ok not that frequently ... but you get the idea. Also, once in a while the crash is bad enough to warrant a complete re-installation.

To get the machine back to a sane state steals a lot of cycles which I'd rather spend debugging my code ( and getting paid more ? ).

Enter virtualization. I set up a virtual machine (VM) to use as a development platform. Once that is done, I take a "snapshot" of the machine in its sane state and am all set to roll.

If I now crash the (virtual) machine I just have to hit the magic "revert to snapshot" button and voila I have the machine back to the sane state. Lots of productivity increased, time saved, frustrations avoided.

Seems like a win win situation ? ... There have to be tradeoffs right ? Obviously speed is one. Support for emulated devices is another. But if you are not too concerned with these, then this particular feature totally rocks.

Also, I've deployed this stuff on my development machine which is not comparable to the big-iron servers that are usually used to deploy VMs in an enterprise. On such machines, the VMs might give you near native performance and speed ceases to be an issue.

I've been using VMware for a long time in conjunction with my kernel development and it sure has saved me hours of debugging and this post comes out of the gratitude I feel towards this particular software innovation :) .

Xen is the rage these days, but I haven't tried it out yet. Maybe one of these days I'll see that in action too.

0 reactions: