The short answer
mds_stores on a Mac writes Spotlight's search index, and the mds process coordinates it. They get busy after a macOS update, a restore or lots of new files, and Apple says indexing a lot of data can take hours or days. Let it finish, plugged in. If it never settles, exclude folders you never search in Spotlight's Search Privacy.
On this page
What mds, mds_stores and mdworker do
| Process | What it does |
|---|---|
mds | The Spotlight server. It coordinates indexing and answers searches. |
mds_stores | Writes the search index, so searches in Spotlight, Finder and Mail are instant. |
mdworker, mdworker_shared | Read files so Spotlight can index their contents. Several run at once while there's work, then exit. |
corespotlightd | Indexes content apps share with Spotlight, such as messages, notes and mail. |
mds- What it does
- The Spotlight server. It coordinates indexing and answers searches.
mds_stores- What it does
- Writes the search index, so searches in Spotlight, Finder and Mail are instant.
mdworker,mdworker_shared- What it does
- Read files so Spotlight can index their contents. Several run at once while there's work, then exit.
corespotlightd- What it does
- Indexes content apps share with Spotlight, such as messages, notes and mail.
They're part of macOS. The real mds and mds_stores run from inside /System/Library/Frameworks/CoreServices.framework, which macOS protects; ps -Ao pid,comm | grep mds shows the full path.
mds_stores in Activity Monitor
Open Activity Monitor, click CPU and type “mds” in the search field. You'll see mds with root in the User column and mds_stores with its own user, _mds_stores. The mdworker_shared processes run as you, so they come and go under your user name. The Disk tab shows how much each one is reading and writing.
ps -axo user,comm | grep -E "/mds$|/mds_stores$"Is it safe to quit mds_stores?
It quits and restarts itself. macOS starts mds and mds_stores again straight away and indexing carries on, so quitting them only throws away work already done. The mdworker processes end on their own when there's nothing left to index. Leave them running.
Why Spotlight gets busy
Apple says Spotlight indexes during setup, after software updates or upgrades, and as data changes. In practice, the busy spells come from:
- A macOS update. Spotlight may index much of the disk again afterwards. On a lot of data, Apple says this can take hours or even days.
- Restoring or migrating. A Mac restored from a backup or set up with Migration Assistant indexes everything it received.
- Lots of files changing at once. Big downloads, unpacked archives, cloud sync, and developer folders such as
node_modulesand build output, which can change thousands of files per build. - A new external disk. Spotlight indexes a disk when you first connect it.
How to check that it's indexing
top -l 2 -o cpu -n 20 -stats pid,command,cpu | grep -E "mds|mdworker|corespotlightd"mdutil -s //:
Indexing enabled.In Activity Monitor, the Disk tab shows how much mds_stores is writing. Heavy CPU and disk use from these processes for an hour or so after an update is normal. Days of it, with nothing new on the Mac, usually means one folder keeps changing and being indexed again.
What to do about it
- Let it finish. Leave the Mac idle and plugged in for a while; Apple says indexing completes faster that way.
- Exclude folders you never search. Open System Settings → Spotlight → Search Privacy (on older macOS versions, Siri & Spotlight → Spotlight Privacy), click the add button (+) and choose the folder, or drag it into the list. Good candidates: build folders,
node_modules, caches, and virtual machine or container disk images. - Rebuild the index if search results are wrong or indexing never ends. Apple's method: add the disk to the Search Privacy list, wait a few seconds, then remove it. Spotlight indexes it again from scratch, which takes a while.
Heavy indexing can warm the Mac up, so you may see kernel_task rise at the same time. After a macOS update it's one of several jobs that run together; Mac slow after a macOS update lists the others and how long each takes.
The faster way: “What is this?” in iKnowMyMac
iKnowMyMac explains this inside the app. Every process row has a “What is this?” action that says what the process is, whether it's safe to quit, why it's busy right now and the one fix. For any Spotlight process, it adds up the CPU of all of them and says whether Spotlight is indexing right now.