Skip to main content

How to: Get Spotlight processes back under control when CPU usage goes crazy

If you’re finding that your Mac fans are running a lot more than they used to, you might want to check out whether a couple of Spotlight processes are consuming more than their fair share of CPU cycles.

Ever since the latest Mavericks update, I found that my MacBook Pro seemed to be running hot a lot of the time, with fans ramping up to high levels to cool it. Checking Activity Monitor didn’t seem to be shedding much light on things at first glance. The only two processes using an unusual amount of CPU were mds and mds_stores. These are two processes used by Spotlight when indexing, so I didn’t think too much of it – Spotlight has to do its indexing sometime, right?

But several checks later, these two processes seemed to be helping themselves to significant chunks of CPU on a regular basis, at which point I did some Googling.

I started by disabling Spotlight altogether to confirm that it was the culprit. To do this, I went into Terminal and entered:

sudo mdutil -a -i off

The fans spooled down and all was back to normal. Spotlight was indeed the culprit.

I briefly considered leaving Spotlight off until the next OS X update, but that proved too much of a pain. I keep my most-used apps in the dock, but everything else I habitually launch from Spotlight. CMD-space plus the first letter or two of the app is just too convenient to give up. So I did some more Googling – after switching Spotlight back on with:

sudo mdutil -a -i on

The first tip I found was here, where it suggested deleting the Spotlight database and forcing it to re-index. You can do this in Terminal again:

 sudo rm -rf /.Spotlight-V100/*

Top tip: set this going overnight, as the re-indexing takes a while.

This helped quite a bit, but the mds process still seemed a little greedy. More Googling led me to a suggestion to remove from Spotlight’s indexing any directories with frequently-changing content, especially those used for online backup. You can do this by going into System Preferences, clicking the Privacy tab and then drag-and-dropping onto it any directories you don’t want it to index.

I added my CrashPlan, MobileSync and Dropbox folders – three specific suggestions I’d found – and then for good measure added some others with frequently-changing content.

This did the trick: my fans stayed on low, and Activity Monitor showed the mds processes consuming only tiny amounts of CPU.

I’m not sure how general an issue this – hence making this an aside – but if you’re finding your Mac running hot, it may be worth checking out.

FTC: We use income earning auto affiliate links. More.

You’re reading 9to5Mac — experts who break news about Apple and its surrounding ecosystem, day after day. Be sure to check out our homepage for all the latest news, and follow 9to5Mac on Twitter, Facebook, and LinkedIn to stay in the loop. Don’t know where to start? Check out our exclusive stories, reviews, how-tos, and subscribe to our YouTube channel

Comments

  1. Dustin Shammo - 11 years ago

    Great tip!

    One other task that I need to fix is the kernel_task. Occasionally, about once a day, when waking from sleep it consumes 100% of a CPU, thus draining my battery rapidly and keeping my late 2013 Retina MacBook Pro quite warm. I haven’t been able to turn up any explanation or fix other than rebooting. Any tips here?

  2. praxiskoivo - 10 years ago

    Thanks! For me it was just hiding Dropbox from Spotlight.

  3. Diego Aliaga - 8 years ago

    thanks for sharing!

  4. Nicholas Parnell Pimlott - 8 years ago

    Wow! Yup.. Seems like Dropbox is the biggest culprit here – a minute or two after hiding the application from Spotlight the fans have gone silent and my idle CPU percentage is back where it should be. Thank you for sharing

Author

Avatar for Ben Lovejoy Ben Lovejoy

Ben Lovejoy is a British technology writer and EU Editor for 9to5Mac. He’s known for his op-eds and diary pieces, exploring his experience of Apple products over time, for a more rounded review. He also writes fiction, with two technothriller novels, a couple of SF shorts and a rom-com!


Ben Lovejoy's favorite gear

Manage push notifications

notification icon
We would like to show you notifications for the latest news and updates.
notification icon
You are subscribed to notifications
notification icon
We would like to show you notifications for the latest news and updates.
notification icon
You are subscribed to notifications