David S. Ackerman web cowboy (+ software development tales of the wild west…)

23Sep/100

How to make Parallels and IE8 Snappy!

At last, I have conquered thee, Parallels! So, initially, I had really long load times when launching a Parallels VM from a suspended state. I looked at my disk I/O and it was fighting for a measly 6 MB/s. I tracked that down to an issue with Mozy, which is the cloud backup solution that I use. One part of the solution was to upgrade my client from 1.7.3 to 1.8.0 (not incredibly obvious since they only had the 1.7.3 client on their download page, and you had to read through forum posts to find a link to the 1.8 beta – though looking at their downloads page now, it looks like they've finally put up the 1.8 version). The other thing I had to do was tweak the /Library/LaunchDaemons/com.mozy.backup.plist file to ad:


<key>LowPriorityIO</key>
<true/>

Finally, after shutting down and restarting the Mozy Home Backup daemon via:


sudo launchctl unload -w /Library/LaunchDaemons/com.mozy.backup.plist
sudo launchctl load -w /Library/LaunchDaemons/com.mozy.backup.plist

And voila, Mozy was no longer sucking up my disk I/O, and Parallels (along with anything else that was disk I/O intensive) improved dramatically.

Uncheck "All removable drives" and "All hard drives" from the Protection Scope in Files and Memory

Ah, but once I had Parallels loading fast, I was still faced with a problem. Internet Explorer seemed to have an extremely long lag, not due to the responses from a web server, in loading a page. I'm talking 6-8 seconds before even trying to grab anything and practically freezing the application until that time elapsed. For a while, I was okay with this because it was at least better than the previous state of affairs where Parallels would kill my whole system while trying to load due to insanely poor disk I/O. But as The Paradox of Choice points out, us human beings adapt to any good thing much too quickly to enjoy it for long. I whipped out the google-fu and first started looking for Parallels/IE related topics, figuring this sluggishness has to be something many people are annoyed about and that someone would have a workaround for. No luck. Lacking an actual dedicated Windows box to test on, I also foolishly thought it might have nothing to do with the fact that I was running Parallels. Maybe it was any Windows 7/IE8 combo? This was sort of backed up by the fact that Firefox worked just fine on the Parallels machine. But I should have considered that even Microsoft wouldn't be so silly as to give their users such a huge performance hit with using their browser. And, of course, my searches proved fruitless. Anything I found was about turning off plugins, etc. which I had already done.

Proactive defence? You're proactively stealing 6-8 seconds of my life with every click!

So, I gritted my teeth and dealt with things the way they were a while longer. Then at work, I was using VMWare Fusion, and I noticed that once I got everything loaded up (load time not being quite as nice as Parallels 6), Internet Explorer was actually pretty snappy. With that in mind, I went back to my Parallels install and looked for the most likely suspect: Parallels Internet Security, which Parallels prompts you to install as part of Parallels Tools.

I started by just turning off everything. And, what do you know? Suddenly that 6-8 second application freeze was gone.

Not wanting to leave my VM completely unprotected (it was a Windows install, after all), I applied the equivalent of a binary search to the process of disabling things. First I disabled half the stuff and left the other half running. Then whichever half seemed to be the culprit, I disabled half of that. And so on.

It got down to two things.

1. The Anti-Malware: Files and Memory scan (in particular, the inclusion of at least the main hard drive in the scope); and

2. System Security: Proactive Defence (I tried disabling individual items here, but after exhausting all possible options for disabling, things were still sluggish, so it looks like the speed hit must be somewhere in the three options (to do with trojans, worms, etc.) that they don't let you uncheck.

Important Note: I had to disable both of these. I'm not entirely sure why. But leaving one disabled and the other enabled would result in the same drastic performance hit as leaving both enabled. If you're not going to do both, you might as well leave things as they are because you're not going to see any improvement.

Hide unsightly messages about your system being at risk (because we don't like warnings, do we?)

Now Parallels Internet Security will not like this so much. You'll see that it's gone to level Yellow (medium risk of something bad happening?). I don't like yellow. I like green. And I was able to go into the status messages and hide the "Some components are disabled" message to give me back the wonderfully (and falsely) comforting "green" status. Here's my thinking behind this... warnings are only good if they're distracting. Had I left things at yellow, and some other warning appeared that didn't affect performance but meant I should update something, etc. I likely wouldn't look at it because I'd assume it was just those things I'd turned off. But hey, if you want to leave it yellow, go ahead.

NOW FOR THE REALLY BIG DISCLAIMER: I'm not entirely sure how much more susceptible to attack this system will be now. If you do the same, you will be taking a bit of a risk, and I claim no responsibility for what happens to you when you click that "ClickMeRightNow.exe" file that your friend just sent you (because you totally trust your friends, right?). But as we all learned in the insanity that followed 9/11, more security usually requires less liberty (in my case, liberty from horrible performance), and well, some of us just think life's better with a little more liberty, even if we take on a bit more risk. I'm a web developer. The only reason I need Internet Explorer in the first place is that half of the damned internet doesn't know there are other (better) browsers out there (that said, kudos to the IE9 team – I hear it's great, meaning it's more like the other browsers, and once I can actually install the thing, I'm sure I'll enjoy the better browsing experience). I suspect that that the craptacular nature of Internet Explorer throughout history is the reason most people install Parallels – in order to test their websites with it. And if you're only going to be visiting your own websites in your Parallels session (or ones that are completely trustworthy), there's probably a lot more than this that you could do away with.

All that said, I'll be sure to let the Parallels team know about this issue and if a lot of other people are affected, they might end up fixing it in a new update. Right now, I hear, they're working hard on updating the software to be able to handle the IE9 install, though still no word on the progress of that one either.

Filed under: Windows No Comments
20Sep/100

Eclectic Ruby, MIDI, and Dr. Von Funk

One of the things I like about the Ruby community is that it seems to attract and even encourage eclecticism. I suppose it was only a matter of time, then, before a book like Practical Ruby Projects: Ideas for the Eclectic Programmer was written. I'm interested in particular in the chapter on using Ruby to drive MIDI. Someone's even hooked it up to Reason. This is, of course, awesome.

So, my grand plan is to turn my iPad into a step sequencer for Logic Pro. To do that, I'm going to need to figure out how to send MIDI signals to it, but also how to receive MTC from it. Even better would be to figure out how to send a note with particular timing information (i.e. "Play this note here, and this other note there, etc." instead of just waiting for a particular time and saying, "Play this note now!"), but I'm not sure that's possible at the moment. It's kind of daunting when I haven't done any audio programming before, but Ruby makes it a little less daunting, because it allows you to strip away a lot of the hassle of programming and get to the point quickly. One of the hardest things with any project is proving to yourself it might be possible. Possible enough, at least, to start hacking away at it.

Also, I started a new job. I have a view with a window, and I get to make software in Ruby on Rails that helps people make cute cartoon characters to help welcome and guide other people through cyberspace, all the while avoiding the perils of the uncanny valley. That's a lot of helping! Everyone here has a window seat, which is great because I've never really had a good view before (well, once I did, but the whole time I was there, people would walk by and say, "How the hell did he get that desk?" and I never really got to enjoy the view because I was too busy trying to figure out what it was that I did – apparently whatever it was, I did quite well at it, which was somehow even more unsettling). So having a view that everyone else has that can give your eyes a break every so often from the computer screen is great. Working with other people in the same physical space is also great. I didn't realize how much I'd missed that until now.

Here's something (I think) I'm learning about creativity. I'd spent several years looking for more and more freedom. Less structure, more blurry lines, less certainty. That's good to a point. I think it helps you to be creative if you're comfortable with those things. But creativity can also use a good dose of structure and space every now and then. Walking to work. Coming and going at regular hours. Glancing up at the awesome view when you've hit a roadblock. Being able to leave work at work. I'm also working with a great team that I think I'll learn a lot from and contribute a lot to. My girlfriend keeps asking me, "Are they the ones behind The Paperclip?" I don't think so, and that's also nice, because I think enabling The Paperclip and its plans of world domination would be much more taxing than working with cute cartoon characters like Dr. Victor Von Funkalicious.