I just got a brand new 13" MacBook Pro at work. I have noticed that Spotlight has been running constantly giving me ~4 hours of battery life. The motivation for getting this laptop was to have the portability of an 8+ hour laptop.
Searching online, I saw indexing a directory that is synced by a service such as Dropbox/Syncthing would lead to excessive indexing. To eliminate this as the source of the problem, I excluded from the Spotlight indexing the directories updated using sync services. I even went so far as to exclude my entire home directory from Spotlight. Yesterday I tried deleting the Spotlight index forcing it to re-index, and it has been running constantly for the last 24 hours without change. The hard drive is 512 GB but only have 122 GB of data.
I now think the problem may be caused by Sophos, the required anti-virus software. I have seen other posts commenting on these applications conflicting but the solutions recommend removing Sophos, not an option for me. Are there settings that allow these applications to ignore each other? Perhaps I need to have Spotlight ignore the Sophos files. Where are the status files for Sophos stored?
Edit:
Here are the results of the command mdutil -a -s
(I get the same result with/without sudo
):
2016-04-18 00:36:53.470 mdutil[12692:72953] Metadata.framework [Error]: mdsCopyStorePaths failed: (268435459) (ipc/send) invalid destination port
Spotlight server is disabled.
I am not entirely sure what to make of this. Viewing the system status using htop
, the most demanding process is /System/Library/CoreSerices/Spotlight.app/Contents/MacOS/Spotlight
using 112-160% of a CPU.
This Apple thread recommends completely deleting the /.Spotlight-V100/
directory and rebooting. I tried this but it does not seem to do anything. After rebooting, the folder was not recreated, Spotlight is still consuming a excessive system resources, and mdutil
still reports the same thing (I tried enabling the server using the command
mdutil -a -i onbut this produces the same output as
mdutil -a -s` shown above).
Spotlight
, this is a bad movie. I would estimateSpotlight
to eat the CPU and the I/O for 2 to 3 hours but no more. Did you look atActivity Monitor
to see if there isn't another problem going on?Activity Monitor
shows several applications running butSpotlight
is the only one using much CPU. TheEnergy
tab showsSpotlight
is the only application with energy impact above 1.App Store
)? ----- Do you see anything else which might be harvesting your filesystem?