mds_stores high CPU on Mac: what it is and how to fix it
mds_stores or mdworker eating CPU on your Mac? Why Spotlight is indexing, how long it takes, and the fixes in order, from waiting to mdutil.
GuideUpdated 7 min read
On this page
Your fans are loud, the Mac is warm, and Activity Monitor shows mds_stores or several mdworker processes at the top of the CPU column. This page explains what they are, when to wait, and which fix to try next.
Why mds_stores and mdworker use so much CPU
These processes are parts of Spotlight, the search built into macOS.
mdscoordinates Spotlight.mds_storeswrites and maintains the index, the database Spotlight searches.mdworkerandmdworker_sharedread your files and pass their contents to the index. Several can run at once.
Apple's support page on Spotlight says indexing occurs when you first set up your device, after you install a software update or upgrade, or as data changes on your device, including when new apps add content to be indexed. The causes people hit most, in order:
- A macOS update or first setup. The index is rebuilt and every file is read again. This is normal and ends by itself.
- A large or slow drive. External drives, backup volumes and archives with many small files take much longer.
- Developer and VM folders.
node_modules, build output and virtual machine bundles change constantly, so the indexer keeps working. - A damaged or stuck index. Search returns wrong or missing results, and CPU never settles. This is the least common cause.
Apple says indexing can take hours or days and finishes faster when the Mac is plugged in, idle and online. In reports we've seen, mds_stores sits at up to 50% CPU during this. It is a problem only when it never settles or when you need the Mac at full speed now.
Confirm it is Spotlight
- Open Activity Monitor (search for it in Spotlight, or look in Applications > Utilities).
- Choose View > All Processes, because
mds_storesruns as root and may not appear otherwise. - Click the CPU tab, then click the % CPU header to sort by the busiest processes.
- Type
mdin the search field to showmds,mds_storesandmdworker.
You can also check from Spotlight itself. Press Command-Space bar; if Spotlight is indexing, a progress indicator appears at the top of the Spotlight window.
If something else is on top, read why your Mac is slow or how to read Activity Monitor.
Fixes, from most likely to least
Fix 1: Plug in, stay awake and wait
This solves most cases and costs nothing.
- Connect the charger.
- Keep the Mac awake and online. How to stop your Mac from going to sleep covers the built-in options.
- Leave it for several hours, or overnight after a major update.
- Check Activity Monitor again. If CPU is near zero and the fans have quieted, you're done.
Force quitting is pointless: macOS restarts these processes, and the load returns.
Fix 2: Restart
A restart relaunches the Spotlight processes. It does not delete the index, so some activity afterward is normal.
- Choose Apple menu > Restart…
- After you log in, wait a few minutes and check Activity Monitor.
Fix 3: Exclude drives and big folders
Spotlight indexes everything it is allowed to. Excluding backup drives, archives, VM folders and code build output removes that work.
- Open Apple menu > System Settings, then click Spotlight in the sidebar (you may need to scroll down). On some macOS versions it's labeled Siri & Spotlight.
- Click Search Privacy at the bottom. Apple notes the button may be labeled Spotlight Privacy.
- Click the + button, or drag a folder or disk into the list. Apple's steps: click the Add button, then select a folder or disk.
- Choose the drive or folder and click Done.
The trade-offs, per Apple's page on preventing Spotlight searches in specific folders:
- Files in excluded places no longer show up in Spotlight search. You can still open them normally, and the − button removes an exclusion.
- If you exclude a Time Machine backup disk, you still get messages that Spotlight is indexing it, because Time Machine needs that indexing.
- Excluding certain files and folders may mean you aren't notified when updates become available for some apps.
Fix 4: Turn indexing off and on with mdutil
If indexing looks stuck, stop it and start it again. mdutil is the built-in command-line tool for Spotlight indexing, and each command below undoes the other.
Turn indexing off on every volume:
sudo mdutil -a -i offWait a minute, then turn it back on:
sudo mdutil -a -i onCheck the state of every volume (no sudo needed):
mdutil -a -sWhile indexing is off, search won't return new results. If you stop after the first command, run the second one later. When sudo asks for a password, nothing appears as you type. That is normal; type it and press Return.
To pause one drive only, give its path instead of -a, for example sudo mdutil -i off /Volumes/Backup. Undo it with sudo mdutil -i on /Volumes/Backup. Replace Backup with your drive's name.
Fix 5: Rebuild the index for a folder or disk
If search gives wrong or missing results as well as burning CPU, rebuild part of the index. Apple's own method needs no Terminal. Drag the disk or folder to the list of locations Spotlight is prevented from searching, or click the add button (+). Then wait a few seconds, select the same disk or folder in the list and click the remove button (–).
If you get an "unknown" or permissions error, your account may not have ownership permissions for certain items in that disk or folder.
To erase and rebuild the whole startup volume's index from Terminal:
This forces a full re-index, so expect high CPU again for hours. It doesn't touch your files.
sudo mdutil -E /There is nothing to undo; Spotlight simply rebuilds. Run it overnight on a charger, and only after the earlier fixes failed.
Which fix fits your situation
| Situation | Symptom | Try |
|---|---|---|
| Just updated macOS | High CPU for hours, search slow | Fix 1: plug in and wait |
| Busy a day or more | No obvious cause | Fix 2, then Fix 4 |
| Starts when a drive is attached | CPU rises on connect | Fix 3: exclude the drive |
| Code, VM or archive folders | Constant low-level indexing | Fix 3: exclude those folders |
| Search results missing or wrong | CPU never settles | Fix 5: rebuild |
Checklist before you try again
- The Mac is on its charger and set not to sleep.
- You have waited at least several hours since the update or drive attach.
mdutil -a -sshows indexing enabled on the volumes you want searchable.- Heavy folders and backup drives are in Search Privacy if you don't need them searchable.
- Activity Monitor is set to All Processes so you see the root
mds_stores.
What Procowl can and can't do here
Procowl, our system monitor in MacSuite, can show you what happened but can't stop Spotlight.
- It lists root processes such as
mds_storesby name, PID and path. CPU and memory for root processes show "—" until you install the optional Enhanced Access helper under Settings > General and approve it in Login Items. See Permissions, Enhanced Access and privacy. - Its Timeline records history while Procowl runs (on by default, 7 days), so you can scrub back to when the fans spun up and see the busiest apps then. See the timeline docs.
- It can't quit, suspend or signal
mds_stores, because that process runs as root. Use the fixes above.
If you only need to confirm the culprit once, Activity Monitor is enough. Procowl has a 7-day free trial.
If nothing works
If mds_stores is still pinned after a few days on power, with the fixes above done, contact Apple Support. Include your macOS version, the steps you tried, the output of mdutil -a -s, and a screenshot of Activity Monitor's CPU tab.
Subject: mds_stores using high CPU for days on macOS (version)
My Mac's mds_stores / mdworker processes have used high CPU for (number) days,
plugged in and awake. I have tried: restart, Search Privacy exclusions,
sudo mdutil -a -i off then on, and (rebuild method).
Output of mdutil -a -s is attached, with an Activity Monitor screenshot.
Mac model: (model and year). Large external drives attached: (yes/no).For fans spinning when mds_stores is idle, see MacBook overheating: causes, checks and fixes.
Common questions
Is it safe to turn Spotlight indexing off?
It doesn't harm your files, but Spotlight and Finder search stop returning new results on those volumes. sudo mdutil -a -i on turns it back on.
Will excluding a folder delete anything?
No. It only tells Spotlight not to index it, and your files stay where they are.
How long should indexing take?
Apple says hours or days, depending on how much data there is. It's faster when the Mac is plugged in, idle and online.
Can I just force quit mds_stores?
Not usefully. macOS starts it again and the CPU load returns.