Thursday, June 22, 2006

PD Tweaker 1.0  

For all you fans of Parallels Desktop out there, I've released a quick little hack to fix some problems in their initial release (aka: build 1848). It's called PD Tweaker.

It's very simple and only does two things.

  • Optimizes caching for HDD and SAV files

    Caching large files is actually harmful to your Mac's overall performance. HDD files do not need caching because the client OS will already have a cache layer. SAV files are streamed in and out and don't need to reside in the disk cache.

  • Always writes HDD and SAV files all the way to disk

    Your data is precious. Especially data like a HDD file that took you hours to install and configure. Shouldn't you treat it that way?

I wrote it primarily because although Parallels Desktop is a great product, I got fed up with the way it wasted my entire 2GB of RAM with the HDD file and made my machine virtually unusable. With PD Tweaker installed, you will not only notice greatly improved performance from your Mac as a whole, but your HDD files will be safer from data corruption as well. And best of all, it's entirely free and the source code is available.

Download Now!

It uses Unsanity's Application Enhancer 2.0 to do its thing.

More information (including some rationale and a technical explanation) is available on the PD Tweaker website. What are you waiting for? Go there now!

19 comments:

  • Anonymous said...

    Nice icon! :-)

    --rentzsch

  • Drew Thaler said...

    Yeah, that's the other thing. It has what I think is one of my favorite icons of all time.

    And as all programmers know, really, it's all about the icon. :-D

  • Anonymous said...

    I will not patch on OS X... Patching is wrong... but...
    I will not patch on OS X... Patching is wrong... but... but...
    I will not patch on OS X... but...
    I will not patch on OS X... but... but...
    I will patch... oh yes... oh yes... oh... oh!!!

  • Drew Thaler said...

    It's funny. Despite a small amount of pushback from dinosaurs at Apple, patching is actually infinitely better and safer on OSX these days than it ever was on OS9.

    With APE I have a single point of entry for creating a patch. I can target my patches to a single app by CFBundleID if I want to. Patch preferences are simple. Everything is live-updating so if you say "disable" it disables immediately and everywhere. And on TOP of all that you don't have to worry about all the crap you had to worry about on OS9. Remember all this stuff?

    * What are the 68K register calling conventions for this trap? Are params on the stack or in registers?
    * How do I generate a MixedMode declaration for that?
    * Okay, now what are the implicit undocumented other behaviors that other people's buggy code rely on?
    * Great, my patch is loaded. But is [X] initialized yet, or do I have to patch WaitNextEvent and wait til the Finder is launched?
    * Is it safe to allocate memory, or do I have to patch WaitNextEvent and do it there?
    * Want to handle live updates? Oh look, another patch on WaitNextEvent.

    And everybody's favorite:

    * Oops, I made a typo and now I have to reboot my entire development machine.

    I don't care what Bertrand or the CG guys think. Compared to all that stuff, APE is a dream. :-)

  • Anonymous said...

    Try parallels on a case-sensitive disk. I dare ya.

    Jonathan
    jonathansaggau.com/blog/

  • Anonymous said...

    Mine doesn't seem to work. I'm still getting a large amount of paging. In the APE pref panel, PD Tweaker is crossed out in the Applications tab.

    And no, I didn't add it to the exclude list.

  • Anonymous said...

    Maybe a dumb question, but... how do I install it? After unzipping, I see a folder called PD Tweaker.ape that contains other folders. What goes where? I've installed Application Enhancer.

  • Anonymous said...

    Drew,
    Thanks for developing this. I'm always excited to see how vibrant the Mac developer community is. A couple questions, though:

    (1) I don't currently have APE installed. After reading a post on Unsanity's blog I'll buy that it's not the evil some seem to think (mostly because it runs at the app level rather than the OS level), but it does run constantly as a daemon so I wonder: What kind of performance hit incurred by APE on the entire system, so I can decide if it's worth the periodic improvement in Parallels (which I only run sometimes)?

    (2) If I still have a decent chunk of Inactive and Free memory in Activity Monitor while using Parallels, is this something I'll benefit from?

    Thanks.

  • Drew Thaler said...

    "Mine doesn't seem to work. I'm still getting a large amount of paging. In the APE pref panel, PD Tweaker is crossed out in the Applications tab."

    If Parallels Desktop is crossed out in the Applications tab, then it sounds like perhaps it's in your master exclude list. After you select "Application Enhancer" in System Preferences, switch over to the Master Exclude List tab and remove the entry for Parallels Desktop if it's there.

    PD Tweaker itself does not use an exclude list -- it only affects its two target applications.

  • Drew Thaler said...

    "Maybe a dumb question, but... how do I install it? After unzipping, I see a folder called PD Tweaker.ape that contains other folders. What goes where? I've installed Application Enhancer."

    It sounds like several people have seen this. Normally the .ape is double-clickable, but it might not be after a fresh install of APE.

    If it isn't, you can do one of the following:

    - run System Preferences, select Application Enhancer, and add it by clicking the "+" button
    - manually install the folder into "~/Library/Application Enhancers"
    - run this command in Terminal to re-register Unsanity's application and make double-clicking work again. /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -v -f /Library/PreferencePanes/Application\ Enhancer.prefPane/Contents/Resources/Application\ Enhancer.app

  • Drew Thaler said...

    dave:

    (1) "What kind of performance hit incurred by APE on the entire system"? Very little. aped only wakes up when a GUI application is launched, and if you only have PD Tweaker installed it will quickly decide that there's no work to do and go back to sleep. It's also responsible for sending update messages to APEs while you have the APE preference pane open.

    (2) "If I still have a decent chunk of Inactive and Free memory in Activity Monitor while using Parallels, is this something I'll benefit from?"

    I suspect you still might notice a difference with PD Tweaker. It's unfortunately difficult to benchmark, but the qualitative difference is noticeable. I can say that unnecessary disk caching does waste CPU resources, as well as RAM, since OSX will be spending CPU time copying data into the disk cache needlessly. I've noticed (and had users report) that Microsoft Visual Studio's responsiveness improves with PD Tweaker installed.

    In the end, though, it's all a matter of personal preference -- I'm all about people doing the right thing for their individual needs. If you feel the performance is fine as-is, then you probably don't need PD Tweaker. The default caching strategy that Parallels uses is not going to make anything crash or fail -- it just makes things slower than they could be.

  • Anonymous said...

    "If Parallels Desktop is crossed out in the Applications tab, then it sounds like perhaps it's in your master exclude list. After you select "Application Enhancer" in System Preferences, switch over to the Master Exclude List tab and remove the entry for Parallels Desktop if it's there.

    PD Tweaker itself does not use an exclude list -- it only affects its two target applications."

    It isn't in the list there.

  • Drew Thaler said...

    "It isn't in the list there."

    Then I'm afraid I can't help ... I don't know any reason other than an exclude list for why it would be actually crossed out in APE. Unsanity may be able to help you directly. They are usually pretty quick about responding. http://www.unsanity.com/contact/

  • Anonymous said...

    Drew, I also have the Crossed-out Parallels in my list. I suspect that it is because I have version PWS2.1 of Parallels rather than v 1.x

    Is Tweaker still needed in version 2, I assume that it is - so, can you update it to recognize and install. Thank...Les

  • Drew Thaler said...

    Well, now would you look at that. I've been calling it 1.0 because I could've sworn that it was actually called 1.0 by Parallels (the company) at some point. Maybe it was the betas and RCs that were 1.0RCx, or maybe I'm just flat-out wrong because I've been juggling release versions of my own software in my head lately. :-)

    To be explicit: the version that it actually improves is the current version of Parallels Desktop for Mac -- sometimes still called Parallels Workstation -- which is identified in the about box as "Build 1848", in the CFShortVersionString as "PWS2.1", and in the CFBundleVersion as "2.2.1848.0". This is the only official released Mac version of Parallels at the time of this writing.

    So I've misspoken -- it's not 1.0 that it affects. It's the first and only release, which is not 1.0 but is rather 2.1 or 2.2 depending on which source you look at. :-)

    I don't have any further information on Parallels being crossed out in Application Enhancer. It'd be best to contact Unsanity to see what they can find out about it: http://www.unsanity.com/contact/

  • Anonymous said...

    Sorry for the lame question, but how do I know that it's running? The install process went fine, but I see no evidence of PD Tweaker in the Application Enhancer panel.

    Thanks.

  • Anonymous said...

    Hi,

    Great application. The problem some folks are reporting where Parallels is crossed out in the applications tab -- I'm getting the same thing. I don't know if its something peculiar to some machines or installationsof parellels, but it definitely seems that at least some people are running into the same problem. Thought you should know!

  • Anonymous said...

    I'm getting it too, the old crossed out, undeletable parallels application in exclude list on APE.

  • Anonymous said...

    Has anyone got this working iin tiger 10.4.7? Installing APE doesn't even bring anything up in the system preferences window. I can't double click the .ape folder, running the above terminal line doesn't make a difference. Terminal retunrs: "lsregister: processing /Library/PreferencePanes/Application Enhancer.prefPane/Contents/Resources/Application Enhancer.app"

    Coping the .ape folder into /Library/Application Enhancers/ doesn't do anything either.... :(