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.
51 notes
jbinfrisco liked this
alex-weber liked this
azian-kiss liked this
graziergeek liked this
female-only liked this
crustnik liked this
bradmcgonigle liked this
zeb liked this
alesf liked this
thesfkid liked this
human-p7us liked this
pickled--thoughts reblogged this from superamit
koalaura liked this
uglycomputer liked this
maxfenton liked this
hkitago reblogged this from superamit
victorcristian-blog reblogged this from superamit
onaniena reblogged this from superamit
strangelytyped liked this
yashrg reblogged this from superamit and added:this is very helpful for me who owns a 5 year old laptop.
yashrg liked this
purns liked this
silence-is-deadly liked this
kanaya liked this
derbyboy-blog liked this
thatmarvin liked this
madh liked this
quepol liked this
danielsmith89 reblogged this from superamit
rodbegbie liked this
roads2roam reblogged this from superamit
joshmohrer liked this
msg liked this
marco liked this
christmasgorilla liked this
superamit posted this- Show more notes