Here was an interesting issue.
Take this test: one slow Mac. Why?
- Age. How old is your machine? Is it too slow to run what we’re trying to run? Well, I wouldn’t think an 8-core Xeon that’s two or three years old would take 2 minutes to boot MacOS, if that’s what you’re asking.
- Memory. Enough for the application load? 6GB should be enough to run the Finder, and Mail.app.
- Network Connectivity. I’ve found that a lot of perceived speed is related to network connectivity – latency, throughput, and don’t forget DNS lookup. I have the Comcast 25MB/sec down package; local caching DNS server (which gets tested and monitored when things seem unaccountably pokey), and my router indicates that traffic is what I’d expect – at idle, around 20kb/sec average. speedtest.net shows I’m getting the throughput I’d expect, too.
- Runaways. What’s running on the machine that’s sapping the vital cycles I want to use? Nothing. CPU, total, while launching apps (no matter how many) seems well within expectations. Normal load is well under 1.0 (15 minute average, and this is 8 cores, mind you).
- Waiting. Too much i/o? No evidence of system time spiking. No apparent swapping going on.
So, why is the %(@#:@!! thing so slow? The car isn’t going above a slow crawl no matter how hard I hit the gas, and there aren’t any road problems, either!
What was the answer? Here’s what I narrowed it to:
The only resource that made sense to consider was i/o, to disk specifically. Because I didn’t see evidence of i/o wait (and didn’t have a good benchmark of what that configuration’s theoretical speed ought to be), I decided to look at the stock HD in the machine to see whether there might be issues.
First place I looked was SMART. Don’t ask why, I think it’s a reflection of the years I spent working with hardware (anyone remember the IBM 3390?) that generated highly reliable data on its state. I think that since it is now 2011 we’d have done that even better. I am frighteningly naïve sometimes.
Smart says “green”. Green is good. Green means go.
How about Disk Utility? In my experience, it always finds a few things to complain about, but okay, let’s go there. Yes, you have problems, you should run it standalone.
And… Disk Utility says I have problems. Problems outside of its ability to fix. “Back up your data, reformat, and try again” it says. Of course I already am backed up.
But, you know, these days, these disks are $70-$80 or so to just replace the whole thing. My time is worth something, I’m just going to back up (again) and toss the thing. This is a cardinal rule: don’t throw good (time) after bad. Make the whole thing go away. Disks are mechanical devices, they don’t last forever, they are a key failure point, and even if I’m wrong it’s not a lot of money and it will do me good anyway to wipe and refresh.
That’s a second rule: if you have the opportunity, and if you’re going to have to do at least 50% of the work anyway, it’s always better to rebuild from scratch. There are three reasons for this:
- Although I don’t literally believe in it, we say that configurations that have been actively added-to over a period of time develop “bit rot”. That’s a shorthand term to refer to software installed and abandoned/forgotten, but now even more aptly describes OS updates. On my Mac, there were probably updates from the Leopard days floating around there. There were changes to system files I’d made to test ideas out that were never adopted nor reversed. This simply adds complexity that isn’t necessary, and may be harmful.
- This also give me the opportunity to re-think what I do want installed on this machine, both in terms of applications and data. Much of my stable data lives on a server, but especially with the demise of Rosetta, I probably needed to review all of those apps, and reinstalling them is likely going to make for a leaner and less-complicated system, along with not reinstalling things like the World Book Encyclopedia app. (Yes, I had a real app by that name – probably, again, based on Rosetta).
- Going through this process is a lot like spring cleaning, but it’s also a good learning opportunity. For example, how did I actually configure Wireshark? I knew I installed it somewhere and needed to write a script to start it correctly. How did I actually get my Brother P-Touch to print correctly? There was some work there – and this was my chance to document stuff like this. Admittedly this is much more important on a Linux system, but there’s still value in understanding that some things are going to break on reinstallation, and it would be good to set up to collect that information for next time.
I ended up also replacing one HD with two: for the System and Applications, I installed a 60GB SSD, for my home directory and Everything Else, a 300GB 10k rpm SATA drive. Reinstalled Mac OS X, reinstalled all of my apps (the ones I still want to use); moved my home directory and the other miscellaneous data. And stuff did break, a bit. Little I didn’t expect, and nothing that broke my heart.
Turns out I was right. Boot time now ~28 seconds from power on to sign-in screen, and sign-in is well under 5s until my apps start to launch. It’s still a mystery to me how this particular problem could be unaccompanied by any direct evidence (in the form of some resource measurement that would point a glowing red finger at the culprit, or, I guess SMART isn’t all that smart), but I have a machine that is clearly faster than it was the day it was delivered, and with years more service (I think) left. And I’m much happier, more productive, and less puzzled.