Mdworker process 100% Deleting it with Terminal

SD-B

macrumors 6502
Original poster
Apr 1, 2009
399
12
Since getting 10.92 I have started to notice in my processes a process, "mdworker" which is continuously using 99.9% processing power

Upon doing a search, I understand its happening since Maverick and one needs to apparently follow the instructions on the page I have listed below, in Terminal.
https://discussions.apple.com/message/23832053#23832053

arghya.calcutta
Re: mdworker keeps running at 100%
Nov 26, 2013 10:32 AM (in response to htibatong)
Try stopping Spotlight.

I was having the same problem. Both in Snow Leopard and Mavericks. I stopped using Spotlight and the mdworker CPU problem is gone.

Disable Spotlight

Use terminal to type the fllowing command. You need admin access.

sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

Reenable Spotlight

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist


Ref: http://osxdaily.com/2011/12/10/disable-or-enable-spotlight-in-mac-os-x-lion/
What I want to know is exactly how I type this......where I see "sudo launchctl unload -w" I see spaces between the words........am I supposed to leave those spaces when I type this in or not?

As siily a question as this might seem, I just want to be doubly careful and make sure when I do type it in, I do it correctly.
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
29,180
8,833
California
You would include the spaces just like it is shown. Just copy and paste from here directly into Terminal to avoid any typos.

To disable:

Code:
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
To enable:

Code:
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
Sometime this happens because Spotlight is hung up on a particular file or folder it is trying to index. Open Console app from /Applications/Utilities and look for any mdworker errors shown and see if that points to a file or folder problem area.
 
  • Like
Reactions: costica1234

SD-B

macrumors 6502
Original poster
Apr 1, 2009
399
12
I did look through for some time but was unable to find anything for it but I have since disabled it, pasting it in as you typed

Thank you, for the first time in days its not doing that
 

thekev

macrumors 604
Aug 5, 2010
6,671
1,748
It relates to spotlight as you have seen. You can disable access specifically to system level files while retaining others. This is accomplished through system preferences using the privacy option. Having a lot of newly installed or updated files prompts spotlight to update. You experience this as a result.
 

Rich Smith

macrumors newbie
Jan 27, 2017
1
0
Are you using Dropbox? If you go into your System Preferences/Spotlight - "private" option and "+" select/add Dropbox (it's set up as a mountable device), it will probably solve your problem. You can probably leave Spotlight running, and disable the directories you don't need. The Dropbox "mdworker" will not be included in your processes, eliminating the drilling down via the internet to the crap on your remote drive. That is a quick and dirty if indeed the stuff on D'box does not require searchability.
 
Last edited: