1

I've been trying to diagnose hangs and bad perf on my 2015 MBP running MacOS 12.2.1. One thing I noticed was various md* processes running and taking up a lot of CPU, e.g. mds, mdworker, mdworker_shared, etc.

I only use Spotlight as an application launcher and for calculations, so I removed everything from Spotlight settings except for "Applications", "Calculator", "Conversion", "Definition", and "System Preferences". But Spotlight processes are still using a lot of CPU between them. Any idea why?

I added two screenshots below: one from a "low usage" case where md* processes are using ~25% of one CPU, and another "high usage" case where about 11 md* processes are using ~20% each.

enter image description here

enter image description here

4
  • By modifying the selection, you forced spotlight to maintain and clean all the existing indices. How much space total is on all mounted drives that could possibly have been indexed and have you let the machine run for 4 hours after making your change?
    – bmike
    Commented Mar 25, 2022 at 0:55
  • @bmike I made those changes a few days ago. No improvement since then. I have a 1TB internal drive and a networked NAS drive used for Time Machine (no idea if it's used for Spotlight.. hope it's not!) Commented Mar 25, 2022 at 0:59
  • Ugh, I just did more research online and learned that Outlook for Mac uses Spotlight for its in-product search. So unless I want to be unable to search my email, I guess I can't exclude my huge mailbox from being indexed. But, interestingly, before I learned this, I'd already excluded my Outlook mailbox folder in the Privacy tab. So now there's two mysteries: 1) why is Spotlight frequently crushing my CPU? I get <100 emails per day, so if it's just indexing new mail then that shouldn't require so much horsepower. 2) why does Outlook search still work despite the data folder being excluded? Commented Mar 25, 2022 at 1:24
  • Some versions of outlook can index on the server side - I would plan on keeping spotlight enabled and then if you have hot spots - figure which program / files are problematic. And yes - Time Machine uses Spotlight, so you may have your answer
    – bmike
    Commented Mar 25, 2022 at 2:25

1 Answer 1

2

My advice is to not use Time Machine to back up to a NAS. It’s much better to back up to an attached drive and then copy specific data / snapshots to NAS.

I would reach out to your NAS vendor to ask about spotlight settings / recommendations for their specific implementation.

It’s a ton of work to diagnose some spotlight issues - but running a mddiagnose now and another in a day - then reaching out to Apple Support to ask if you missed anything might be worthwhile next steps.

NAS are great for file storage - but on the newest OS - I would let Time Machine and APFS snapshots exist on direct attached disks at all cost if you care about the best performance of the OS.

Tactically, to calm things down:

  1. Pause Backups and then restart your Mac. (Pause means turn off Time Machine and any other periodic sync or backup)
  2. Quit Outlook and then disconnect from the network.
  3. Set the mac to dim / sleep the screen but never sleep and let it run for hours and/or overnight.
1
  • Wow, this is disappointing. How do people with Mac laptops (which won't generally have attached external disks) typically do backups if Time Machine doesn't work well over networks? Commented Mar 29, 2022 at 4:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .