
When mdworker uses a lot of CPU, Spotlight is usually processing files so your Mac can search them quickly. The safest way to reduce the load is to let indexing finish while temporarily reducing other demanding activity, keep your Mac connected to power, and remove unnecessary locations from Spotlight indexing. If indexing appears stuck, you can rebuild the Spotlight index—but that causes another period of high CPU usage while the new index is created.
Quick Answer
To reduce mdworker CPU usage during Spotlight indexing:
- Confirm that Spotlight is actively indexing.
- Leave your Mac connected to power and avoid interrupting the process.
- Close unnecessary apps and pause large file transfers, backups, and cloud syncing.
- Temporarily exclude large or frequently changing folders in System Settings > Spotlight > Spotlight Privacy.
- If indexing is stuck or repeatedly restarts, restart your Mac and check available storage.
- Rebuild the Spotlight index only as a troubleshooting measure, not as a way to avoid indexing.
mdworker is a macOS background process that reads file information and creates searchable metadata for Spotlight. High CPU usage is often temporary, especially after a macOS update, restoring files, connecting an external drive, or moving a large number of files.
What mdworker Does
Spotlight maintains an index, which is a searchable catalog of files and their contents. The mdworker process helps create that catalog by examining metadata such as:
- File names and locations
- File types and sizes
- Creation and modification dates
- Document text
- Image and video information
- Music and other media details
Several mdworker processes may appear in Activity Monitor while indexing. The number and CPU usage can change as macOS processes different types of files.
High usage is generally normal when:
- You recently upgraded or reinstalled macOS
- You restored data from a backup
- You copied many files to the Mac
- You connected an external storage device
- You changed a folder containing many files
- Spotlight’s index was rebuilt
- A cloud-storage app downloaded a large amount of data
The process becomes more concerning when CPU usage remains high for many hours without visible progress, causes repeated overheating, or returns immediately after every restart.
Check Whether Spotlight Is Indexing
Before changing settings, confirm that Spotlight is doing work. The indexing status may be visible from the Spotlight search interface, or you can check it with a command in Terminal.
For a graphical overview, see how to check Spotlight indexing status on a Mac.
To check the status in Terminal:
- Open Terminal from Applications > Utilities.
- Type the following command and press Return:
mdutil -s /
This reports whether indexing is enabled for the Mac’s startup volume. An enabled volume may still be actively indexing, so this command does not always show the exact amount of work remaining.
You can also ask Spotlight to display indexing activity:
mdutil -a -s
This checks all mounted volumes. External drives may appear in the results, and each volume can have its own indexing state.
Let Indexing Finish With Less Interference
The most effective approach is often to allow Spotlight to complete its work under stable conditions.
1. Connect your Mac to power
Indexing can take time, particularly after a large change to the file system. Keeping a MacBook connected to power reduces the chance that sleep or battery-saving behavior will interrupt the process.
Place the Mac somewhere with adequate ventilation. Do not cover the vents, and avoid using it on soft surfaces that can trap heat.
2. Pause other intensive activity
Temporarily stop tasks that compete for CPU, memory, storage, or network bandwidth, including:
- Large downloads and uploads
- Video exports
- Virtual machines
- Game installations
- Large file copies
- Cloud-storage synchronization
- Backup jobs
- Photo or video library imports
If a cloud-storage service is constantly changing files while Spotlight indexes them, the indexing workload may last longer. Pause syncing temporarily if the service provides a pause option, then resume it after CPU usage falls.
3. Close unnecessary applications
Save your work before closing anything. Then quit apps that are not needed by pressing Command-Q or choosing App Name > Quit App in the menu bar.
Do not force-quit mdworker. It is a system process, and macOS may immediately start it again. Repeatedly terminating it can delay indexing rather than solve the underlying problem.
4. Restart only when appropriate
A normal restart can clear a temporary process problem. Before restarting, save documents and quit apps normally.
Choose Apple menu > Restart, then allow the Mac to start normally. After logging in, give Spotlight time to resume indexing. A restart does not permanently disable indexing or remove its workload.
Reduce Indexing by Excluding Large Folders
You can prevent Spotlight from indexing specific folders or drives. This can reduce future mdworker activity, especially for locations that contain large numbers of files you never search.
Add a folder or drive to Spotlight Privacy
- Choose Apple menu > System Settings.
- Select Spotlight in the sidebar.
- Scroll down and select Spotlight Privacy.
- Click the Add button, if available.
- Select the folder or drive to exclude, then click Choose.
You can also drag a folder or mounted drive into the Spotlight Privacy list.
Good candidates may include:
- A scratch folder containing temporary render files
- A large archive that you rarely search
- A disk used only for backups
- A virtual machine folder
- A folder containing duplicate installers or temporary downloads
Warning: Excluding a location means Spotlight search may not return files from it. Finder searches that rely on Spotlight may also produce incomplete results. Do not exclude your entire startup disk unless you understand the consequences and have a specific reason.
To allow indexing again:
- Open System Settings > Spotlight > Spotlight Privacy.
- Select the excluded item.
- Click the Remove button.
- Confirm the change if macOS asks.
After removal, macOS may index that location again, so CPU usage can temporarily increase.
Prevent Unnecessary Indexing on External Drives
External drives can create substantial indexing activity, especially when they contain media libraries, backups, virtual machines, or many small files.
If you do not need to search an external drive with Spotlight, add that specific drive to Spotlight Privacy while it is connected. This does not delete files or reformat the drive; it only prevents Spotlight from maintaining its index.
Avoid excluding a drive if you regularly use Spotlight to find files stored there. Also remember that a drive may be indexed again if it is removed from the privacy list later.
Check Activity Monitor for the Actual Source
mdworker may be busy because another app is continuously changing files. Activity Monitor can help identify that situation.
- Open Activity Monitor from Applications > Utilities.
- Click the CPU tab.
- Select the % CPU column to sort by processor usage.
- Look for
mdworker,mds, or related Spotlight processes. - Check whether another app is also using significant CPU, disk, or network resources.
The mds process is Spotlight’s metadata server. mdworker processes perform much of the file analysis. You may see multiple related processes, and their names can vary by macOS version.
If a backup, cloud-sync, antivirus, or media-management app is repeatedly modifying files, address that activity first. Do not delete system processes or files from Activity Monitor.
Rebuild the Spotlight Index When Indexing Is Stuck
Rebuilding the index can help when Spotlight returns incomplete results, indexing never appears to finish, or mdworker repeatedly processes the same data. It is not a routine performance tweak. The rebuild itself can temporarily increase CPU, storage, and battery usage.
Rebuild through System Settings
- Open Apple menu > System Settings.
- Select Spotlight.
- Open Spotlight Privacy.
- Add your startup disk to the privacy list.
- Wait a few moments.
- Select the disk in the list and click the Remove button.
Removing the disk tells macOS to index it again. Depending on the macOS version and the selected volume, the exact buttons or confirmation messages may differ.
Warning: Do not use this procedure while important files are being copied, modified, or backed up. Save open documents first, and expect temporary high CPU usage while indexing restarts.
Rebuild with Terminal
Terminal provides a direct method for enabling indexing and requesting a rebuild for the startup volume:
sudo mdutil -E /
What it changes:
sudoruns the command with administrator privileges.mdutilmanages Spotlight indexing.-Eerases the existing Spotlight index and rebuilds it./targets the Mac’s startup volume.
Terminal will ask for your administrator password. The characters will not appear while you type. Press Return when finished.
To check the indexing state afterward:
mdutil -s /
The command does not erase your personal files. However, Spotlight search results may be incomplete until rebuilding finishes, and CPU usage may rise during the process.
If you decide not to rebuild, there is nothing to reverse because the command has already removed the old index. If you only want to turn indexing back on after it was disabled, use:
sudo mdutil -i on /
This enables indexing for the startup volume. It does not instantly complete indexing; macOS still needs to process the files.
Do Not Disable Spotlight as a First Step
You can disable indexing with mdutil, but doing so removes or prevents important search functionality. Finder searches, Spotlight, and some applications may provide incomplete results.
For example, this command disables indexing for the startup volume:
sudo mdutil -i off /
This changes system behavior but does not delete your files. To reverse it:
sudo mdutil -i on /
If you use these commands, enable indexing again when troubleshooting is complete. For most users, excluding a specific folder or external drive is safer than disabling Spotlight across the entire Mac.
Troubleshooting Persistent mdworker CPU Usage
CPU usage remains high after indexing should be complete
Restart the Mac, check for large file transfers or cloud synchronization, and inspect Activity Monitor. Confirm that an external drive is not being indexed unnecessarily.
If the same folder is repeatedly changing, temporarily pause the application responsible. Resume normal syncing after Spotlight settles.
Spotlight cannot find recent files
The files may still be waiting for indexing. Check that their folder or drive is not listed in Spotlight Privacy. If the location is excluded, remove it from the list and allow indexing to complete.
Indexing starts over repeatedly
Look for a drive that disconnects and reconnects, an unstable external storage device, or software that constantly rewrites files. Disconnect nonessential external drives one at a time and observe whether the behavior changes.
Do not disconnect a drive while files are being copied or an app is actively using it. Eject it from Finder first.
The Mac becomes unusually hot or slow
Save your work and close demanding apps. Keep the Mac connected to power only if it has adequate ventilation. If the computer becomes dangerously hot, shuts down unexpectedly, or shows hardware warnings, stop using it and allow it to cool.
Persistent performance problems after indexing finishes may point to another process or a broader system issue rather than Spotlight alone.
You do not have enough free storage
Indexing needs available space for system data and metadata. Remove unnecessary files using normal Finder or macOS storage tools, but do not delete unknown files from system folders. Empty the Trash only after confirming that you no longer need its contents.
Frequently Asked Questions
Is mdworker a virus?
mdworker is a normal macOS process used by Spotlight. A high CPU reading by itself does not indicate malware. If a process with a similar name runs from an unusual location or the behavior continues long after indexing, investigate the specific process in Activity Monitor.
Can I force-quit mdworker?
You can select a process in Activity Monitor and click the Stop button, but force-quitting mdworker is usually not useful. macOS may restart it, and indexing may take longer.
How long should Spotlight indexing take?
The duration depends on the number and type of files, storage speed, external drives, and other activity on the Mac. A large library or freshly restored system can take considerably longer than a small collection of files.
Will excluding a folder delete anything?
No. Adding a folder to Spotlight Privacy does not delete or move its files. It prevents Spotlight from indexing that location, so searches may not find items stored there.
Can I continue using my Mac while Spotlight indexes?
Yes. You can continue working, although demanding tasks may run more slowly. Keeping intensive activity to a minimum can help indexing finish sooner.
Does rebuilding Spotlight delete my documents?
No. Rebuilding removes Spotlight’s searchable index, not your personal files. Search results may be incomplete until macOS creates the new index.
Final Thoughts
High mdworker CPU usage is usually a temporary part of Spotlight indexing. Confirm that indexing is active, reduce competing workloads, keep the Mac ventilated and connected to power, and exclude only locations you do not need to search. Rebuild the index or disable indexing only when normal indexing appears stuck, and re-enable Spotlight after any temporary troubleshooting change.