Measuring VM Performance with SunSpider

In my previous post I’ve been using the SunSpider JavaScript test in an attempt to get a feeling for the performance of smartphones compared to PCs. On my PC I am using quite a number of virtual machines and guest operating systems for various purposes. Using the SunSpider test is also quite revealing of how virtualization impacts performance of the guest OS.

My hypervisor of choice is VirtualBox and it seems that the operating system it handles best as far as CPU performance is concerned as a guest OS is Windows XP. On the host system running Ubuntu 12.04 the SunSpider benchmark results in a score of around 420 ms with Firefox 16.0.2. Running the same test with the same browser in the virtualized Windows XP results in a score of 455 ms, i.e. only slightly slower.

On a Windows 7 guest OS, however, the score drops to 604 ms, quite a bit slower. And finally, an Ubuntu 12.04 guest also only reaches a score of 607 ms.  In other words, while the Windows XP guest almost incurs no slowdown, Windows 7 and Ubuntu are 50% slower. That is very strange and I haven’t figured out the reason for this yet.

Also, I can rule out that the SunSpider tests gives different results in different operating systems running natively. On another computer I have Windows Vista and Ubuntu 12.04 installed natively and the SunSpider results with Firefox 16.02 give almost exactly the same value.