My macOS slowed down a lot recently, so I inspected all the running processes with the
htop terminal command and I saw that 40-50% of CPU (on all cores) is eaten by
Google search revealed that mdworker processes are actually the Spotlight app indexing my local disk files. How to prevent Spotlight from going wild?
- Go to System Preferences -> Spotlight
- Uncheck all the categories that you don't want Spotlight to index / search through (in my case, I unchecked everything except for Applications and System Preferences)
- Voilà, the CPU drops right away. The
mdworkers won't be indexing my disk anymore.
Note: Alternatively, you can inspect processes using
top terminal command or with the Activity Monitor app, both shipped with macOS.