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

Dec 29, 2024 08:54 AM in response to PolyRod

Thanks, I will give this a try. Did you try deleting the Spotlight plist? This seems to help somewhat, at least until macOS writes a change to the plist, which seems to happen in the middle of the night. BTW, if you do remove the plist I've found a reboot isn't required to recreate it. Just log out of your account and back in.


Another peculiarity of this bug: I don't understand how it's possible for any process to exceed 100% of CPU capacity, but in any event, even when the corespotlightd process runs to 200% of CPU or higher, the total usage stats at the bottom of the Activity Monitor still shows no less than 80% of the CPU idle. The usage graph confirms that in fact CPU usage is far from saturated, but the Mac sure performs as if it is overloaded.


If someone with a technical understanding of how this works can ring in, I'd sure appreciate an explanation of what is going on.

Dec 29, 2024 01:04 PM in response to a brody

I argue against calling any install "clean" that does not involve reformatting the drive, starting with a new OS install, then hand-migrating all files, apps, and data from old to new. I know from hard experience that migrating from a Mac with issues to a brand new Mac, that the issues the old Mac had will simply be transferred to the new one, because the migration tool copies everything, including problems. The same will happen using a Time Machine backup to restore your Mac. So I generally believe that the term "clean install" should never be used, if only because you are condemning the person you are advising to spending potentially a full day to most likely achieve nothing. Diagnosing drive issues can be accomplished much more quickly and painlessly using Disk Utility. In any event, it appears that the corespotlightd process problem is unrelated to System or HD issues.

Jan 28, 2025 07:46 AM in response to Mitch Stone

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.

Jan 31, 2025 08:44 AM in response to Mitch Stone

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).


Feb 6, 2025 03:06 AM in response to CaptainJoy

Unfortunately for me none of the notable "fixes" listed in this thread have worked much for me. Multiple system processes in general are out of wack with this update, which I feel are related, and the only actual thing that works in keeping my SSD at any level of "normal" is not having Pages open at all. My document isn't nearly as large as what has been listed here, mine is only 1.3MB; a couple hundred pages with zero images and some hyperlinks, and yet opening it, even if I don't do anything with it, will spike disk reads up to ridiculous levels and cause the CPU to rise high enough to make the fans kick. If I were to make any edits, even just a few letters, disk write will multiply several times over compared to the idle. Feel pretty defeated on this especially since without this issue I'd otherwise be loving my new Mac that I just spent thousands on, and especially since this feels like one of those things Apple will never acknowledge.

Feb 6, 2025 03:00 PM in response to luzggg

luzggg wrote:

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!

When I spoke to Apple Support last week, the advisor suggested I delete the contents of the two folders (the entire contents, files and any subfolders; you don't need to go through each subfolder and laboriously delete its contents individually), but not the folders themselves. You don't need to do this from Terminal; you can just trash the files/subfolders from the Finder the way you would normally do it (just make sure you're in the User library, not the System library, which you can make visible on the "Go" menu in the Finder by holding down the Option key).


Other users have said they've been successful deleting the entire folders, contents and all, without ill effects. But having removed the folder contents themselves without deleting the actual folders, I've obtained satisfactory results all three times I've done it, on two different systems (twice on one of them).


Also note that the folder structure in the ~/library/metadata/ folder differs from Intel systems compared to Apple Silicon systems. On Intel systems, the CoreSpotlight/ folder and the SpotlightKnowledgeEvents/ folder are both at the root of the Metadata/ folder. On Apple Silicon systems, the SpotlightKnowledgeEvents/ folder is inside the CoreSpotlight folder. I have yet to try this fix on an Apple Silicon system since it hasn't been necessary for me, but it sounds like you can delete the entire contents of the CoreSpotlight/ folder without any problems.

Feb 8, 2025 02:42 AM in response to AshkaTheMoltenFury

Thank you for this. I tried it and things were actually looking promising. After 25 minutes though I decided to make an edit on my 1.3MB Pages document just to see if it would continue behaving, and unfortunately it did not. After about a minute CPU usage spiked greatly and the disk began writing immense amounts again. When the document wasn't touched at all however after opening, the system behaved (like 99% so). Definitely the most effective thing listed so far but unfortunately it still goes downhill after the first edit.

Feb 8, 2025 06:22 PM in response to Mitch Stone

I'm chiming in to document very similar issues and use-case scenarios. Lots of Pages docs open through iCloud storage (grad school student). I started noticing the slow down occurrences in the fast 2 weeks, with growing regularity. I've been running 15.3 for most of that time I believe. The effects show up across every app. The most drastic occurrences seem to be in my Notes app. I've got tons of notes, a few collaborative, some small, some large. I often get a slow down while typing in notes, and regularly have the app freeze on me and require a forced quit of the Notes. Pages has had those slow blips, but never a full freeze and force quit.

I've disabled Apple Intelligence, and switched off the option of sharing Spotlight data with Apple. It seems that has kept the identical "corespotlightd" process from overloading my system constantly, although I am watching Activity Monitor spike with "corespotlightd" over 100% once in a while.

Feb 10, 2025 07:00 AM in response to Mitch Stone

Just got off a 30 minute phone call with Apple Support. Their engineer team is aware of the issue and have been since February 8th, 2025. The person I spoke to added my case to the engineer team's file on the issue. They are also now aware of this thread. The person I spoke to read everything posted here. The thread itself is also now attached to their file.


I think everyone reading this with the same issue should contact Apple Support so they can have as much information as possible to fix this, in addition to making sure this gets resolved soon enough. They asked me to provide screenshots during the online chat portion, and over the phone they requested me to turn off my VPN (it didn't do anything), turn off and back on iCloud optimization (it didn't do anything), and boot into safe mode (it didn't do anything). They also wanted me to reinstall macOS but I made it clear that wasn't going to happen, and also that in another thread people already tried that in relation to corespotlightd to mixed results.


To do exactly what I did, go to Apple's website. Click Support on the right side of the screen. Scroll down to the section that says "Get Support" (it's quite large with a black button stating "Start Now" and a Memoji underneath). Under "View your products" click "Choose a product". Select your Mac. Click More. Scroll down and click Storage. Click continue. It should give you an option for a call or a chat. I originally opened a chat and clarified immediately what my actual issue was. When she eventually asked me reinstall the OS, I made it clear that I didn't actually expect a fix for this over Support, I simply wanted to get this issue to reach the attention of the people at Apple that could actually get this patched. So she scheduled a phone call for me with her seniors for several hours later at my convenience. (I contacted Support at like 3AM, if you chat with them during normal waking hours you'll likely get a scheduled call much sooner I'm assuming.)


The person I spoke to wouldn't add my case to their file unless I tried booting in Safe Mode to see if the issue was still present, so be prepared for that, or potentially anything else disruptive for them to give your case validity. If you start with a chat that moves to the phone then also have your case number ready because the person on the phone won't have access to your chat log otherwise. The person I spoke to was fantastic so I wouldn't worry about dealing with typical poor customer service like you would from other companies. The call happened 5 minutes after the scheduled time and the chat representative showed up almost immediately.

Feb 10, 2025 07:40 AM in response to roysch53

roysch53 wrote:

Regarding the two large folders (NSFileProtectionCompleteUntilFirstUserAuthentication & Priority) under the ~Library/Metadata/CoreSpotlight folder; I don't have "Advanced Data Protection" turned on, so how is it that the NSFile... folders exist - is this part of Apple Intelligence? The NSFile... folders do not exist on my Intel iMac, only on the M2 laptop.
Has anybody removed (or renamed) these large directories, turned AI off and restarted - I just wondered if they get recreated.
Also, has Apple Support shed any light as yet?

The folder structure for Spotlight metadata under ~/library/metadata differs greatly between Intel and Apple Silicon systems. I have yet to delete metadata from either of the Apple Silicon systems I own, but based on postings by others, it sounds like it's safe to delete the entire CoreSpotlight/ folder. After you delete these folders, macOS will recreate them after five or ten minutes, and then they'll start to grow again. But so long as I don't leave Pages files open when I'm not editing them, they don't grow nearly as quickly.


As for Apple Support: I've been dealing with them on this issue for the better part of a month now, and while they've been helpful, the only concrete information they've been able to provide so far is that it is safe to delete the Spotlight metadata folders. I've done Capture Data sessions on an Intel Mac and an Apple Silicon Mac, and also sent them a detailed email describing my research and findings thus far. Unfortunately, the last senior advisor I spoke to, the weekend before last, was going on vacation for a week. I'll follow up with him tomorrow and see if he has anything to add, although what I'd really like to hear is that the Spotlight team is working on a fix to be added to a future system software update.

Feb 10, 2025 08:50 AM in response to sugarskyline

Thank you so much for this report! Apple Tech Support can be excellent if you get your case escalated. Unfortunately you usually have to go through all the scripted solutions from the lower-level techs, even if you know these suggestions won't help, before they will escalate your case. Pointing them to this discussion I believe has more potential to see this problem addressed by Apple's software engineers than our filing additional reports with tech support (though I certainly won't discourage anyone who has the time from making one).


I hope the engineers, in addition to reading this discussion carefully, will google the problem. This is where I started my research into it, and found that complaints about the corespotlightd process going berserk date back to at least macOS Ventura. Something in the latest iterations of the OS seems to have made it quite a bit more common. But it is not new.


My next step was going to be following my own suggestion and creating a new user to see if the problem turns up there when opening the same Pages files that seems to trigger it on my admin user account. But as of a few days ago, the issue has mysteriously ceased on my system, so I have nothing to test against. But if it recurs this is what I will try next. In the meantime someone who is currently experiencing this issue could give it a go, in the interests of science.


sugarskyline wrote:

Just got off a 30 minute phone call with Apple Support. Their engineer team is aware of the issue and have been since February 8th, 2025. The person I spoke to added my case to the engineer team's file on the issue. They are also now aware of this thread. The person I spoke to read everything posted here. The thread itself is also now attached to their file.

I think everyone reading this with the same issue should contact Apple Support so they can have as much information as possible to fix this, in addition to making sure this gets resolved soon enough. They asked me to provide screenshots during the online chat portion, and over the phone they requested me to turn off my VPN (it didn't do anything), turn off and back on iCloud optimization (it didn't do anything), and boot into safe mode (it didn't do anything). They also wanted me to reinstall macOS but I made it clear that wasn't going to happen, and also that in another thread people already tried that in relation to corespotlightd to mixed results.

To do exactly what I did, go to Apple's website. Click Support on the right side of the screen. Scroll down to the section that says "Get Support" (it's quite large with a black button stating "Start Now" and a Memoji underneath). Under "View your products" click "Choose a product". Select your Mac. Click More. Scroll down and click Storage. Click continue. It should give you an option for a call or a chat. I originally opened a chat and clarified immediately what my actual issue was. When she eventually asked me reinstall the OS, I made it clear that I didn't actually expect a fix for this over Support, I simply wanted to get this issue to reach the attention of the people at Apple that could actually get this patched. So she scheduled a phone call for me with her seniors for several hours later at my convenience. (I contacted Support at like 3AM, if you chat with them during normal waking hours you'll likely get a scheduled call much sooner I'm assuming.)

The person I spoke to wouldn't add my case to their file unless I tried booting in Safe Mode to see if the issue was still present, so be prepared for that, or potentially anything else disruptive for them to give your case validity. If you start with a chat that moves to the phone then also have your case number ready because the person on the phone won't have access to your chat log otherwise. The person I spoke to was fantastic so I wouldn't worry about dealing with typical poor customer service like you would from other companies. The call happened 5 minutes after the scheduled time and the chat representative showed up almost immediately.


Feb 10, 2025 09:18 AM in response to Mitch Stone

sugarskyline wrote:

The person I spoke to wouldn't add my case to their file unless I tried booting in Safe Mode to see if the issue was still present, so be prepared for that, or potentially anything else disruptive for them to give your case validity. If you start with a chat that moves to the phone then also have your case number ready because the person on the phone won't have access to your chat log otherwise. The person I spoke to was fantastic so I wouldn't worry about dealing with typical poor customer service like you would from other companies. The call happened 5 minutes after the scheduled time and the chat representative showed up almost immediately.

One of the first things I tried, after this issue escalated so severely on my iMac Pro that Time Machine ceased working entirely, was to reinstall macOS (since I know from past experience Apple Support will frequently recommend doing so and will be reluctant to proceed further until you've done so). Unsurprisingly that had no effect on the issue, but Apple Support at least were willing to progress once I've told them I already tried that. If anyone does get such a suggestion I'd recommend you refer the advisor to this very thread, where numerous posters have stated that doing so has no effect on the problem.


Also, given the complexity of this issue, I would recommend that as soon as you get a support advisor on the phone, you request the issue be immediately be escalated to a senior advisor. No offense to Apple support advisors (who are excellent by comparison to the rest of the industry), but this is not the kind of issue a level I tech, who is mainly helping people install printers or replacing application icons that have been inadvertently dragged out of the Dock, are likely to be able to advise on.


Given what posters on this thread have determined so far, it's almost impossible to believe restarting in Safe Mode would have an effect. Doing so generally just disables non-macOS processes, but since the culprits are almost certainly one or more of the various Spotlight-related processes which are core to macOS and would still run under Safe Mode, doing so would largely be a time-wasting exercise.


Also, creating a new user account and using that might eventually be able to reproduce the problem, but since it seems like the metadata folders need to grow to at least 50 GB or more in size to be problematic, one would likely need to create a new user account, and then create/open/edit one or more Pages files, and wait a week or more (although some people report metadata growth rates that might bring that down to just a few days) to try to reproduce the problem.


Honestly, at this point I think Apple's engineers need to focus on how Spotlight indexes Pages files, and possibly other types of data files. At least in my experience (which admittedly does not seem to be universal), the core of the problem appears to be that Spotlight indexing processes will repeatedly reindex entire Pages files over and over again, appending those results to existing metadata rather than overwriting that data.


As evidence of that, I will again point to my experience over this last weekend. I had deleted the metadata from my 27-inch iMac on January 28, at which point it was 597 GB. From the 28th until February 7th it grew from zero to about 62 GB, with no ill effects. But then after leaving a single 145 kB Pages file open (but not being edited) from Friday evening until Sunday evening on a system that was completely idle, the metadata folders ballooned to over 120 GB, nearly doubling in 48 hours.


By contrast, with no Pages files open, this system would add about two gigabytes of metadata over a weekend.

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.