mds process on Mac: what it is, why it is high, what to do
mds stands for metadata server. It is the manager of Spotlight: it watches for new and changed files, decides what needs indexing, hands the reading to mdworker processes and the writing to mds_stores, and answers your searches. It is busy because Spotlight is indexing, which happens after a macOS update, a big import, or a newly connected drive, and takes 10 to 30 minutes in the usual case and up to a few hours after a major update. Keep the Mac plugged in. If it stays high for more than a day, exclude the drive or folder it keeps re-scanning in System Settings, Spotlight, Search Privacy.
- What it is
- Spotlight's metadata server. The coordinator; mdworker reads files, mds_stores writes the index.
- Normal
- 0 to 5 percent most of the time. 30 to 90 percent while indexing, for 10 to 30 minutes after an update or import.
- Not normal
- High for days, or every time the same external drive is connected, with search still incomplete.
- Safe to quit?
- It restarts within a second and continues. Harmless, pointless. Do not disable Spotlight with Terminal commands.
- The one safe fix
- Wait, on power. Then System Settings, Spotlight, Search Privacy: add the drive or folder it keeps indexing.
What mds does
Spotlight is the search behind ⌘Space, but also behind Finder's search box, Mail's search, the Open dialog in every app, and features like Smart Folders and tags. For that to work instantly, macOS keeps an index of every file's name, contents and metadata, and keeps it current as files change. The process in charge of that index is mds. As OSXDaily put it back in 2010, when the name first started puzzling people, "mds stands for metadata server and the mds process is part of Spotlight."
It does not do the heavy lifting itself. Three processes share the work:
- mds watches the file system for changes, keeps the list of what needs indexing, schedules the work, and serves search queries from the finished index.
- mdworker (several copies, plus mdworker_shared) opens each file and extracts the text and metadata. These are the ones that spike per file.
- mds_stores writes what the workers found into the index files on each volume.
Howard Oakley's description of a re-index is the one to keep in mind: the busy processes "should include mds_stores, mdworker (often multiple copies) and mds itself." Three names, one job. If you see all three near the top of Activity Monitor, Spotlight is indexing, and that is the whole story.
A fourth cousin, corespotlightd, indexes content inside apps (mail, notes, messages) rather than files, and has its own page.
Why mds is using CPU right now
- A macOS update. Major versions change the index format and Spotlight rebuilds it. The most common reason by far, and the one people forget because the update was yesterday.
- A lot of new files. A photo archive copied in, a backup restored, a large download, a code checkout with a hundred thousand small files. Each one is scanned once.
- A drive it has not seen. External SSDs, camera cards, Time Machine disks and network shares all get indexed on first connection, and re-indexed if their index was damaged. The 2007 MacRumors thread that still ranks for this described exactly that: "During such (re)indexing, the mdworker goes mad and takes 80-90% of CPU, fans go wild."
- Something writing constantly. A sync client re-downloading files, a mail account fetching a large archive, a virtual machine or Docker image changing all day. mds sees every write as a change to index.
- A damaged index. After a crash mid-write or a full disk, mds can keep retrying the same files. A restart often clears it; the rebuild step below is the definitive fix.
- A bug in a specific version. Spotlight has had loops and leaks in several macOS releases, reported from Leopard onward. Updating is on the list for a reason.
What normal looks like, and what is not
How the three Spotlight processes typically share the load during an index, and what a stuck one looks like:
Two things make a healthy index look slower than it is. Spotlight throttles itself while you are actively using the Mac and speeds up when you walk away, so a job that seems stalled while you watch it finishes once you leave. And on a laptop, indexing is paused or slowed on battery and stops when the lid closes. A big re-index that only gets an hour of idle, plugged-in time each day can drag across a week of calendar time and still be healthy.
To see progress: open Spotlight with ⌘Space and type anything. While indexing, it shows an "Indexing" bar with the volume name. When that bar is gone and mds is still high the next day, it is time to act.
Is it safe to quit mds?
Quitting it in Activity Monitor does nothing harmful: launchd restarts it within a second and it resumes. It also does nothing useful, because the queue of files is still there. You cannot stop Spotlight by quitting its manager.
Turning Spotlight off altogether, with the Terminal commands that circulate in old threads, is the thing to avoid. It breaks search in Finder, Mail and the Open dialog, and some apps that rely on metadata start misbehaving in ways that do not obviously point back to Spotlight. The 2007 thread's original poster described the frustration everyone feels: "I'm having problems with the 'mds' process running out of control." The fix then and now is the same: give it less to index, not switch it off. The decision tree covers the general rule:
For mds specifically, the safe lever is the Search Privacy list in System Settings. Everything else is waiting or restarting.
What to do, in order
- Plug in and leave it alone for an hour
Most mds complaints are a normal re-index after an update that the person kept interrupting. Power on, lid open, walk away. Check Activity Monitor afterwards; usually it is back under 5 percent.
- See which volume it is indexing
Open Spotlight with ⌘Space, type a word, and look for the Indexing bar and the drive name. That tells you whether it is your internal disk or something you connected.
- Exclude the drive or folder that keeps triggering it
System Settings, Spotlight (Siri & Spotlight on older versions), scroll to Search Privacy, click the plus button, add the Time Machine disk, camera card, virtual machine folder, code checkout or whatever keeps feeding it. Indexing of that location stops immediately. You lose search inside it, nothing else.
- Pause the app that writes constantly
Sync clients, large mail downloads and running VMs generate endless changes. Pause the app for an hour so the index can catch up, then resume.
- Restart
Clears a daemon stuck on one bad file. If CPU drops and stays down, done.
- Update macOS
Spotlight loops and leaks have been fixed in point releases repeatedly. System Settings, General, Software Update.
- Rebuild the index, last resort
In Search Privacy, add your startup disk (Macintosh HD), wait a minute, then select it and click the minus button. Spotlight deletes and rebuilds the index from scratch. This takes an hour or more and search is incomplete until it finishes, so do it plugged in, overnight, and only after the steps above.
When to worry
mds is one of the processes Oakley lists as a "regular offender" that is still normal. The cases where it is telling you something:
- Busy every time a specific drive connects. That drive's index is damaged or the drive is failing. Exclude it, and if it is also slow in Finder, back it up now.
- Search returns nothing or stale results while mds is calm. The index is broken rather than busy. Rebuild it.
- Heat and battery. Hours of indexing on a laptop on a soft surface brings in kernel_task throttling and an empty battery. Do the index on a desk, on power.
- It never ends with nothing new to index. Rebuild. If even that fails, something is writing to disk constantly. Safe to Quit records each process's disk writes over hours, so the app that kept Spotlight busy all night shows up by name in the morning.
What is not a worry: all three Spotlight processes at the top of Activity Monitor for half an hour after an update. That is the index being built, and it is the reason search is instant the rest of the year.
What people hit, in their words
“I'm having problems with the 'mds' process running out of control.”
“During such (re)indexing, the mdworker goes mad and takes 80-90% of CPU, fans go wild.”
“I experienced a similar problem - MDS consuming large amounts of system resources (CPU especially).”
“These should include mds_stores, mdworker (often multiple copies) and mds itself.”
Watch: the Spotlight exclusion fix in two minutes
mds_stores or mdworker high CPU : Fix by The Geek Page. Covers the sibling processes and the Search Privacy step. Skip any part that reaches for Terminal; the System Settings route does the same thing safely.
Questions people ask
What is the mds process on Mac?
mds is Spotlight's metadata server, the manager of the search index built into macOS. It watches for file changes, schedules indexing, hands file reading to mdworker processes and index writing to mds_stores, and answers searches from Finder, Spotlight, Mail and the Open dialog. It is a normal system process, not malware, and it uses noticeable CPU only while an index is being built or updated.
What does mds_stores do on a Mac?
mds_stores is the Spotlight process that writes the index to disk, in the hidden .Spotlight-V100 folder on each volume. mds decides what to index, mdworker reads each file, and mds_stores stores the results. It tends to show the highest sustained CPU of the three during a re-index because writing is continuous. It is normal after an update or big import and stops when the index is complete; see the mds_stores page for its own fixes.
Why is mds using so much CPU on my Mac?
Because Spotlight is indexing: a macOS update changed the index format, you added a lot of files, you connected a new or external drive, or an app keeps writing files that need re-indexing. Normal indexing takes 10 to 30 minutes and up to a few hours after a major update, faster on power and idle. If it is still high after a day with nothing new, exclude the drive or folder in Spotlight's Search Privacy and, as a last resort, rebuild the index.
Can I quit mds in Activity Monitor?
You can, and nothing breaks: it restarts within a second and continues the same job. That is also why it does not help. Turning Spotlight off entirely with Terminal commands breaks search across Finder, Mail and many apps, so avoid the guides that suggest it. The supported way to reduce the work is System Settings, Spotlight, Search Privacy, where you add folders and drives you do not need indexed.
What is the macOS process bird?
bird is the iCloud Drive sync daemon, unrelated to Spotlight. It uploads and downloads files in iCloud Drive and keeps Finder's cloud status icons current. It often appears busy at the same time as mds on a new Mac because the files bird downloads then need to be indexed. If bird stays at 100 percent for a day with no progress in Finder, one file is stuck; the bird page explains how to find it.
Sources and further reading
- Spotlight problems: mds_stores and mdworker in trouble, The Eclectic Light Company how the three processes divide the work and what the log shows when one is stuck
- What is mds and why is it using CPU?, OSXDaily the original plain-English explainer; still accurate
- mds process out of control, MacRumors Forums
- mds and mds_stores constantly consuming CPU, Ask Different
- What to do when a process uses too much CPU, The Eclectic Light Company lists mds and mdworker as normal regular offenders