What is mdworker on Mac?

What mdworker and mdworker_shared do, why Activity Monitor shows several at once, whether they're safe, and how to stop Spotlight indexing a folder. Checked on macOS 26.

SafePart of macOS or a well-known app. Leave it alone. The rating describes the real mdworker_shared, not every copy with that name.

What it is
Spotlight indexing. Reads your files so you can search them.
Made by
Apple
Where the real one lives
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Support/
If you block its internet access
No noticeable effect. It doesn't normally connect to the internet.
What to do
Part of macOS. Leave it allowed.

mdworker_shared (older macOS: mdworker) is Spotlight’s file reader. Each copy opens files, reads their text and details such as the author or the date taken, and passes them on so Spotlight can find them when you search. Activity Monitor often shows several at once, one for each batch of files.

They’re part of macOS and safe. They’re busy after a macOS update, when you add a disk, or when you copy in a lot of files, then they settle down by themselves.

Is mdworker safe?

Yes. The real mdworker_shared lives in a system framework next to the rest of Spotlight and is signed by Apple. It runs with your own user name, because it reads your files, and macOS starts and stops copies as needed. It doesn’t connect to the internet.

Why there are so many mdworker processes

Spotlight starts a separate worker for different kinds of files and for different users, so one crash or one odd file can’t stop the rest. Five or more mdworker_shared processes is normal while indexing. When the work is done, most of them quit within a few minutes.

Why mdworker uses CPU and battery

Indexing is real work: every new or changed file is opened and read. It’s busiest:

  • after a macOS update, when Spotlight may rebuild its index
  • after you connect a new disk, or restore from Time Machine
  • after copying or downloading many files, such as a photo library or a code project
  • in folders that change all the time, such as build folders, virtual machine files or a large mail archive

The work goes to mds_stores, which writes the index. The two often show up together.

How to make mdworker use less CPU

Wait first: after an update or a large copy, an hour or two on power usually finishes the job. If one folder keeps it busy all the time, stop Spotlight from indexing it:

  1. Open System Settings > Spotlight.
  2. Click Search Privacy….
  3. Click + and choose the folder or disk to leave out, such as a build folder or a disk of virtual machines.
  4. Click Done.

Spotlight won’t find files in that folder any more, and mdworker won’t read them.

Should you quit mdworker?

You can quit a copy in Activity Monitor, and nothing breaks, but macOS starts a new one as soon as there’s more to index. Leaving out the busy folder is the lasting fix.

How to check the mdworker on your Mac is the real one

Run this in Terminal:

Terminal
ps -ax -o user,comm | grep mdworker

Every line should end in the same system folder:

Terminal
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Support/mdworker_shared

To check that Spotlight indexing is on for your startup disk:

Terminal
mdutil -s /

It answers Indexing enabled.

When to worry

  • A process called mdworker outside that system folder, especially in your home folder, /tmp or /Users/Shared. Spotlight never runs from there. Check it with a malware scanner.
  • mdworker connecting to the internet. The real one only reads files on this Mac.
  • High CPU every day for weeks. Find the folder it’s reading: double-click the busy mdworker_shared in Activity Monitor, click Open Files and Ports, and look at the file paths. Leave that folder out of Spotlight.

Frequently asked questions

What is mdworker_shared?

The current name of Spotlight’s file reader. It reads files so you can search them. macOS runs several copies at once.

Why is mdworker using so much CPU?

Spotlight is indexing new or changed files, often after a macOS update or a large copy. It stops when it catches up.

Can I turn off mdworker?

You can leave folders out in System Settings > Spotlight > Search Privacy…. Turning Spotlight indexing off completely also stops search in Mail, Finder and many apps, so leaving out folders is the better choice.

Is mdworker a virus?

No. It’s part of macOS. A copy outside the Spotlight system folder isn’t the real one and is worth checking.

Sources

  1. Apple, Find what you need with Spotlight on Mac.
  2. Apple, View CPU activity in Activity Monitor on Mac.
  3. Paths, the Search Privacy setting and the mdutil output checked on macOS 26.0.1 (25A362), 4 November 2026.

How we checked. Paths, commands and behaviour were checked on macOS 26.0.1 (25A362), MacBook Pro (16-inch, 2021), 4 November 2026. They can differ on other versions of macOS.