Change Parallels Desktop 1.0's caching strategy

Jun 26, '06 07:30:05AM

Contributed by: drewthaler

In my day job I have to run Windows XP a lot. I've been using Parallels Desktop extensively for the past several weeks, and although I am really happy with it, something about it bothered me. Finally I realized -- it was causing a ton of VM paging on my brand-new MacBook with 2GiB of RAM! Something's just not right.

And in fact, there is a problem with Parallels Desktop 1.0. It uses Mac OS X's default caching strategies for huge files such as the operating system images (hard disk files) and SAV files (session saves). Over time, almost all of your RAM will fill up with data from these files, leaving little room for your other applications. If you've ever converted a hard drive image with Image Tool while doing something else at the same time, you'll know exactly what I mean.

I contacted the Parallels team last week to let them know about the problem, but haven't heard back from them at all. Perhaps they're all on vacation. Frustrated and needing a short-term fix to preserve my own sanity, I wrote PD Tweaker.

PD Tweaker is a tiny plugin for Unsanity's Application Enhancer that loads only in Parallels Desktop and Image Tool, and then tells Mac OS X to use a better caching strategy for these files. While I was in there, I noticed that Parallels was not flushing the OS files all the way to disk, leaving them a little more prone to data corruption in a power failure. So I fixed that too. You can read more about the rationale for both of these changes on the download page. The end result is a Parallels Desktop experience that is much smoother and does not slow your Mac down at all.

While the Parallels team may soon incorporate both of these fixes into their application, if you just can't wait until that point, then give PD Tweaker a try and watch how much faster your Mac feels when you run Parallels. It's freeware and the source code is available under a simple Creative Commons attribution license. Unsanity's Application Enhancer 2.0 is also required, but that's free, too.

[robg adds: I tested this on my mini, and it did indeed seem to make for a better Parallels Desktop experience, especially with many virtual machines running. You will have to use Application Enhancer, which may bother some people (AE allows code to be inserted into running programs that modifies their behavior). There is, however, a simple uninstaller if you want to remove AE from your system after testing PD Tweaker.]

Comments (9)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20060622090404212