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 Feb 9, 2025 10:26 AM

After the better part of another day thinking about and troubleshooting this issue, I am convinced that Eric Murphy's earlier hypothesis is correct. There's a bug in Sequoia, which anyone can replicate by following these 2 steps:

  1. Open a Pages file (and keep it open).
  2. Watch the size of this folder balloon: ~/Library/Metadata/Corespotlight


The larger that folder gets, the more likely it is that the corespotlightd process will start taking over the CPU and causing slowdowns for the Mac user. The corespotlightd process is what gets most people's attention, but it's only a symptom of the underlying problem whereby the spotlight processes (mdworker, etc.) write enormous amounts of data into the corespotlight subfolders.


The bigger the Pages file the quicker the folder grows in size; the more frequently one uses Pages, or leaves Pages files open, the worse the problem.


There is no fix until apple implements one, and the only viable workaround is to monitor the size of that folder and occasionally delete it.


One silver lining: it's not clear to me that there is any need to delete your spotlight index, to turn indexing off and on, etc. The problem stems from the size of that metadata folder, and you can alleviate the problem by deleting the folder. In my experience (having deleted the folder many dozen times), spotlight works just fine without rebooting, reindexing, or anything else.


I came up with my own way of dealing with this issue: I wrote a simple shell script that trashes the corespotlightfolder; then I added that as a service in launchd so that it can run regularly (maybe every 2 days).

190 replies
Sort By: 

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.

Reply

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.


Reply

Jan 13, 2025 8:16 PM in response to Mitch Stone

Mitch Stone wrote:


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

That's true, but usually if it was using 800% of CPU time and then I force-quit, it will at least go back to more reasonable resource usage, like 150% or so.


Which is still preposterous for a process that just indexes files.

Reply

Jan 18, 2025 4:08 PM in response to RThomas


I can still recommend deleting the spotlight plist, as I described in one of my earlier posts. It doesn't seem to be a silver bullet, but the last time I did so the process calmed down and has remained manageable for several days now.


RThomas wrote:

Has anyone found ANYTHING that actually works?


Reply

Jan 28, 2025 3: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.

Reply

Jan 28, 2025 8: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.


Reply

Feb 3, 2025 4: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.

Reply

Feb 4, 2025 2:56 AM in response to SBML

Hi, I am new Reading this post and writing. I started having these kind of problems a couple of months ago. My MacBook Pro is from June this year, so less than one year old.


I have checket and I also have a store.db file of 17,51 Gb and another one of 1,91 Gb.


What soul I do about it? Can I just delete them?


Thank you ver much!

Reply

Feb 6, 2025 2:39 PM in response to ericmurphysf

Currently trying this out to fix that bug myself, and I have absolutely no idea what I'm doing. So I just want to make extra sure I got what you're saying. Now when you said deleting the metadata out of Corespotlight and SpotlightKnowledgeEvents, can I just delete everything inside those folders? Not working with Terminal here. Or keep the folders inside intact and just delete the lists and whatever is in there? Thanks!

Reply

Feb 6, 2025 3:01 PM in response to fronesis47

In a word, yes. I have two Macs (an M2 Ultra Studio and an M1 MBA), and neither was migrated from a previous Mac. Of these only the Studio exhibits this problem. I'm not sure what you mean by without migrated data, though. My files and apps were manually migrated on the Studio.


Some of the theories for the origin of this issue are interesting but probably have to be treated as theories. As I've mentioned in previous posts, since the last time I deleted the spotlight plist, I have not been afflicted by this issue. It's been a couple of weeks now.



fronesis47 wrote:

But I really wonder if anyone out there can replicate this problem on a brand new Mac without any migrated data???


Reply

Feb 6, 2025 3:54 PM in response to Mitch Stone

Mitch Stone wrote:
I'm not sure what you mean by without migrated data, though. My files and apps were manually migrated on the Studio.


I meant migrated automatically, using the migration assistant. On my M3 air I did not use migration assistant at all, and that machine is not affected by this problem.


Some of the theories for the origin of this issue are interesting but probably have to be treated as theories. As I've mentioned in previous posts, since the last time I deleted the spotlight plist, I have not been afflicted by this issue. It's been a couple of weeks now.


It's interesting that you've had good success with only deleting that plist file. I had previously deleted almost everything, and the problem came back.


I have just now again deleted the entire corespotlight folder in (in the library folder) and the preferences file you mentioned, but I think I see the corespotlight folder already growing again. We'll see.

Reply

Feb 6, 2025 4:08 PM in response to fronesis47

fronesis47 wrote:

I have just now again deleted the entire corespotlight folder in (in the library folder) and the preferences file you mentioned, but I think I see the corespotlight folder already growing again. We'll see.

This has been my experience too. An hour or so after deleting the contents of these folders, I'll see a few GB of metadata accumulating already. And if I have a Pages file open, that growth will continue. Just a week after deleting all of this metadata (on a computer that had a particular Pages file open and being edited more or less continuously), the CoreSpotlight folders had already grown to over 100 GB.


In my experience, having a Pages file open on a system, at least a large one, but even if you're not actually editing it, seems to accelerate the accumulation of metadata. On one of my systems I had a ~14 MB Pages file open, and metadata seemed to accumulate at 10-20 GB per day. Closing that one file when I wasn't actively editing it greatly slowed down the accumulation of metadata.


As noted elsewhere, my hypothesis is that when you have a Pages file open (especially if you're editing it), the various Spotlight processes don't just reindex the changes; they re-index the entire file, and not by replacing existing metadata but by adding to it. In my case, the Pages files in question are synced via iCloud and are being edited on multiple Macs. It seems that if you close the file, then edit it on another computer, and then later re-open it, Spotlight reindexes the entire file, but only that one time (until you edit it some more). If you leave it open while you're editing it on another system, the same thing happens: Spotlight seems to reindex the entire file with every edit. This can add tens of gigabytes a day of metadata on a file that might only be a few megabytes in size.


Until Apple releases a fix for this issue (which may or may not ever happen), I think the best way to avoid rapid accumulations of metadata is to close Pages files when you're not actively editing them. Even having them open on another system and editing them there (if they're synced via iCloud) will still lead to vast quantities of metadata creation, as much at 20 GB a day.

Reply

Feb 8, 2025 10:15 AM in response to fronesis47

I believe this to be all true and correct. The various painkillers we are taking for this condition are just palliative. I find that deleting the plist for Spotlight mitigates the issue, but only for a while. Incidentally, no matter what other measures you take, an OS update will cause the process to spike. I presume this is normal behavior.


Now I wonder if anyone can trigger this issue with files other than Pages. This seems to be the commonality, but I'm uncertain. Also, the next experiment for someone to try is to create a new user on your Mac and open a file that triggers the process in that user account. I'm guessing that it won't.


NB: The widget for sorting these threads chronologically can't be found consistently in any one place, but if you scroll through the posts you will usually find one attached to a post. Why Apple makes this so hard is just another mystery.


fronesis47 wrote:


AshkaTheMoltenFury wrote:

So in short: give the cleanup of the ~/Library/Caches folder a try. It might help and solve this high CPU usage of corespotlightd. Hope this helps anyone.


Unfortunately, I think that apple's default to "sort by rank" means that many people are MISSING the most important discoveries in this thread. The above WILL make things better, but only temporarily – it's treating the symptom, not the cause.

The cause of all this, as ericmurphy has laid out and a number of us have replicated, has to do with a problem with spotlight indexing of Pages files. Even if you clean everything out, as above, if you then open Pages files (especially larger ones) and keep them open, you can literally watch as the various mdworker processes write MASSIVE amounts of data into the core spotlight metadata folders. Depending on other aspects of your system, at some point that folder will get so big that the corespotlightd process will slow your Mac down.

The temporary workaround• is to regularly delete the metadata folders.
The temporary and still very much less than ideal "fix• " is to TURN OFF spotlight indexing.
Any real solution• here will require Apple to make some tweak to spotlight or Pages.


Reply

Feb 8, 2025 10:28 AM in response to CaptainJoy

No, but nobody has found a permanent fix. The last time I deleted the plist it seemed to mitigate the issue for a several weeks. Other times, it came right back. Others report that deleting the data files has similarly inconsistent results.


CaptainJoy wrote:

Mitch Stone said:
Curiously, deleting the Spotlight plist file does tame this behavior for better part of a day.
Turning off the "help Apple" selection in the Spotlight settings as suggested by another user
did as well. But this is not a sticky fix. The problem always returns, at least for me.
Mitch Stone, you've been advocating for deleting the Spotlight plist file. The reason I opted for deleting the contents of the CoreSpotlight and SpotlightKnowledgeEvents folders was because you said on Dec. 30 that deleting the Spotlight plist file was a fix that would only last about a day. Am I misunderstanding something?


Reply

Feb 8, 2025 1:18 PM in response to fronesis47

I agree with Mitch Stone: it would be good to know if other documents (such as Numbers files) cause the same problem, and to see what happens with a new user.

THANK YOU to sugarskyline for showing me how to change the default presentation of the message board.

During all my trials and tribulations with this issue I've had several Numbers files open on various computers (I almost never use Keynote). Most of the Numbers files are not very large (half a megabyte or so), but one is nearly a hundred megabytes. That's mostly embedded graphics though, and I'm not sure how much indexing gets done on graphics.


In any case, Numbers files do not appear to make either corespotlightd or Spotlight metadata spike. YMMV, naturally.

Reply

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.