On my Ubuntu 8.04 machine I run a Windows virtual machine to allow me to use Adobe Lightroom for image editing.  I primarily use Sun xVM VirtualBox for this, thanks to the great price (free)

Until a few days ago I hadn’t realised that VirtualBox does not currently have SMP support, which I believed may explain why I was getting particularly bad performance inside the VM.  As a result I decided to try VMware Workstation, which does have SMP support

The result was actually worse… but I changed a couple of other variables too (big ones, like installing Windows Vista instead of XP).  Instead of jumping straight back to VirtualBox+XP I decided I’d have a look at what was actually going on

It turns out that this wasn’t going to be as easy as I’d hoped… io profiling in Linux is limited to say the least… beyond top for the iowait value and iostat, you can’t really see what’s going on

Just as I was beginning to despair I decided to see what Linux had to match Brendan Gregg’s excellent iotop DTrace script and it turns out there is a Python equivalent that uses experimental new io accounting available in Linux kernel 2.6.20 and above

The Linux iotop (which will be available in the Ubuntu 8.10 repos) did allow me to determine which threads were reading/writing to disk.  The net result is that I now know that both vmware-vmx and smbd were making heavy use of my home disk, most likely due to Lightroom building 1:1 previews for all of the images in my catalog

Thanks to some very clever individuals, Linux is slowly getting some of the features that Solaris has had for some time.  But wouldn’t it just be easier to port DTrace to Linux?