Troubleshooting my Macbook slowdowns
I’ve been tormented by an issue on my Mac for a while now where it would be fine for a day or so after booting, but then would suddenly slow down in various specific ways:
- Long delay taking screen shots (sometimes up to 10 seconds)
- Beachball when doing Cmd-f in Firefox and typing in a search term that doesn’t exist on the page
- Beachball when doing tab completion on the command line on a term that can’t be autocompleted
Apart frome these things it would seem fine, but as the above things happen quite a lot it was rather frustrating.
I searched all over for something that might be misbehaving. CPU and memory usage was fine. launchd
seemed to be writing a lot to disk but I couldn’t connect that to the problems I was having. Generally, disk IO seemed fine. After a lot of hunting around, the only surefire way I could find to sort the problem was to reboot, which as I’m supposed to be technical felt like a bit of a defeat!
It took me a while to realise that the common theme here is that in each of the above cases, a sound would be played. Could it be the sound daemon misbehaving? To further my suspicions, when I tried toggling the sound on and off via System Preferences, that too caused the system to hang for a few seconds. I tried doing the following, and sure enough, everything went back to normal:
sudo killall coreaudiod
Finally, I’d found a fix for the problem that didn’t involve a full reboot.
I haven’t worked out specifically what’s going wrong just yet, or how to fix it. But for the moment I’m happy to have found this workaround.