mds excessive memory usage

I didn't see any threads about this since 2011 or so, so I thought I would make a new thread instead of commenting on an old one.


My computer (Mac Pro, details below) becomes slow after running for a few hours. Looking into it, I find that mds is using a very large amount of ram and a significant amount of processing power as well. In the activity monitor currently, it shows that mds is using 17.25 GB (out of 32) of real memory and 15% CPU. This is not a short term issue, it continues until I reboot.


Old threads suggested that changing many files at once could cause similar problems. I am running large problems which create multiple GB of output files, but at a relatively small pace. I don't think that this is an issue.


Another suggestion was that time machine backups could be the problem due to mds hanging on indexing the time machine volume. I do have a time machine backup but I disabled it when the problem started without any change in the symptoms. Perhaps related: my time machine backup would become stuck in the indexing backup stage. This started around the same time as the mds problem.


I'm currently running OSX 10.7.5. I can't upgrade at this time because of compatibility issues with the software I use.


I'm at a loss as to what the issue is. Any suggestions would be appreciated.


Thanks,

J.



Computer specs:

Mac Pro

OS X 10.7.5

2x2.66 GHz 6-Core Xeon

32 GB RAM

Mac Pro, Mac OS X (10.7.5)

Posted on Apr 21, 2014 8:07 AM

Reply
8 replies

Apr 21, 2014 8:25 AM in response to jthunes

mds and mdworker are the spotlight file indexing tasks. They should quiet down after a while, but it may take an hour or two under certain circumstances.


Slowness could indicate Directory problems that might be fixed by a Disk Utility (Repair disk). If repairs are actually needed, you will need to use Disk Utility while booted from Recovery_HD, or restart in safe mode (which does the repair as it starts up) followed by restarting in regular mode.

Apr 21, 2014 8:37 AM in response to Grant Bennet-Alder

Yes, I know that mds is a spotlight indexing process. However it doesn't quiet down. It consistently uses 10+ GB of RAM, approximately 1/3 my total available. This will continue for days. The only way to reduce it is to restart my computer.


I did check the disks (both my main drive and the external time machine drive) using the disk utility. No problems were found on either of the disks.

Apr 21, 2014 9:40 AM in response to jthunes

Corrupt index then and time to delete and have it create a new index.


http://www.bing.com/search?q=rebuild+mac+spotlight+index+and+database+mds



XBitlab and others have how to tips and instructions, very easy to do.


Not something a disk check will find, though it is a good idea to use Recovery Mode and repair your system drive.


I would also look at and remove 3rd party drivers and extensions and background processes as much as possible.


I assume could also index in Safe Mode.


Having the system on an SSD helps. Would help more to have the freedom to move the spotlight index off the sytem drive, maybe have an index for a drive be on the drives themselves.


10GB of memory is out of control. It isn't multithreaded or wasn't in the past, so you should also be seeing 100-110% activity showing.

Apr 22, 2014 7:56 AM in response to The hatter

The hatter,


As you suggested, I rebuilt the spotlight index. It took a few hours to reindex it all, but this morning the same problem is occuring: mds is using a lot of memory.


I've stopped as many other programs as I can. Nothing is running except for the few programs that I require.


It seems like they've made the process multithreaded. Right now, it's showing 50% CPU and 120 threads. Memory is about 12 GB.

Apr 22, 2014 8:25 AM in response to jthunes

This is one time where you want to do one or two long extra steps it seems.


Clone a drive with CCC with advanced option to do checksums on all files copied (and we are talking whole drive)


scan drive for bad or weak sectors. SoftRAID 4.x does that all the time in the background and on all I/Os


SMART Utility may be good choice also or use to but something that maps out.

TechTool Pro scans and finds weak or bad sectors but then would say "you need to zero or do a 3-way write erase with Disk Utility"


I had some files of zero size but locked and would not go away that I needed to get rid of before I could safely use the drive / copy files


Disk Utility does not look at files and whether they are valid. Dlloyd has a file integrity checker too. Disk Warrior will if you use OPTION key on REBUID where it will then skip the directory and scavenge the entire drive and build a new directory based on what is actually on drive and found. Can take days in some cases.


And you don't know where or what files and drive volume it is that triggers this. But it is so beyond normal I have no idea what would cause Splotlight MDS process to hog 10GB RAM.

Sep 18, 2014 1:50 AM in response to jthunes

I have the same problem, with the amount of memory mds using only limited by my disk size. When I had a 1TB HDD, it would grow to over 100GB and the machine would become unusable. Now I'm running on a new SSD and it grows until the (smaller) disk fills up, about 60TB, then the machine crashes. I've tried every fix I've seen and the only thing that works is turning off spotlight, which is most unfortunate. Seems Apple products just aren't as good as the mythology suggests!

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

mds excessive memory usage

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.