What is mdworker_shared, and why are there so many?
mdworker and mdworker_shared are Spotlight's workers: small helpers that open your files and read out what Spotlight indexes, like text, titles and dates. Seeing many of them at once is normal while Spotlight is indexing, and they exit when there's nothing left to read.
Why mdworker_shared gets busy
mdworker processes appear whenever Spotlight has files to read:
- After big changes to your files, each worker takes a batch of files, so a large change starts several at once.
- Unusual or large files take longer to read, so one worker can stay busy for a while.
- Importers from other apps. Apps can add Spotlight plug-ins for their file types; a slow or faulty one makes its worker busier.
How to check what it's doing
- In Activity Monitor, mdworker_shared processes come and go in seconds while indexing; that's expected.
- If one stays busy for a long time, mds_stores will usually be busy too: Spotlight is working through a large change.
What to do
- Let indexing finish with the Mac on and plugged in.
- Keep Spotlight out of folders full of generated files (see mds_stores for how).
- If workers are busy for days, rebuild the index with
sudo mdutil -E /.
See what's slowing your Mac, in one sentence
Unhogged folds macOS's dozens of helper processes into one row so they don't bury your apps, and when you expand it, each says in a sentence what it is.
One payment, three Macs. macOS 13 Ventura or later on Apple silicon.


Questions
Should I quit mdworker processes?
There's no need: they exit on their own, and Spotlight starts new ones when it has more to read.
Is mdworker a virus?
No. mdworker and mdworker_shared are part of Spotlight in macOS.