6

EDIT: I appear to have a temporary fix using mdutil - see the end of the post - but I am not sure if it is a permanent fix, so I am still interested in answers.

I have an iMac running Mac OS 10.15.4 (Catalina). My problem is that every few minutes, /System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framework/Versions/A/Support/mds_stores starts up, and keeps going until my hard drive is full, and then seems to give up and give me my disk space back. (I believe it is not a "disk" now, but I will stick with the terminology). Not only does it make my disk full at unpredictable times, it also uses a lot of memory.

mds_stores appears to be the indexing program used by Spotlight; I am happy to disable both. I never use Spotlight.

I have followed the suggestions at https://www.technipages.com/macos-sierra-enable-disable-spotlight , i.e. disable System Integrity Protection, run

sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

and then re-enable System Integrity Protection. But it does not work. It does not appear to have disabled Spotlight (I can still see a magnifying glass icon in the top right corner of my status bar) and it certainly does not stop my real problem: mds_stores running and filling up my disk.

I have also seen it suggested that I remove the index files via:

sudo rm -rf /.Spotlight-V100/*

However on this version of Mac OS (10.15.4, Catalina), there is no directory /.Spotlight-V100

20-Apr-20,15:26:46 ~> sudo ls -a /
Password:
.           .VolumeIcon.icns    .vol            System          bin         etc         private         usr
..          .file           Applications        Users           cores           home            sbin            var
.DS_Store       .fseventsd      Library         Volumes         dev         opt         tmp

I have also see the suggestion (at http://itechinspector.com/mds_stores-process-consuming-high-cpu-usage.html and also at https://discussions.apple.com/thread/8658455 ) to run sudo mdutil -a -i off . When I originally posted this was not working, but when I tried later in the day it did work:

20-Apr-20,21:35:27 ~> sudo mdutil -a -i off
Password:
/:
2020-04-20 21:35:40.665 mdutil[8406:156351] mdutil disabling Spotlight: / -> kMDConfigSearchLevelFSSearchOnly
    Indexing disabled.
/System/Volumes/Data:
2020-04-20 21:35:40.778 mdutil[8406:156351] mdutil disabling Spotlight: /System/Volumes/Data -> kMDConfigSearchLevelFSSearchOnly
    Indexing disabled.

[It also gave me back a ton of disk space. I was sitting at 27 Gi free, which mds_stores would gradually gobble up. After running the above command, I suddenly have 55 Gi free; so I got back 28 Gi, more than 10% of my disk!]

So I appear to have a temporary fix, which I assume will go away next time I reboot. Does anyone know if that (or something else) disables Spotlight and mds_stores, permanently, for Catalina? (Because it looks like it might work a little differently to earlier Mac OS versions).

5
  • have you seen system preferences > spotlight > privacy ?support.apple.com/en-in/guide/mac-help/mchlp2811/10.15/mac/… – anki Apr 20 '20 at 6:42
  • @ankii I did both of those suggestions (before I tried anything else); and it was no help. – Peter B Apr 20 '20 at 7:18
  • I’ve got to ask why you want to disable this - you’re asking an astute question about a specific operation, but I wonder if there’s a different way for you to reach your actual goal. No worries if you’re not up to answer the why. The system uses spotlight at a very deep level to function, so I wonder if you’re about to break things if there’s a more narrow or targeted solution that’s at hand to your need. – bmike Apr 20 '20 at 12:27
  • @bmike I wanted to disable it because it was chewing up CPU, memory and disk space, severely hampering the performance of my computer (as outlined in the 2nd paragraph). Also, I never (knowingly) use it. I can't see anything in its descriptions, e.g. at en.wikipedia.org/wiki/Spotlight_(software) , to suggest it is essential. – Peter B Apr 20 '20 at 12:46
  • Works - 20 GB freed up! – jtlz2 Dec 14 '20 at 7:19
3

In my experience, a failing disk and/or a disk filesystem that’s damaged or failing is the cause for most spotlight processes that run too long. Also, metadata importers that are added by programs like Office and others run to index their files and can cause issues.

Before you disable this entirely, have you opened the spotlight settings and added each user home folder to the privacy? This cleans all records of those user files from the database. Then you would restart the machine and perhaps boot to recovery HD and run Disk Utility to repair the disk.

Sometimes a clean install is all that’s needed - https://apple.stackexchange.com/a/66690/5472

Clearly, spotlight needs to take one pass over all the data, but then it should quit. As you say, if you don’t need it, adding the folders you wish to not have indexed is the easy way to let the system index things it needs, but ignore your user files, database files and other things that might cause temporary or permanent resource usage. I could see some high transaction data based never getting indexed if they don’t tell spotlight to not index files.

3
  • I had already tried removing things from indexing at System Preferences -> Spotlight -> Privacy, it didn't help. I don't use Office much so I don't see a problem there. Obviously the possibility of a damaged filesystem is scary (thanks for alerting me to that), but so is doing a reinstall! So I'm going to carry on without Spotlight (and with backups of course) for now. – Peter B Apr 21 '20 at 4:21
  • Good plan @PeterB just having office installed means the office plug in run in spotlight, so temporarily uninstalling every app you don’t use much can improve spotlight. It has to index everything for all apps before they run, causing more calculations and possibly the loop/bug that makes it never finish indexing. – bmike Apr 21 '20 at 10:26
  • @bmike, is this correct? "...Clearly, spotlight needs to take one pass over all the data...". – cheakypawl Sep 6 '20 at 10:59
2

My mds_stores, kernel_task, corespotlightd and other processes related to spotlight, have written and read over 10tb on my ssd in couple of days. After tried all solutions I could find on internet, I finally solved it by dragging my user folder into privacy list of Spotlight. I have no idea what happened and what caused it. But this madness reduced my ssd life to 47% from nearly full. Guess that's why you need to buy apple care.

2
  • I'm in the same boat and am wondering how you figured the ssd life.. Thanks for bringing that up btw, I didn't even think that all those read-writes would take a toll :( – ari gold Sep 23 '20 at 19:54
  • it was shown on iStats app. I know its not accurate just reference. But 10tb writing is just scary. – Arthur Wang Oct 2 '20 at 18:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .