What is mdworker_shared on a Mac, and why are there so many of them?
mdworker_shared reads files for Spotlight, and several copies at once is normal. On our Mac each lived a minute or two and used 5 to 11 MB. When to worry.
What is mdworker_shared?
It reads files for Spotlight: the text of documents, the details of photos, the metadata of everything. macOS starts several at once, each handles a batch of files and then quits. That is why the list keeps changing. They run as you, from the Metadata framework in CoreServices.
| Reading on our Mac | Value |
|---|---|
| Copies running at one moment | 2 |
| How long each had been running | 65 seconds and 2 minutes |
| Memory each | 5 MB and 11 MB |
| CPU each | 0.0% |
Why are there so many?
Many changed files at once: a download that unpacked thousands of files, a git clone, an npm install, a big photo import. Each copy takes a share. Once Spotlight catches up, they stop appearing.
When is it a problem?
When they never stop. A folder whose files change every few seconds, such as a build folder or a log being written, keeps Spotlight reading forever. Exclude that folder in System Settings, Spotlight, Search Privacy. A single mdworker stuck at high CPU on one file is the other case: that file is often damaged or huge, and the fix is to move it or exclude its folder.
See it live
Free Mac's System tab ranks every process by processor use and energy impact, once a second, and marks the ones macOS will not let you quit as protected. See also mds_stores and Spotlight index taking up space.
Related: coreaudiod and replayd.
Common questions
What is mdworker_shared on a Mac?
A Spotlight process that reads file contents and metadata for the search index. Several run at once and quit when done.
Is it normal to have many mdworker_shared processes?
Yes, after many files change at once. They should come and go within minutes.
How do I stop mdworker_shared using CPU?
Exclude folders that change constantly, such as build output, in System Settings, Spotlight, Search Privacy.