Written by
Connie YangSummary: mds is the process that helps Spotlight index files on a Mac by indexing the metadata of the files. If you want to learn why it takes up so much CPU and mds vs. mds_stores, follow this mds introduction.
You might notice a process called mds using an overloaded CPU when accessing Activity Monitor on your Mac. If you are puzzled by this process and worry if it is the troublemaker slowing down your Mac, just follow our post.
We'll break down what the mds process on your Mac is, how it differs from similar - mds_stores, why it uses high CPU, and what you can do when it consumes so much CPU.
What is mds on Mac
mds, short for Metadata Server, is a background process that indexes metadata from files, folders, system data, etc., to keep Spotlight (a built-in search tool on Mac) search results fast and accurate. It ensures the normal work of Spotlight Search.
When you search using Spotlight, macOS quickly retrieves results thanks to the indexing work done by mds. When new files are added or modified on your Mac, mds will run to index the corresponding metadata.
Go tell your friends what the mds process in Activity Monitor is.
mds vs. mds_stores
In Activity Monitor, you may see another similar-sounding process of mds, called mds_stores. While both are related to Spotlight, they serve slightly different purposes.
mds is the main Metadata Server process that manages overall indexing behavior and search coordination for the metadata of the files.
Differently, mds_stores handles storage of metadata that Spotlight uses for search. It works closely with mds to keep your search index updated.
In short, mds is the brain that controls Spotlight indexing, and mds_stores is the storage unit that holds the indexed data.
Why does mds use high CPU
Usually, high CPU usage from mds and mds_stores is temporary and always happens when Spotlight is indexing added or modified files.
When you set up a new Mac or update macOS, connect a new external drive, finish data migration from another Mac, install or update apps, or modify many files at once, mds (always along with mds_stores) will consume high CPU.
Rarely, a corrupted Spotlight index can cause mds to loop or get stuck, taking up excessive CPU.
What to do if mds on Mac uses high CPU
If mds or mds_stores is constantly using too much CPU, meanwhile, you'll always run into the continued corespotlightd CPU overload issue.
In that case, you can follow these methods to fix the high CPU usage of mds, or at least, reduce it:
Wait it out
If you've just installed or updated macOS or copied lots of files, give it time. Spotlight may need a relatively long time (maybe hours) to finish indexing. The high CPU usage of mds should subside once it's done.
Restart Your Mac
A restart will refresh the system, including the mds process, and clear any temporary bugs. Just restart your Mac to reduce the CPU usage of mds.
However, this way is a temporary way. To keep your mds CPU usage low, try the next way.
Stop Spotlight from indexing external drives and large folders
You can stop Spotlight from indexing certain large folders and external drives you don't often use to reduce mds activity.
Here's how:
- Click the Apple menu > System Settings > Siri & Spotlight > Spotlight Privacy.
- Click the + button to add the large folders and external drives you want to exclude to the list.
Rebuild Spotlight index
When Spotlight indexing gets stuck, mds will exhaust high CPU. Thus, if the mds is constantly consuming high CPU, try to rebuild the Spotlight index.
- Open Terminal from Launchpad > Other.
- Enter the following command. sudo mdutil -E /This command will force the Spotlight index for your main disk to erase and rebuild from scratch.
- Enter your admin password when required.
Click to share this mds process introduction to more people.