Continued corespotlightd process CPU overload issues

I am wondering if anyone has discovered any new ideas for stopping the corespotlightd process from hogging the CPU. According to Activity Monitor, the corespotlightd process often occupies more than 100% of the CPU load, sometimes spiking as high as 400% on my M2 Ultra Mac Studio. This problem has become so severe that it often pinwheels under normally non-intensive tasks. It can cause the video to flicker on my Studio Display. In one case it caused my Mac to kernel panic (crash).


I encountered this bug only after installing Sequoia 15.2, but having researched this issue extensively, I find that Mac users have identified it since at least macOS Ventura. So here are some solutions we don't need to hear again:


Reindexing Spotlight by adding and removing volumes in Spotlight Privacy. This provides relief only temporarily. Within hours the process is again grinding the Mac to a halt.


Killing the corespotlightd in Activity Monitor. Again, this is at best only a temporary solution as the process will reinstate itself.


A "clean" install of macOS. First of all, no such process really exists. The OS recovery process simply reinstalls a new copy of the System files. Nobody reports this as a fix. An internal drive wipe and reformat, and restore from Time Machine is also unlikely to help, as it simply returns your Mac to its previous state. If the corespotlightd problem results from a corrupted file, the problem will likely simply be recreated in your reinstall. "Nuke and pave" might solve the problem if it caused by a format or directory issue on your startup volume. This does not seem to be the case, but if anyone has permanently cured the problem by this method, please report it.


What we do need to hear is from anyone who has spent time with Apple Support on this issue and been provided with solutions that actually work, or has new ideas about what causes it. Feels like we're on our own here, since Apple seems to be stumped.



Posted on Dec 19, 2024 11:21 AM

Reply
Question marked as Top-ranking reply

Posted on Dec 31, 2024 11:01 PM

On my M4, tried

while true; do killall -9 corespotlightd 2>/dev/null && sleep 0.5; done &

this seemed to get rid of the process if run for a few seconds. But then opendirectoryd comes up and consistently uses about 20% of cpu.

305 replies

Apr 7, 2025 01:34 AM in response to PolyRod

Still generally good.


Pages has fallen over a few times.


One document was interesting - I had the ToC visible and, when I made changes to the text, I could see the consequent ToC changes rippling through for some time, maybe half a minute or more. I wonder if propagation of changes to ToC, in order, was one of the things that has been fixed?

Apr 8, 2025 02:34 PM in response to Mitch Stone

Mitch Stone wrote:


I'd ask whether you are still seeing any performance hit along with the growing size of the metadata file. The real problem, practically speaking, is how the issue manifested itself as essentially unusable Mac systems. This is more critical than anything we see going on in Activity Monitor or in our metadata files. I can convince myself that this issue remains when I see occasional spikes in the corespotlightd and related processes, but these spikes are transitory. I no longer see any degradation of actual system performance, which was a huge and obvious problem before. So I would say, quit Activity Monitor, resist looking at that metadata directory, and just use the Mac for a while and see how it runs. I think that is how we determine whether Apple has slayed this issue in 15.4. My feeling is they probably have, at least for Apple silicon systems.

On my two Intel systems, I start seeing relatively minor performance issues when Spotlight metadata exceeds about 50 GB (which under 15.4 seems to take less time than it did under earlier versions of Sequoia). Mainly I see that smart folders in Mail take longer to update, and searches in Mail also take longer.


But I did't see severe problems on either Intel system until metadata was well over 100 GB.


All that said, I was having severe problems, especially with video playback, on my Mac Studio (but not on my M2 MBP) when metadata was very large on the two Intel systems, even though metadata on the Mac Studio never exceeded about 40 GB (the only thing connecting these systems is iCloud sync. I have no idea why (it could just be coincidence), but after I deleted excess metadata on the two Intel systems, the issues I was having on the Mac Studio vanished, so far (it's been two months) not to reappear.


YMMV, obviously, but what has kept me out of trouble so far has simply been deleting metadata from both Intel systems when it grows past 40 GB. I've seen absolutely no downsides to doing so, and the multiple issues, with Time Machine, Spotlight search, Mail smart folders/search, CPUs pinned, fans pinned, etc. have vanished. Having to delete these folders every couple of days instead of once a week on 15.4 vs. earlier versions is only slightly annoying.

Apr 28, 2025 06:04 AM in response to ericmurphysf

ericmurphysf wrote:
If anything 15.4 seems to have worsened the problem of extremely rapid buildup of Spotlight metadata.

Me too. My metadata folder had stayed between 2 and 10 Gb for months. With 15.4.1 I'm over 30Gb.


The next experiment will be to quit Pages for a while and see if metadata comes down in size.

Also bad news here, for me. Prior to 15.4 the folder would shrink quickly after I closed all Pages files. Now it's stubbornly stuck about 30Gb.

Apr 28, 2025 09:44 AM in response to fronesis47

I will continue to recommend that we pay attention to real-world performance, rather than looking elsewhere for problems that may not actually be problems. The size of the metadata files may be related to the Spotlight bug in some way, but we don't have the technical information to know how, and this by itself could very well not be the cause of the performance hit. So I say, in the name of sanity and productivity, to stop obsessing over your metadata files size and Activity Monitor unless you find that your Mac is performing poorly.

Apr 28, 2025 02:10 PM in response to fronesis47

The point being, we don't know the relationship between the size of this file and the performance hit, which we do know is caused by the process going berserk. As you say, the relationship between the two is anecdotal, at best. No cause and effect is known, at least not to us. So my completely practical advice for those who want to get on with their work is to not assume you have a problem unless you have the problem. If you have the problem, then try the variously suggested solutions. Attacking this the other way around is not doing yourself any favors. Or to put this in a familiar way, if it ain't broke, don't fix it.

May 8, 2025 12:10 PM in response to CaptainJoy

CaptainJoy wrote:

tl;dr — trash your ~/Library/Metadata/CoreSpotlight folder

This has consistently been my experience. I start running into issues with Spotlight Search when this folder exceeds about 40 GB. The system runs into serious performance issues on my computers (which have 32+ GB RAM) when it gets above about 100 GB.


I'm a heavy Pages user, with 10+ MB Pages files open all the time, which seems to accelerate the growth of this folder. So once a week or so I just trash the entire folder.


It's kind of like mowing the lawn.

May 13, 2025 02:43 PM in response to Mitch Stone

Mitch Stone wrote:

No evidence points to iCloud being implicated in this issue in any way whatsoever. Certain large Pages documents that have been extensively edited appear to be the most common trigger of this issue, and it is not dependent on them being stored locally or in the cloud.

From what I can tell, what triggers rapid accumulation of Spotlight data specifically with large Pages documents is the way macOS automatically does versioning of such documents. That versioning is not due to sync via iCloud; it's simply the design decision of allowing the user to revert to any prior version of the doc, or indeed copying data from earlier versions to the current version if e.g. you accidentally deleted a paragraph or section of a document.


My hypothesis (so far not confirmed by Apple) is that the rapid growth of Spotlight metadata is an artifact of the various daemons doing Spotlight indexing (md_worker, etc.) reindexing the entire document, rather than just newly-edited sections. This happens whether or not you have iCloud sync turned on.

May 13, 2025 02:50 PM in response to ericmurphysf

ericmurphysf wrote:


Mitch Stone wrote:

No evidence points to iCloud being implicated in this issue in any way whatsoever. Certain large Pages documents that have been extensively edited appear to be the most common trigger of this issue, and it is not dependent on them being stored locally or in the cloud.
From what I can tell, what triggers rapid accumulation of Spotlight data specifically with large Pages documents is the way macOS automatically does versioning of such documents. That versioning is not due to sync via iCloud; it's simply the design decision of allowing the user to revert to any prior version of the doc, or indeed copying data from earlier versions to the current version if e.g. you accidentally deleted a paragraph or section of a document.

My hypothesis (so far not confirmed by Apple) is that the rapid growth of Spotlight metadata is an artifact of the various daemons doing Spotlight indexing (md_worker, etc.) reindexing the entire document, rather than just newly-edited sections. This happens whether or not you have iCloud sync turned on.

I obviously can't confirm it either (we need apple for that), but in my many hours of troubleshooting this, I am always led to the conclusion that the above hypothesis is exactly right.

May 19, 2025 06:03 AM in response to Mitch Stone

Hi Mitch. I always assumed the issue was related to Pages. But this latest spike persisted for hours even with all apps closed and my SSD and iCloud removed from indexing. [ChatGPT suggested that a corespotlightd spike of >200% (which is happening as I type this accompanied by the SBBoD!) is likely is an indexing loop or bad database, and advised deleting the index in Terminal with sudo mdutil -E /. 


I did this and nothing changed!


So, it’s now 4 hours later . . .  during that time, I reinstalled Sequoia and after logging back in, corespotlightd did its spiky thing for around 15 mins and now, finally, all is back to normal. Activity Monitor is reporting that 97% of CPU is free and just a few Efficiency Cores are ticking over as I write this in the Notes app. Such bliss: this M4 MacBook Air is such a spectacular machine . . . when it functions normally.


I have not yet opened Pages: before I dare to do that (and risk turning my Mac’s performance back into the MacPlus I owned in 1986), I have placed all the Pages documents upon which I am currently working in a folder called ‘In Progress’ on the Desktop. Using the System Settings Search Privacy tool, I have excluded this folder from Spotlight’s purview (I hope!)


If I need to open any other Pages documents as I work, I will add them to this In Progress folder before I risk opening them!


I will update this post and let folk know if it’s a strategy that works … when I open Pages and start work in the next hour.


BYW, I have reported this corespotlightd problem via Apple’s Feedback web pages for Mac OS and for Pages. Back in 2013, I did the same thing for a process called mdworker (which was also Pages related, in fact it was caused by ONE single Pages document that was full of graphics, originally created in ClarisWorks, whose documents could be imported into Pages.) I was contacted by Apple (by email) and the Pages team asked me to send the Pages file and install a profile on my Mac. I did both, sent Apple the profile file . . . and the next OS update [or it may have been Pages update, I don’t recall] solved the issue. 


That was a pretty niche issue, and yet the Pages Team reached out to me. The current issue is far less niche as it seems to affect anyone who uses Pages. Wouldn’t it be superb, if Apple reached out to one of us for this latest Pages/corespotlightd crisis!

May 19, 2025 06:13 AM in response to Mitch Stone

Yesterday, I again deleted the contents of the CoreSpotlight metadata - on both M1 MBP and M4 mini. (Both bang up to date on Sequoia 15.5)


Despite using Pages and Numbers (the two problem apps for me) - the contents have remained modest for about 24 hours so far. Currently well under 2GB on both machines and not obviously growing.


Can I afford to raise some optimism? Or will it suddenly revert to excess growth of CoreSpotlight and mixed beachball and non-beachball freezes? I've been somewhere like this before...

May 19, 2025 09:26 AM in response to Mitch Stone

I too have mentioned it happens due to Numbers. Having had lots of occurrences and problems when using Pages, I thought I had the same issue with Numbers. I made sure that neither Pages nor Numbers was running, I think I restarted, and as soon as I started using Numbers problems, started.


However, it might be limited - as in only some spreadsheets. I am doing lots of more-or-less "text database" work in Numbers - rather than calculating. Possibly in numeric/calculating Numbers sheets there isn't a problem? (Just wanted to say this so that others can check this before replying.)

May 20, 2025 12:22 AM in response to Mitch Stone

Does anyone with this issue not use Time Machine for backups?


While everything seems to be working well on my M1 MBP at the moment, the spotlight folder grew substantially after I had done a TM backup. From under 2 GB to almost 10 GB. Could spotlight indexing of TM backups be contributing to the size of the spotlight metadata?


I simply plug in a 1 TB external drive every so often and did that between checking the spotlight folder yesterday at 16:55 and this morning at 08:00.


In other words, if we clear the spotlight folder we see reasonable space usage until we run a TM backup. At which point it grows enormously. This might explain my observation that everything works OK for hours, even days, after clearing spotlight. Then suddenly the space usage rises enormously.

Continued corespotlightd process CPU overload issues

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