Mac users might have noticed that sometimes the 'mdworker' and 'mds' processes are active on their computers and wondered what is their purpose. Let's start with the names - 'mds' stands for metadata server while 'mdworker' is short for metadata server worker. Both processes are employed by Spotlight to index the Mac system such as when data is being copied from one place and moved to another on the Mac.
While under specific circumstances 'mds' and 'mdworker' could take up a sizable portion of the CPU's resources, both processes are designed to never hamper the overall productivity of the system if it is running other, CPU-intensive tasks, especially. However, if you believe that 'mds' and 'mdworker' are hogging an abnormally high number of CPU cycles, you can confirm your suspicions through the Activity Monitor.
- Go to the Applications folder, open Utilities, and launch Activity Monitor.
- Select the CPU column to sort the active processes by the CPU cycles they currently use.
- Check if 'mds' or 'mdworker' are at the top of the list. If they are, it could signal that Spotlight is not functioning properly.
Try Rebuilding Spotlight's Database
One potential solution for this issue is to attempt to rebuild Spotlight's database. One of the fastest ways to do so is via the built-in Terminal tool.
- Open your Applications folder, go to Utilities, and launch Terminal.
- In the Terminal window, type the sudo mdutil -E / command and press Return on your keyboard.
- Wait for Spotlight to reindex your Mac.
Unexpected Shut Downs of 'mdworker'
Some users might encounter the problem of 'mdworker' quitting unexpectedly. A potential cause for this issue could be Spotlight may have become overwhelmed while trying to index the system. If there are numerous external drives connected to your Mac, try excluding them from Spotlight's index.
- Select the 'Apple' menu.
- Open 'System Preferences.'
- Select 'Spotlight.'
- Open 'Privacy.'
- Drag all of the external drives from the Finder window to the Privacy window.