ยป HOWTO: Stop Random OSX Hangs
My main machine is a MacBook running Leopard. Its hard drive is always verging on full, especially since I got the Rebel and have been shooting gigs and gigs of RAW fotos.
A few months ago (shamefully) it started randomly hanging. It’s a testament to my ability to learn to live with pain that I mostly just ignored the problems.
Then it started happening when I was listening to music.
Then it started happening when I was watching films.
Then it started happening in the middle of poker games.
This last was unacceptable. I’ll take a ten second second chunk out during some dumb movie, but a minute-long hang (they were slowly getting worse) during a poker hand that times out and folds after 30 seconds is actually losing me money.
It changed my play a couple of times. I noticed that once a hang started I would usually still have access to my poker client for a while, but in the interests of not timing out I would go all-in and move the game flow logic off my client and onto the server.
This got me to thinking: why did I still have access to the poker software, but nothing else? Usually it lasted until the end of the hand when the history is written to the hard drive.
I realized that basically everything that I lost during these hangs — I usually have iTunes, Safari, and Lightroom open — is constantly accessing the disk, but Full Tilt only did so at the end of a hand. Similarly I could keep editing stuff in VI, but when I ESC-:-w’d I’d lose control.
Which, because I have good tech intuition, reminded me of Mike’s post about Spotlight indexing removable drives.
The solution to my problem turned out to be identical:
sudo mdutil -a -i off
Turn off Spotlight disk indexing! It sux!



You should get MenuMeters so you can tell when your disk is the bottleneck.
http://www.ragingmenace.com/software/menumeters/
Because disk activity lights are for neeerds with PCs.
Mike Lin
21 Feb 10 at 10:14 pm
[...] the Android emulator takes effing forever to start. At first I thought my Spotlight hangs were back. But, no, Usenet sez, no — the pithiest answer: continue waiting [...]
Cracking Berries, Windows, and Necks « MentalPolyphonics
23 Feb 10 at 5:41 pm