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: 

Dec 27, 2024 8:39 AM in response to SBML

Thanks for the response. It seems your experience is similar, if also different in interesting ways. I've since found that my large Pages document still causes the process to spike up, but not as quickly as before, and since deleting the plist file for Spotlight, it resolves more quickly when the document is closed. The document is not password protected, so I don't think this is the source of the problem (as least, not by itself). My next step is to make a copy of this document and see if it causes the issue when it is or isn't shared or stored in iCloud. I suspect this is the commonality.


I didn't save the kernel panic report my Mac sent to Apple, but it also ID'd the corespotlightd process. This is what sent me looking at Activity Monitor.

Reply

Dec 27, 2024 12:14 PM in response to Mitch Stone

Hmmm - okay - I'm seeing the same behaviour, but instead of with large documents (mine are sizeable, but not huge), but with _NUMBER_ of documents being accessed.


In my context, I have 8-10 documents open at any one moment (all on iCloud), and an additional 5-20 PDFs opened in Preview.


I did a reinstall of MacOS about 2 weeks ago after this problem cascaded into spontaneous crash-and-restarts even while the machine was otherwise idle (all documents closed), and I was in the midst of a lengthy video call when it decided to crash. (I also saw multiple spontaneous reboots happening overnight when the machine was otherwise idle).


Regarding re-install of MacOS, when I ran Disk Utility from Recovery Mode, it identified a ton of mismatch counts and other filesystem errors that it was unable to repair. At that point, I decided to do a nuke-and-pave, with the computer behaving itself until today when I see corespotlightd chewing CPU like candy again. (It wasn't even appearing in the list for top prior to today).


If the suspicions mentioned above are true, then this appears to be an indexing problem with the interaction between Spotlight and iCloud. (I'm reaching here, but iCloud indexing looks like a common denominator)


Reply

Dec 27, 2024 1:36 PM in response to MgS_2012

I am seeing the issue being triggered with documents stored either locally or in iCloud, so it seems to me iCloud is off the top suspects list. You don't say if the large documents you have open are Pages documents or something else. It would he helpful if you could be more specific. Also, have you tried deleting the plist, as I suggested?


FWIW, I opened a very large TIFF file in Pixelmator and left it open for some time without any issues. Not a lot of surprise there since this file type is one that presumably Spotlight does not attempt to index.

Reply

Dec 29, 2024 3:58 AM in response to Mitch Stone

I am using an M4 mini with 24GB. In the past few days, I've seen corespotlightd running at somewhere around 140% CPU. At best, it drops to about 80%. And I've just checked and seen it at 38.5% - which is the lowest I've seen in days - but moments later bounced back to 132% and remained high. CPU Time 1:07:06.22 despite restarting late last night.


And have started to get beachballs. And stutters - in Pages, in Numbers, in Excel, in Firefox, moving mouse, and other apps.


I have an M1 MBP which, so far, has not suffered this. Yet I edit the same files, which are in iCloud.


Dismounting all my external drives does not help noticeably.


My Pages documents vary from trivial to substantial. And the CPU usage persists even when I quit Pages, and Numbers, and Excel, and Word, almost everything.


It had been running fantastically. That makes it extremely disappointing.


All software is, to the best of my knowledge, bang up to date - and no beta versions/releases.



Reply

Dec 29, 2024 12:02 PM in response to PolyRod

Very similar to my experience.


Timing-wise, it corresponds with the release of the Apple Intelligence software (that's when I started noticing some odd behaviour). I temporarily have disabled Apple Intelligence to see if it catches up and settles down with it disabled (I'm not overly optimistic about that). At the moment I'm watching corespotlightd running up to a peak of 152% CPU, and then going gradually to a low of 18%.


Like yourself, Apple Intelligence I have an M1 MBP that is behaving just fine (but Apple Intelligence is disabled on that machine because apparently it's not available with "English - Canada" selected as a language).


About 2 weeks ago, before I did a re-install of MacOS, I ran Disk Utility from within Recovery, and it spewed a ton of index count errors - don't remember the specific text, but they were all the same, and all clearly some kind of "off-by-one" counting error.


It is marginally possible that I have a failing SSD in the machine, but that seems unlikely.

Reply

Dec 29, 2024 12:22 PM in response to Mitch Stone

%CPU is a bit of an odd duck in today's world of multi-core processors. It made more sense when we were doing things on single-core architectures like the VAX (yes, I'm that old). Back then a process chewing large amounts of CPU was pretty obvious. In a multi-core architecture, a process can simply get allocated to a different core when it gets switched out, resulting in the appearance of using "more than 100%" of a CPU. (The core allocation logic is opaque to most human beings - and I'm not exactly sure what the kernel / hardware interaction looks like there - it's been a few moons since I did any amount of kernel work)


Top in its default form is a bit aggressive, resampling every second. I tend to use the command "top -o CPU -s 5" to make it a little less hungry.

Reply

Dec 29, 2024 1:12 PM in response to MgS_2012

Older versions of Activity Monitor showed each processor core graphically in the Dock icon individually. It is now shown as one, I presume because our current processors have too many cores to depict. I'm still struggling with how a processor showing 80+% idle can be saturated.

Reply

Dec 30, 2024 11:22 AM in response to SBML

Thanks for reporting a similar experience with large Pages files. In my case, the app doesn't need to sleep, the process cranks up after 10-15 minutes of active use, maybe a little longer. Closing the document causes it to return to normal background operation in seemingly the same timespan. By then app has self-quit, usually.


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.


Not sure how to file a report with Apple, or which log files need to be submitted.

Reply

Dec 30, 2024 1:37 PM in response to MgS_2012

Follow-up to my earlier observations:


Yesterday, after using my M1 MBP for several hours with no issues to do the same kind of document editing use-case that I had going before, I decided to turn off Apple Intelligence on my M3 iMac, and so far it although I do see corespotlightd occasionally spiking in CPU, it comes back down in a reasonable amount of time, and is not causing random freeze conditions, nor has it caused a CPU panic at this time.


I have a follow-up call with Apple Support tomorrow morning. (I started squawking about this with them last week when the problem resurfaced after a re-install of the OS).


Correlation? It seems concerningly probable that something to do with Apple Intelligence integration is related to this issue.

Reply

Dec 31, 2024 11:38 PM in response to MgS_2012

MgS_2012 wrote:

I have a follow-up call with Apple Support tomorrow morning. (I started squawking about this with them last week when the problem resurfaced after a re-install of the OS).

Correlation? It seems concerningly probable that something to do with Apple Intelligence integration is related to this issue.

A connection to AI is a reasonable conjecture, given the timing of this problem for most of us, but I have seen reports of this issue going back several years. I am also not seeing it on my MBA, which is fully updated and with the AI features enabled on it as well. I'm not surprised that an OS reinstall did not help, for reasons I've previously described. Many will be interested in a report on your call with Apple Support.


Meanwhile, another observation: the spikes in CPU usage as shown in Activity Monitor seem to be in User rather than System. This suggests creating a new user on your Mac and seeing if it inherits the problem. My theory is that it won't, because the issue is with a corrupted plist in the user directory.

Reply

Jan 1, 2025 12:11 AM in response to Mitch Stone

I was also convinced that this was related to having a large Pages file open. But then, after archiving last month's 35MB+ file and starting a new, empty one, I had the same issues that would not go away, even if I quit Pages.app and waited. It was making my Mini virtually unusable for writing (my main task) so I switched to my iPad, rebooted the Mini and started running Clean my Mac routines on it. No significant change. corespotlightd had shot to the top of the usage list within a minute or so of reboot and stayed there. By this time, I had two terminal widows open alongside Activity Monitor and I was watching what was going on carefully ('-s 5' to slow things down and '-o state' to list stuck processes at the top). At various times I could have up to 20 stuck processes. One of them was launchd which led me to some further research and the idea of disconnecting my Time Machine Drive. Within a few minutes corespotlightd had vanished from the CPU usage list. Reopening the previously opened Pages file was fine until I swapped to another programme and then corespotlightd returned. I saved and quit Pages and it went away again. I'm including all this info in case anyone else is having the same issues as I am. Maybe try disconnecting the time machine drive? (It seems a bit nuts, I know Spotlight isn't supposed to index that drive.)

Reply

Jan 1, 2025 8:46 AM in response to MgS_2012

Thanks for your posts! I have large Pages files on my M2 MB Air and Apple Intelligence turned on. Editing those docs is when I first noticed the problem that eventually led me to corespotlightd high CPU usage. I’m wondering if Writing Tools in Apple Intelligence is the culprit. I talked with Apple Support yesterday (NYE) and made it to the point in troubleshooting where we identified it as a User issue and not system wide. We progressed to a system re-install, which you already know doesn’t work. I’ll talk with Support again tomorrow, but in the meantime, I’ve turned off Apple Intelligence on my Mac to see if it will also calm down

Reply

Jan 1, 2025 9:11 AM in response to Rollwagen

It's almost certainly a user issue, as the CPU load graph shows. I'm sorry Apple put you through a reinstall. A world of hurt for no benefit. Support should know better. If you can get your problem escalated to Level II Support you can talk to someone more knowledgeable who won't take the blunderbuss approach. Ultimately this needs to be handed over to Engineering.


Rollwagen wrote:

Thanks for your posts! I have large Pages files on my M2 MB Air and Apple Intelligence turned on. Editing those docs is when I first noticed the problem that eventually led me to corespotlightd high CPU usage. I’m wondering if Writing Tools in Apple Intelligence is the culprit. I talked with Apple Support yesterday (NYE) and made it to the point in troubleshooting where we identified it as a User issue and not system wide. We progressed to a system re-install, which you already know doesn’t work. I’ll talk with Support again tomorrow, but in the meantime, I’ve turned off Apple Intelligence on my Mac to see if it will also calm down


Reply

Jan 3, 2025 9:02 AM in response to Mitch Stone

Turning off Apple Intelligence on my M2 MBA macOS 15.2 stopped corespotlightd from hogging the CPU, dropping the process from in excess of 250% of CPU to 0.0 % within 8 hours. However, when I went back into my Pages doc (currently 1.2 MB, stored on iCloud), I continued to experience the spinning rainbow wheel, although less frequently and for less time. I've also experienced hesitation in my other apps (including while typing this post!), but no spinning wheel. I've talked with a member of the Senior Support Team at Apple and have arranged for them to collect data for Engineering to evaluate. That happens this coming Tuesday (my schedule doesn't fit with theirs until then). As much as we all don't like it, it appears it's a problem we'll have to live with for a bit until Engineering can figure out what's happening

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.