April 19, 2007

Mac VMs Revisited

Filed under: Computer Software — mike @ 6:54 pm

Acomplia Online Buy Prednisone Motilium No Prescription Antabuse For Sale Elimite Generic Buy Nexium Online Propecia Without Prescription Nizoral No Prescription Aldactone For Sale Hoodia Generic

I received my shiny new 8-core Mac Pro today, and boy is it FAST! I’ve been working lately on a C++ project in Xcode (libpion). It’s new and therefore was already building fairly quickly on my MacBook Pro. But on my new machine I hit “build”, watch all eight CPU bars jump up, and then — almost instantly — it’s done. I haven’t been this excited about a new tech toy since Santa gave me (the original) Game Boy for Christmas! =)

In my last post on Mac Virtual Machines, I ran a few tests to compare VMware Fusion & Parallels for Mac. Eric pointed out a few tips in his comments that he felt would help improve the accuracy of these tests, so I decided to run them again on my new toy.

I think the most helpful thing I learned from Eric was that the idle CPU performance problem was not being caused by the VM software, but rather by the guest OS I was using (CentOS 4.4). Changing the “HZ” setting in my Linux kernel from 1000 to 100 drastically reduced CPU usage in all my test cases (to under 5%, which is right where I would expect it to be)! I strongly recommend anyone running Linux inside a VM to make this change. I was too lazy to re-compile any kernels, so I installed the third-party RPMs available here instead.

On Eric’s advice, I also changed the “aiomgr.buffered” setting inside of Fusion’s configuration file. Note that this is not currently an option available inside Fusion’s UI (at least I couldn’t find it anywhere); you have to manually add the following line to the ~/Library/Preferences/VMWare Fusion/config file:

aiomgr.buffered = "TRUE"

Here’s the results of my latest tests:

Test Machine: Mac Pro 2x quad-core @ 3Ghz
Memory: 8GB 667 Mhz DDR2 SDRAM
Disk: 2x 500GB 7200 RPM
Software: Mac OS X 10.4.9
VM OS: CentOS Linux 4.4 (all the latest patches via yum)
VM Memory: 512 MB
Test: Build a moderately-sized C++ software package with G++ (make -j2)

First test: Parallels Build 3188 (single-core, UP kernel)
Boot time (to X login screen): 0 min 33 sec
Build time (real): 2 min 58 sec
Build time (user): 2 min 10 sec
Build time (sys): 0 min 45 sec
CPU when idle: 3-4%

Second test: VMware Fusion Beta 3 (single-core, UP kernel)
Boot time (to X login screen): 1 min 3 sec
Build time (real): 2 min 53 sec
Build time (user): 2 min 16 sec
Build time (sys): 0 min 31 sec
CPU when idle: 2-3%

Third test: VMware Fusion Beta 3 (dual-core, SMP kernel)
Boot time (to X login screen): 1 min 3 sec
Build time (real): 1 min 46 sec
Build time (user): 2 min 25 sec
Build time (sys): 0 min 29 sec
CPU when idle: 4-5%

I suspect that the “idle CPU” problem severely threw off my previous numbers. After getting everything tweaked properly, the performance of Fusion’s latest beta is slightly faster than that of Parallels when a single processor is used (with the odd exception of boot time…) With two processors, Fusion cuts the build time by 40% — an outstanding result considering that 50% would be the best theoretically possible.

Now my only question is, “what to do with these six extra cores?” =) Hopefully Fusion’s future releases will support all that I can throw at it. Not that I really need more than two. In fact, it’s nice to be building software inside a VM and still have tons of processing bandwidth available to work on other things.

In any case, I can see myself converting over to VMware’s Fusion soon. Considering all the things it has going for it (long history, widely-used format supported across many platforms, Linux tools, vSMP), I expect that Parallels is going to have a hard time keeping their Mac VM market share.

3 Responses to “Mac VMs Revisited”

  1. mikedickey.com » Mac Virtual Machines Says:

    […] due to a few things Eric points out below in the comments. Please see my new post entitled “Mac VMs Revisited for more accurate […]

  2. Lon Says:

    Nice rig! I’m still chillin’ with some PowerPC Macs.

    Glad I found your blog. Hope life is treating you well. Rock on!

  3. Andy Davidson Says:

    For those people who do not run an RPM distro, but run Debian instead, you can download a 100MHz clock kernel from my site. We also see the improvements you mention.

    http://www.andyd.net/index.php/2007/08/16/making-parallels-less-of-a-cpu-hog-when-idle/

Leave a Reply

You must be logged in to post a comment.