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 Jan 31, 2025 8:44 AM

Okay, I have a new hypothesis as to what's going on here with corespotlightd. This process is one of at least four that are responsible for macOS's Spotlight functionality. The three others are mds, mdworker, and md_stores. I cribbed the following descriptions of these three processes from the HowToGeek website:


The two processes [mds and mdworker] are part of Spotlight, the macOS search tool. The first, mds, stands for metadata server. This process manages the index used to give you quick search results. The second, mdworker, stands for metadata server worker. This does the hard work of actually indexing your files to make that quick searching possible.


And for md_stores, from the TechNewsToday site:


Mds_stores is the core indexing process of the macOS. On normal days, it usually takes up a noticeable [sic, probably should be un-noticeable] amount of CPU. However, when you reinstall your OS or add new files/directories, your system will automatically start to reindex these new databases, which sees the mds_stores CPU usage skyrocket.


The macOS Spotlight feature makes use of two processes for indexing the system database; mds and mds_stores. The mds (Metadata Server) process is responsible for tracking and recording files and folders in your operating system. md_stores then compiles and manages these mds metadata, which Spotlight later uses for searching certain documents within your OS.


So it may be that corespotlightd is in fact an unwitting victim of other processes' having gone awry. On my two Intel systems, by three months after installing macOS 15.0, metadata associated with Spotlight located at ~/library/metadata had reached half a terabyte on both systems. It sounds like this data was actually written out by either mdworker, mds_stores, or both. And then, corespotlightd has to wade through these gigabytes upon gigabytes of metadata to actually produce search results, and as that task gets harder and harder with more and more metadata being produced, eventually Spotlight search results (which includes search and smart folders through Mail) degrade to the point of uselessness.


While I haven't managed to halt the rapid growth of metadata on these two Intel systems (Apple Silicon Macs still have the issue but to a much milder degree), simply deleting the metadata out of the ~/library/metadata/Corespotlight and ~/library/metadata/SpotlightKnowledgeEvents (while leaving the folders themselves intact) resulted in a near-immediate improvement in three areas: greatly reduced use of storage space; vastly improved search results; and much lower processor utilization by corespotlightd.


As noted, this metadata still continues to pile up (especially if I have a large (>5 MB) Pages file open). But if I have to empty out these two folders once every few weeks until Apple resolves the issue, that's not the end of the world).


346 replies

Jan 6, 2025 8:57 AM in response to Mitch Stone

After installing macOS 15.2 earlier today, I cannot reproduce the issue. Apart from a single Google Chrome Helper (Renderer) process massively hogging the CPU (which did not return after a force-quit), I've gone from having 27 stuck processes with corespotlightd hogging the CPU to zero stuck processes and corespotlightd very occasionally flashing up in the top-5 of the usage list then vanishing again. No more spinning beachballs. No data entry issues. Time Machine drive reconnected and working. Fingers crossed this has fixed the issue.

Jan 6, 2025 11:19 PM in response to SBML

Good to hear this update helped you, but I am running 15.2 on all of my Macs (3) and still have the issue on one of them.


SBML wrote:

After installing macOS 15.2 earlier today, I cannot reproduce the issue. Apart from a single Google Chrome Helper (Renderer) process massively hogging the CPU (which did not return after a force-quit), I've gone from having 27 stuck processes with corespotlightd hogging the CPU to zero stuck processes and corespotlightd very occasionally flashing up in the top-5 of the usage list then vanishing again. No more spinning beachballs. No data entry issues. Time Machine drive reconnected and working. Fingers crossed this has fixed the issue.


Jan 7, 2025 9:08 AM in response to Mitch Stone

I have 370Mbs down and 94Mbs up. Pretty sure it's not a network problem. Also, I was seeing virtually no network activity when the processes were 'stuck'. I'm now two days into updating to 15.2 (build 24C101) on my 64Gb M4 Pro Mini and the issue had not reoccurred once. FYI, I also have an 2017 Intel iMac running OS 13.7.1 on the same network and that has not had any problems with corespotlightd or processes getting stuck during this time. I'm going to attach a photo (screenshot obviously not an option at the time) of the two Terminal windows I had open to see what was going on. You can see 27 stuck processes, mostly PPID 1 so child processes of launchd which was also stuck. Here endeth my google-assisted technical expertise, I'm just adding it in case it helps someone figure out what's been going on.

Jan 12, 2025 6:03 PM in response to ericmurphysf

By any chance did you look at the graph at the bottom of the Activity Monitor window when this was happening to see how much of the CPU remained idle? I still think it is odd that this process can be reported as taking up 100 percent and more of the CPU in the process list, when the summary at the bottom of the window shows the CPU as rarely being less than 80 percent idle.


ericmurphysf wrote:

Just for, I don't know, comic relief maybe: I came home today to find that corespotlighd was using 1,400% of available CPU time on my 8-core iMac Pro.

How the system avoided crashing completely is a bit of a mystery.


Jan 12, 2025 7:05 PM in response to Mitch Stone

Mitch Stone wrote:


By any chance did you look at the graph at the bottom of the Activity Monitor window when this was happening to see how much of the CPU remained idle? I still think it is odd that this process can be reported as taking up 100 percent and more of the CPU in the process list, when the summary at the bottom of the window shows the CPU as rarely being less than 80 percent idle.

I don't remember specifically but I know the CPU looked pretty pinned in all three places: CPU usage, CPU history, and the utilization graph at the bottom of the Activity Monitor window. In any case, I'd never seen a single process use remotely this kind of CPU time before. All this, just to index the filesystem? Seems kind of insane.


Fortunately, force-quitting the processes restored normality.

Jan 12, 2025 9:49 PM in response to Mitch Stone

When I was experiencing the freezing issue, the graph would occasionally show a system spike, but the idle figure never dropped below about 75%. It never seemed to me to be about the CPU, but more about how many other processes to show as 'stuck'. However, I never saw a 'not-responding' in red in the Activity Monitor, only the 'stuck' state in a Terminal window with TOP -s 5 -o state.

Jan 12, 2025 10:35 PM in response to ericmurphysf

I've tried force-quitting the process. It restarts around 15 seconds later.


ericmurphysf wrote:


Mitch Stone wrote:


By any chance did you look at the graph at the bottom of the Activity Monitor window when this was happening to see how much of the CPU remained idle? I still think it is odd that this process can be reported as taking up 100 percent and more of the CPU in the process list, when the summary at the bottom of the window shows the CPU as rarely being less than 80 percent idle.

I don't remember specifically but I know the CPU looked pretty pinned in all three places: CPU usage, CPU history, and the utilization graph at the bottom of the Activity Monitor window. In any case, I'd never seen a single process use remotely this kind of CPU time before. All this, just to index the filesystem? Seems kind of insane.

Fortunately, force-quitting the processes restored normality.


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.