MacOS – What’s triggering the Finder’s CPU binges

activity-monitorfindermacos

A few times a week, the Finder on my Macbook shoots up to around 100% CPU use, and the fans start blasting.

I've done everything I can think of – repaired permissions, rebooted, trashed preferences, turned off "show preview" in view options, audited the Activity Monitor for unnecessary processes, scoured the Console for errors, restarted the Finder, and a lot more. Eventually it subsides, and I assume that the source of the error was the last thing I changed.

But it's doing it again now, and I am at a loss. I wish there was a way to "get inside the Finder's head" and see what it's doing. I've tried running a sample of the Finder process in Activity Monitor, but honestly I don't know what it's doing, much less how to interpret the output.

That's really my hope: that someone can explain a better way to investigate CPU spikes like this, not just in the Finder, but any runaway process. There are certainly plenty of details that might help you all diagnose this specific case, but before I spew out even more probably-irrelevant information, I thought I'd see if anyone has general tips for diagnosing this sort of thing.

This is my first Stack-anything post btw, so please be gentle. Thanks in advance!

Best Answer

"I wish there was a way to "get inside the Finder's head" and see what it's doing. I've tried running a sample of the Finder process in Activity Monitor, but honestly I don't know what it's doing, much less how to interpret the output."

Taking a sample in Activity Monitor is exactly that: getting inside the Finder's head to see what it's doing. While it may seem like greek, I or others here can interpret it for you. Just post it, or make it available for download or viewing (as they tend to be pretty big).

What version of OS X are you using? In OS X 10.5.x and prior, I believe multimedia content ran within the Finder itself, rather than delegating it off to an agent/helper type process, so then the CPU usage may appear higher. For example, previewing a QuickTime movie might make the 10.5.x-and-earlier Finder spike to 60% CPU, while in 10.6 it might be split to something like 10% CPU for the Finder, 30% CPU to the QTKitHelper background process.

Otherwise, I've sometimes seen the code the Finder uses to calculate the size of the contents of a folder cause temporary CPU spikes. (You'll notice something like TSomething::HFSSizerSomething in the stack trace of a sample). Usually it seems insistent on finishing its calculation even if the view you had open that warranted the calculation has since been closed.

In any case, seeing the sample should help pinpoint the issue along with knowing what context led up to the spike. It'll be easier to explain what taking a sample is doing once we have it in front of us to look at.

Related Question