Home > Wiki Tips

What are mdworker_shared, mdworker & mds|Fix High CPU Usage

Updated on Friday, May 17, 2024

iBoysoft author Jenny Zeng

Written by

Jenny Zeng
Professional tech editor

Approved by

Jessica Shee


How to Stop mdworker_shared, mdworker & mds from Using High CPU?

Summary: This article explains three Spotlight-related background processes you may find in Activity Monitor: mdworker_shared, mdworker, and mds, including what they are and what to do if they use unusually high CPU and memory.

mdworker shared process on Mac

As you look at Activity Monitor, you may find the processes mdworker_shared, mdworker, and mds running or consuming lots of CPU or memory resources. Don't worry if you don't recognize them as they are legitimate background processes.

What are mdworker_shared, mdworker & mds process on Mac?

The Spotlight Search feature on your Mac is made available through several background processes, including mds, mdworker, mdworker_shared, mdimport, corespotlightdmdsyncmds_stores, coreimportd, mdbulkimport, mdflagwriter, mdwrite, etc.

They are stored in the System Library folder. To access them, you can open Finder, click Go > Go to Folder, then enter the following path: /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/ 

Where mdworker shared mdworker and mds processes located on Mac

In case you're wondering, here's what mdworker_shared, mdworker, and the mds process do.

What is mds process on Mac?

mds, standing for metadata server, maintains the indexes of metadata about the files on your internal hard drive and connected removable external media. It's started by launchd when your Mac boots up and activated by search requests and changes made to the files it monitors.

What is mdworker on Mac?

mdworker, shortened for metadata server worker, is the child process used by mds to scan and index files as a volume is mounted or a file changes. Right, like what's implied in its name, mdworker does all the hard work.

What is mdworker_shared on Mac?

mdworker_shared is also a part of Spotlight. If you have multiple windows open on your browser, you'll likely find several active instances of mdworker_shared in Activity Monitor.

Click the button below to share the information.


How to fix mdworker_shared, mdworker & mds process high CPU usage?

Spotlight is designed not to use up resources indexing files when you are performing processor-intensive tasks or running your Mac on battery power. However, you'll sometimes notice mdworker_shared, mdworker, or mds consuming high CPU or memory usage after:

  • updating your Mac.
  • adding a lot of new files to your Mac.
  • using backup software.
  • plugging in the Time Machine backup disk.
  • connecting several external media to your Mac.

That's because Spotlight is working hard to index or reindex the modifications made on your Mac or external drives. When this happens, it's recommended to wait a while, as it takes time for Spotlight to build and update indexes, especially if plenty of changes have been made.

Nevertheless, if the process continues to use high CPU usage after hours or days of waiting and you're experiencing other issues, such as a slower Mac, loud fan noise, system or app crashes, kernel panics, etc., it's time to troubleshoot the issue.

Read on to find the solutions if you're having the following issues:

  • mdworker_shared high CPU consumption
  • macOS mds process high CPU usage
  • mdworker using high CPU on Mac
  • mdworker_shared crashes regularly
  • mdworker_shared kernel panic

Fix 1: Exclude items from Spotlight indexing

When one of the Spotlight processes takes up your CPU and refuses to release the resources even if you have waited long enough, it usually means that Spotlight is having issues indexing your Mac or external disks. The same goes for frequent mdworker_shared crashes.

If you suspect the abnormal behavior is linked to certain apps, your external drive, or a folder, you can exclude them from Spotlight indexing. It's worth mentioning that if you have software that constantly uploads and creates files, such as a backup utility, it will trigger Spotlight to index the files nonstop and cause high CPU consumption.

On macOS Ventura:

  1. Open System Setting > Siri & Spotlight.
  2. Scroll down to the Spotlight section.
  3. Uncheck the box before the items you want to exclude from Spotlight indexing if any.
  4. Click Spotlight Privacy.
  5. Tap the ( + ) button to add a folder to the list of locations where Spotlight is prevented from indexing.
  6. If you want to exclude a specific app, open the Applications folder from Finder, then drag and drop the app to the empty space of the exclusion list.
  7. If you intend to exclude a drive, drag and drop it from your desktop to the exclusion list. 
    Exclude suspicious item from Spotlight indexing
  8. Click Done.

On macOS Monterey or earlier:

  1. Open System Preferences > Spotlight > Privacy.
  2. Tap the  ( + ) button and choose the folder you want to exclude or directly drag and drop the app or drive to the exclusion list.

Check if the issue persists. If mdworker, mds, or mdworker_shared keeps taking up CPU usage or quitting unexpectedly, try the next fix.

Fix 2: Rebuild the Spotlight index

Chances are that the index is corrupted, rendering these Spotlight processes to misbehave. You can rebuild the Spotlight index to see if it helps. To do it, either add your entire hard drive to the exclusion list and then remove it, or execute some Terminal commands to reset Spotlight indexing.

From System Preferences/Settings:

On macOS Ventura:

  1. Open System Setting > Siri & Spotlight.
  2. Click Spotlight Privacy.
  3. Drag and drop your internal volumes from the desktop to the excluded locations list. 
    Rebuild Spotlight index on macOS Ventura
  4. Wait a few seconds.
  5. Select the added items and click the ( - ) button.
  6. Click Done.

On macOS Monterey or earlier:

  1. Open System Preferences > Spotlight > Privacy.
  2. Drag and drop your internal volumes from the desktop to the excluded locations list.
  3. Wait a few seconds.
  4. Select the added items and click the ( - ) button.

From Terminal:

  1. Launch Terminal from the Applications folder.
  2. Type the following command and hit Enter.sudo mdutil -E /

After that, Spotlight will reindex your files. This may take a few minutes or hours. To check whether Spotlight has done indexing, you can press Command + Space to initiate a search. If you see a progress bar with the word indexing, wait longer.

Fix 3: Disable and reenable Spotlight indexing

Disabling and reenabling Spotlight is another solution to try if you notice the mdworker, mds, or mdworker_shared processes using too much CPU or crashing repeatedly. Note that this will require you to disable SIP (System Integrity Protection) if it's enabled. After SIP is turned off, take the steps below:

  1. Open Terminal from the Applications > Utilities folder.
  2. Type the following command and hit Enter to disable Spotlight.sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
  3. Run the following command to enable Spotlight again.sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
  4. Close Terminal.
  5. Reenable SIP.

Read Also:

What is IMDPersistenceAgent |Fix IMDPersistenceAgent High CPU Usage

Is the problem fixed? Share this post!


People Also Ask

Read More Questions