MacResource
mds, mds_stores, and lsd taking up WAY too much memory - Printable Version

+- MacResource (https://forums.macresource.com)
+-- Forum: My Category (https://forums.macresource.com/forumdisplay.php?fid=1)
+--- Forum: Tips and Deals (https://forums.macresource.com/forumdisplay.php?fid=3)
+--- Thread: mds, mds_stores, and lsd taking up WAY too much memory (/showthread.php?tid=260084)



mds, mds_stores, and lsd taking up WAY too much memory - PeterB - 09-23-2021

Hi all,

On my Mac Pro (2012) running Mojave, all of a sudden I've noticed that I'm getting slowdowns and the major culprits are the three processes above, with one of them taking > 20 GB of memory. I end up force quitting these, the problem then goes away, but later recurs.

So far, I've tried running Onyx to get it to rebuild the launch directory and Spotlight index, but this hasn't solved it through a reboot.

Any ideas? I'm wondering if one of the recent system updates is to blame.

TiA


Re: mds, mds_stores, and lsd taking up WAY too much memory - anonymouse1 - 09-23-2021

Doesn't mds memory use go up in indexing? Did you add a bunch of files, clone a drive, something like that?


Re: mds, mds_stores, and lsd taking up WAY too much memory - Speedy - 09-23-2021

Or even reconnect a drive.


Re: mds, mds_stores, and lsd taking up WAY too much memory - PeterB - 09-24-2021

anonymouse1 wrote:
Doesn't mds memory use go up in indexing? Did you add a bunch of files, clone a drive, something like that?

Yes, I thought it's some insane Spotlight indexing, but I didn't add a bunch of files or clone a drive or anything like that, beyond the usual (I do nightly clones).


Re: mds, mds_stores, and lsd taking up WAY too much memory - Sarcany - 09-24-2021

Could try completely clearing the Spotlight indexes.

Mojave is the last OS you can really do it on.

In the Terminal...

sudo mdutil -a -i off
sudo rm -rf /.Spotlight-V100


Reboot your Mac, then run...

sudo mdutil -a -i on


Give it a few hours to rebuild indexes. Maybe overnight.

Do some searches to confirm that Spotlight is working.

And then check the Memory and CPU usage again.


Re: mds, mds_stores, and lsd taking up WAY too much memory - PeterB - 09-24-2021

Sarcany wrote:
Could try completely clearing the Spotlight indexes.

Mojave is the last OS you can really do it on.

In the Terminal...

sudo mdutil -a -i off
sudo rm -rf /.Spotlight-V100


Reboot your Mac, then run...

sudo mdutil -a -i on


Give it a few hours to rebuild indexes. Maybe overnight.

Do some searches to confirm that Spotlight is working.

And then check the Memory and CPU usage again.

I can't get past your second command (sudo rm -rf /.Spotlight-V100) ... it gives me an "operation not permitted" error.

Edit: but if the purpose of the second command is to delete the Spotlight index, I'm using Onyx now to cause it to rebuild the index... we'll see if that works.


Re: mds, mds_stores, and lsd taking up WAY too much memory - Sarcany - 09-24-2021

Ahh fudge!

I forgot that SIP was extended to protect the V100 directory in Mojave.

Have to disable System Integrity Protection or boot to an external HD to wipe it. (Can enable SIP again afterwards.)

https://osxdaily.com/2015/10/05/disable-rootless-system-integrity-protection-mac-os-x/

Thing about "resetting" Spotlight indexes through other means like the Privacy tab of the Spotlight pref's window or ticking the box in Onyx is that you are only deleting cells in tables and rebuilding the tables. You're not deleting the database and supporting files themselves so it's not a complete reset. If the problem is just that your Spotlight search results are incomplete, an ordinary rebuild is a fairly reliable fix. If the Spotlight process/daemon seems to be misbehaving, nuke the V100 folder.

Anyway, that's my approach. Smile

Please let us know if the rebuild fixed the problem.