Sunday, December 09, 2012

Spotlight indexer (mdworker) priority is too high in Lion/Mountain Lion.

Spotlight was badly behaved in Leopard, but by late Snow Leopard Apple seemed to have most of the bugs worked out.

Not so in Lion/Mountain Lion. It's hogging resources and seems ever more prone to corruption. I think, among other things, Apple set the process priority too high -- perhaps because they're now coding for SSD storage. Spotlight can paralyze my 2 yo 27" iMac; sometimes a forced shutdown is my only option (which seems to corrupt the index -- so I pay back later).

Windows Process Explorer allows adjustment of process priority, but Mac Activity Monitor doesn't. There are ways to adjust mdworker priority by editing / attributes of LowPriorityIO and Nice, but these seem like risky system edits. On my currently too-slow MacBook running Lion I, will, however, experiment with the recommendations on this site:
Shortcuts I use to set up a new OSX user account
Set Spotlight indexer (mds, mdworker) to a lower processor priority:
sudo defaults write /System/Library/LaunchDaemons/ LowPriorityIO -bool true
sudo defaults write /System/Library/LaunchDaemons/ Nice -int 20
(there are several speedups on this page I'll try on the MacBook)
I think there's more than one bug with Spotlight in Lion/ML. For example, I think performance deteriorates over time. I need to restart my ML system much more frequently that Snow Leopard.

Apple needs to give lots of attention to Spotlight in its ML maintenance updates.

See also:


Gnarlodious said...

There I was reading your blog (which I subscribe to by RSS) and suddenly there was my name!

John Gordon said...

You did a great job on that page. Thanks for sharing it!

John Gordon said...

Also, interesting web site. I was tagged as Golem :-).