What is the mdworker on Mac?

There are dozens of processes running on your Mac at any given time. Some of them are controlled by applications you’re working in, and others are run by the operating system to keep your Mac running as it should. Many of them have obscure names that make them very difficult to identify. In this article, we’ll take a look at mdworker and its close relative, mds.

What is mdworker?

It’s a process that runs in the background on your Mac. Mdworker is short for metadata server worker. And mds is short for metadata server. They are processes used by Spotlight to index your Mac. So, for example, if you copied lots of data to your Mac from somewhere else, you would notice mds and mdworker running in Activity Monitor.

Why do mds and mdworker consume so many resources?

Despite the fact that both processes can use lots of CPU cycles, they should never interfere with the running of your Mac. That’s because Spotlight is designed to not use up resources indexing your Mac while you are doing other, CPU-intensive work, or are running a MacBook on battery power. However, building and updating a Spotlight index can be quite hard work so if you notice that mds and mdworker are using lots of resources and it’s not slowing your Mac down, don’t worry about it.


There is an easy tool that fixes Spotlight and other indexing issues on Mac. It’s a part of CleanMyMac X, which is a popular Mac maintenance app. 

Reindex spotlight in Maintenance

1. Download the free version of CleanMyMac X. 

2. Choose Maintenance in the sidebar. 

3. Select Reindex Spotlight.

    This may take a couple of minutes but the result is worth it. Additionally, check more tools from the same app, especially, the Maintenance Scripts and Free up RAM.

    How to prevent mds and mdworker using too many resources

    The first thing to do is two check that mds and mdworker are actually running. The quickest way to do that is to click on the Spotlight icon in the menu bar (or press its keyboard shortcut Cmd-Space) and start typing a search term. If those processes are running, you will see a message just under the search bar that says ‘Indexing…’.

    If you don’t see that message, you will know that whatever is slowing your Mac down isn’t mds or mdworker.

    If you do see that message, it may be that mds and mdworker are doing what they are supposed to do, so the next step is to check Activity Monitor to see the resources they are using.

    1. Check processes with Activity Monitor

    1. Go to Applications > Utilities and launch Activity Monitor (you can also launch it by typing its name in Spotlight and pressing Return when it appears).
    2. Click on the CPU column to order processes by how many CPU cycles they’re using.
    3. If mds or mdworker are near the top of the list, then it could be that Spotlight has run into a problem indexing.

    Keep checking Activity Monitor as you use your Mac. If mds and mdworker remain near the top of that list, you will know that they are using too many resources. The solution is to rebuild Spotlight’s index from scratch.

    2. Rebuild Spotlight’s database in Terminal

    1. Go to Applications > Utilities and launch Terminal.
    2. Type this string followed by Return: sudo mdutil -E /

    Spotlight will now start re-indexing your Mac. Once it’s done, mds and mdworker should no longer use lots of resources.

    3. What to do if mdworker quits unexpectedly

    If you get an error message telling you that mdworker has quit unexpectedly, it may be that Spotlight is trying to index more than it can handle. If you have lots of external drives connected, try excluding them from Spotlight’s index to see if that helps.

    1. Click on the Apple menu and launch System Preferences.
    2. Choose Spotlight and then Privacy.
    3. Drag external drives from the Finder into the Privacy window.

    Delete system junk on your Mac System junk is an ongoing source of errors and inconsistencies on Mac. 

    By junk we mean mostly cache files that became obsolete and now slow down the Mac’s performance. To check how much system junk you have in gigabytes, use the free version of CleanMyMac X.

    The processes mds and mdworker both run when Spotlight is indexing your Mac. They are designed not to hog system resources but sometimes, if Spotlight runs into trouble, they can cause your Mac to slow down. To confirm that mds and mdworker are using too many resources and fix the issue, follow the steps above.

    Laptop with CleanMyMac
    CleanMyMac X

    Your Mac. As good as new.