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

Jan 7, 2025 06:07 AM in response to Mitch Stone

Hi, Mitch. After talking with Apple Support, I discovered I had a different problem. I'm a bit embarrassed about it. Router performance is basic 101 troubleshooting and I failed to speed test the router as part of looking into continued lags and spinning wheels after I had turned off Apple Intelligence (which successfully addressed corespotlightd hogging the CPU). I ran a speed test and it showed my router was running at an upload speed of 2.61, dreadfully slow, especially when working with large documents on iCloud (where all my Pages documents reside). Also, there's several discussions out there regarding how quickly we can upload documents to iCloud, which might cause delays and even spinning wheels while editing large documents, like the Pages documents I've been working with. So, I'll need to decide if I want to fork out $50 a month to increase my upload speed or just move my large Pages docs to my computer and back them up to my external drive. >>sigh<<

Jan 7, 2025 07:25 AM in response to Mitch Stone

Update: Slow upload data speeds appear to be causing lags/spinning wheels while working in my larger Pages documents on iCloud. I often work at remote locations using a VPN. I have no control over the upload speeds on these remote Wifi connections (community college Wifi, coffee shops, etc). So, I moved my large Pages files off iCloud drive to my computer drive. Since moving the files, I have not encountered any issues high CPU usage, lags, or spinning wheels while working on those documents. Emboldened, I turned on Apple Intelligence and so far, everything is working perfectly. No processes are hogging the CPU and there are no delays/spinning wheels while working within any app, including Pages.

Jan 7, 2025 08:27 AM in response to Rollwagen

Curiouser and curiouser. Good this worked for you, but I've already established that moving a document that triggers the process from iCloud to my local drive does not change the behavior. Also, other Macs on my network don't have the problem. We also have very fast service, 225 mbps down and 22 up. So I feel I have completely eliminated network speed as a possible culprit, at least in my case. Looks like I will have to get on the phone to Apple eventually.


Rollwagen wrote:

Update: Slow upload data speeds appear to be causing lags/spinning wheels while working in my larger Pages documents on iCloud. I often work at remote locations using a VPN. I have no control over the upload speeds on these remote Wifi connections (community college Wifi, coffee shops, etc). So, I moved my large Pages files off iCloud drive to my computer drive. Since moving the files, I have not encountered any issues high CPU usage, lags, or spinning wheels while working on those documents. Emboldened, I turned on Apple Intelligence and so far, everything is working perfectly. No processes are hogging the CPU and there are no delays/spinning wheels while working within any app, including Pages.


Jan 7, 2025 08:51 AM in response to MgS_2012

Slightly OT, but I've often had the same questions about what Apple means with "%CPU." Obviously Apple does not make single-core systems anymore; my two Intel Macs have 8-core CPUs (one is a Core i7 and the iMac Pro is a Xeon) with hyperthreading turned on, meaning (in some sense) they have 16 cores. My Mac Studio has a 20-core M1 Ultra and my MBP has a 12-core M2 Max.


So if corespotlightd is using, say, 750% of CPU time on an 8-core CPU with hyperthreading, what does that actually mean? In my experience very few processes impose any kind of load on the 8 virtual cores. You'd think with Apple Silicon it would be more straightforward, with no virtual cores (although performance vs. efficiency probably complicates matters somewhat). But what's puzzling to me is that I'll watch my Mac Studio spin-lock as corespotlightd spikes up to say 225% CPU, but looking at CPU history in Activity Monitor, I'll see that eight of 20 cores have essentially zero load on them.


I know that some processes have to run on an individual core and cannot be split across multiple cores. But it sure seems like even if corespotlightd were pinning four cores, other processes, like say typing into an email, should still be able to use other processors that are seemingly idling.


Is this an issue with the Mach scheduler? I mean ultimately it's hard not to blame a process that can soak up nearly 800% of "%CPU" but still….

Jan 7, 2025 01:06 PM in response to ericmurphysf

One more piece of curious business. Today I added an external drive back into Spotlight indexing, a disk loaded with PDF files. Immediately this invoked the process "CGPDFService" in four separate threads. If I understand properly, this service indexes PDF files for Spotlight. Activity Monitor reports each process takes up a nearly identical 90-98 percent of the CPU but with roughly 80 percent of the CPU idle. They have been running for over two hours now but without slowing the Mac down to a crawl and corespotlightd hasn't approached the top of the list since.

Jan 10, 2025 10:47 AM in response to SBML

This is interesting but I am not sure what to make of it. The store.db file I found at the first path on my Studio is 17.7GB. I guess that's kind of shocking, but only without checking it on any other Macs to see if it's normal. You might watch yours to see if it grows. It's tempting to try to removing it, but that directory contains 224 files, including several others that are quite large, so this seems like a long shot and potentially a risk.


SBML wrote:

Offering some additional info that may or may not be useful.
When I was experiencing this issue (before updating from 15.1.1. to 15.2), there were two very large store.db files in the meta data:
Library/Metadata/CoreSpotlight/Priority/index.spotlightV3/store.db
Library/Metadata/CoreSpotlight/NSFileProtectionCompleteUntilFirstUserAuthentication/index.spotlightV3/store.db
Both were over 11GB each.
Since updating, when I'm working with iCloud-based Pages files, although corespotlightd occasionally shows on Activity Monitor taking over 300% of CPU, it doesn't stay long or create any persistently stuck processes, cursor freezes, or data entry issues. However, those store.db files have now been reduced to 24MB and 193MB respectively. From GB to MB has got be an improvement, right?


Jan 12, 2025 06: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 07: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 09: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.


Jan 28, 2025 03:37 AM in response to Mitch Stone

Firstly, thank you deeply to the person that made this thread and came to the realization about Pages. I was going crazy trying to research corespotlightd and having nothing work. Secondly, is this likely to be fixed with Sequoia 15.3? Finally, while I don't have much to add other than confirmations of what's already been said, I have noticed that corespotlightd will inevitably start to bug after a while no matter how small the document is. It simply takes longer. If I open my big document of hundreds of pages, it's immediately. But I've also had open files that are just 2 pages, and while everything remained calm for a while, after about 30 minutes it's back to acting up again, despite iCloud for Pages and Apple Intelligence being deactivated.


Also, before disabling any iCloud app sync I didn't need, I was also having major issues with several iCloud daemons (technically still am, just to a much lesser extent). This whole thing feels like an Apple Intelligence related screw up, where (for whatever reason) the system is wrongfully tasked with a process it cannot complete, or, it is unable to recognize the task has already been completed. I don't mean this as in Apple Intelligence the service itself, I mean regarding whatever software changes they made to the OS outside of Apple Intelligence in order to accommodate for it (if that makes sense).


I upgraded just a week ago from a base model M1 MacBook Air to an M4 Pro Macbook Pro and on that Air I didn't get to update to 15.2 because I was having issues getting the update to download properly, but I'm grateful, cause I never had any issues on that device related to Pages or iCloud. This M4 Pro came with 15.2 already installed, and I believe I had to update my iWork apps for the current version (which I regret). Whenever Pages is opened the fans will inevitably kick in (CPU increase), the battery drain is as severe as if I was using DaVinci Resolve, and the disk will write over 80mb every 10 or so seconds. Whenever I force quit corespotlightd it simply restarts extremely aggressively, writing over 100mb every second. At its absolute worst, before I found this thread and tried the remedies, I had lost over 60GB of storage space in just a couple hours (labeled as System Data). The disk write per 8-10 seconds was in the low hundreds.


Last thing worth noting, when I tried logging into my Apple ID during the initial setup for my M4 Pro (with Sequoia 15.2 already installed), I would get the rainbow wheel about 10 seconds after doing so. I would reach the screen for setting up the system and profile name, and then I'd get hit with the rainbow. This happened to me twice in a row before I decided to just skip logging into my Apple ID upon setup, and when I did that, the device setup went perfectly fine. Not sure if this is related, but considering all the iCloud issues I figured it's worth noting.

Jan 28, 2025 08:41 AM in response to ericmurphysf

Interesting. Checking these folders on my M2, I find that the size of the CoreSpotlight folder is 37GB, but no file within it is even a megabyte in size. The SpotlightKnowlegeEvents folder clocks in at 463 MB. It contains far more subfolders, so it is difficult to figure out where this data is hiding. Has your performance been improved by deleting the contents of these folders?


And another FWIW: Since the last time I deleted the Spotlight plist about a week ago, I have had no corespotlightd process issues. So I do think this is worth trying.


ericmurphysf wrote:

I'm not sure how many other people with this issue have seen degraded Spotlight results (including in Mail) as a result of corespotlightd's misbehavior, but I managed to at least temporarily resolve some of these issues by, on the advise (or at least consent) of Apple support, deleting the contents of the two folders, CoreSpotlight and SpotlightKnowledgeEvents, from ~/library/metadata/.

Note that I deleted the contents of these two folders, not the folders themselves. Also note that on Apple Silicon systems the SpotlightKnowledgeEvents folder is inside the CoreSpotlight folder. On Intel systems, it's at the root of ~/library metadata.

However, deleting the contents of these folders (on my system those contents comprised over half a terabyte of data) did not permanently resolve the issue. In barely twelve hours Spotlight added 22 GB of new metadata to these two folders. But I think until Apple resolves this issue (I doubt it will be in 15.3), simply deleting the contents of these folders when they get over a couple of hundred GB will definitely improve system performance, especially search.

Also note that in my experience these issues are less serious on Apple Silicon Macs. On my M2 Max MBP and my M1 Ultra Mac Studio, these folders are large but not enormous; 40 GB on the first system and 18GB on the second one.


Feb 3, 2025 04:05 PM in response to CaptainJoy

CaptainJoy wrote:



ericmurphysf asked:
How heavy a user of Pages are you?
I use Pages all the time. As a rule, I always have at least one Pages document open, and often one or more are >10 MB.

I suspect this is the root of the problem. I don't know if the amount of metadata accumulated on your system is comparable to mine, but for the last quarter of last year I was editing at least one file (on multiple Macs) that by that time had grown to ~200 MB (roughly 1,200 pages with many embedded graphics), and I'm pretty certain the result was half a terabyte of metadata saved in my user library folder. I strongly suspect a consequence of that amount of metadata was system instability, major issues with Time Machine backups, and degraded search performance in Spotlight to the point of unusability.


Since deleting this metadata last week, all three of these issues have resolved. The one remaining issue is that metadata continues to accumulate at an alarming rate, which will likely force me to remove it just as I did the last time, probably within the next two months. I'm pretty sure this is a bug somewhere in Apple's code that will need to be resolved via a future macOS update.

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.