Do Sophos and Spotlight conflict and if so, how can I run both applications without problems

batterycpuperformancespotlight

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 commandmdutil -a -i onbut this produces the same output asmdutil -a -s` shown above).

Best Answer

They don't conflict. Spotlight is a pig on any first run on a newly accessed filesystem. On the other hand, Sophos will double the load caused by controlling all these filesystem accesses.

I suggest you to let Spotlight terminate its heavy initial run alone by temporarily turning off the On-Access control of Sophos: Sophos On-Access Off

I also suggest you to turn off the scan on Files on network volumes, because this will load your Mac, your network and finally your network volumes. On a well managed network, this scanning should be run directly on the storage servers.

Once this 1st run terminated, Spotlight will less tend to be a CPU and I/O hog.