Stopping runaway CPU usage by mds, mdworker, and mdimport
I found that mds and mdimport were constantly running, and often taking up to 90-100% of my CPU when it was otherwise idle.
These processes are used by spotlight to index the hard drive and make files searchable. It usually runs when the system is idle and should run instantly whenever files are updated. My CPU usage seemed excessive though, and detrimental to battery life.
So I dug around to see if I could reduce the idle time CPU usage. This is mostly for me to refer back to later.
By running this command, I was able to see what files mdworker was opening to index:
sudo fs_usage -w -f filesys mdworker
(via http://superuser.com/questions/46195/why-does-mds-run-wild-in-mac-os-x-10-6)
… and I discovered the main culprit: Backblaze (cloud backup) was generating file lists whenever anything was change don the system, and mds was indexing them. Combing through these logs for a while, i added a few exclusions to spotlight’s indexing via the System Preference which seems to have dramatically reduced the activity mds/mdimport activity.
- /Library/Backblaze
- /Users/amit/Library/Caches
- /System/Library/Caches
- /Users/amit/Library/Cookies
- /Users/amit/Library/Application Support/Crash Reporter
- /Users/amit/Library/Preferences
- /Users/amit/Library/PubSub
- /Users/amit/Library/Application Support/Quicksilver
- /Users/amit/Library/Safari
- /Users/amit/Library/Application Support/Spanning Sync
- /Users/amit/Library/Logs/Sync
- /Users/amit/Library/Application Support/SyncServices
There were all frequently being indexed and things I didn’t need to search for.
37 notes
-
uglycomputer likes this
-
maxfenton likes this
-
hkitago reblogged this from superamit
-
victorcristian reblogged this from superamit
-
onaniena reblogged this from superamit
-
austinwebdesigner likes this
-
yashrg reblogged this from superamit and added:
5 year old laptop.
-
yashrg likes this
-
trollega likes this
-
purns likes this
-
silence-is-deadly likes this
-
afoxykanaya likes this
-
derbyboy likes this
-
thatmarvin likes this
-
madh likes this
-
quepol likes this
-
danielsmith89 reblogged this from superamit
-
rodbegbie likes this
-
roads2roam reblogged this from superamit
-
joshmohrer likes this
-
msg likes this
-
marco likes this
-
christmasgorilla likes this
-
kevin likes this
-
superamit posted this