« Old sci-fi TV shows on DVD | Main | Customer service? »

Friday, February 16, 2007

Virtualization and platform freedom

I've been a big fan of running OSs in virtual machines for some time. Virtualization is very useful when you need an isolated environment for evaluating software, a QA test bed encompassing multiple OSs and versions and for a variety of other purposes.

Until fairly recently, virtualization often incurred a minor, but very real, performance penalty. This isn't surprising given that you're running one OS inside of another and each OS is designed to be the sole guardian and caretaker of a computer's hardware resources. Previously, a typical hardware setup might include a notebook with a fast single-core CPU, 1 GB of RAM and a fast hard drive. The host and guest OSs might split the RAM evenly and they'd probably share the same hard drive. To run the guest OS, you'd close all possible apps in the host OS to prevent CPU starvation. In either case, the guest was likely to become starved for RAM if anything too intensive was attempted. Still, this approach worked well enough to make virtualization a very useful tool.

Things have evolved rapidly (or perhaps they've been more intelligently designed - doh!). Now dual-core CPUs with hardware support for virtualization are common, RAM is cheaper and it seems like everyone has an external Firewire drive or three. When virtualization is set up correctly on a modern platform, it's difficult to tell whether you're working with the host OS or the guest OS, provided that accelerated graphics (esp. 3D graphics) don't come into play.

One caveat of virtualization is that disk fragmentation is inevitable, prevalent and cumbersome to correct. When you defrag the guest OS drive, the virtual disk image on the host becomes fragmented, and vice-versa. The only real way to ensure a proper defrag is to defrag the guest, move the disk image to another drive and then copy it back. Perhaps we'll soon see defragmentation products which maintain some kind of coordination between virtual machines and the host environment. This would be particularly useful for virtualized servers.

My current setup is a Mac mini with a 1.66 GHz Core Duo CPU, 2 GB RAM and a 7200 RPM drive. My XP VM is a non-expanding image on an external Firewire 2.5" 5400 RPM drive (no external power source). The disk image is the only file on the external drive. I run Parallels Desktop for Mac as my virtualization package and the 2 GB of RAM is evenly split between OS X and XP. The mini is a great platform. It's small, attractive, quiet and energy-efficient. It costs me about two dollars per month to run at a 50% duty cycle.

I don't baby my XP setup in any way. I use it to make my living. I expect it to compile code quickly and to efficiently run any and all apps which I need to get my work done - all in its 1 GB of RAM (contrary to popular belief, 1 GB of RAM is plenty for a Windows dev machine if it's properly tuned and maintained). In the mean time, I do all my emailing, IMing and Web surfing in OS X. Response on both sides of the fence is crisp, even under load. Multiple cores really make a difference here.

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00d83467bb8769e200d83574acd369e2

Listed below are links to weblogs that reference Virtualization and platform freedom:

Comments

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment