View Categories

Mac Running Slow — Fix Spotlight, Memory, and Login Items

4 min read

Overview #

When your Mac feels sluggish — the beachball spins, apps take forever to load, or startup takes minutes — it’s usually not hardware failure. Often, it’s due to too many background tasks, runaway memory processes, or Spotlight indexing the entire drive.

Let’s fix it together by checking what’s running, trimming what’s unnecessary, and getting your Mac back to smooth performance.


Terms & Definitions #

TermDefinition
Spotlight IndexingmacOS feature that catalogs your files for quick search; can use high CPU while running.
Login ItemsApps that automatically open when you sign in to macOS.
Activity MonitorUtility that shows CPU, memory, disk, and network usage by process.
Memory PressureApple’s visual indicator showing how much available RAM is under stress.
Cache FilesTemporary system or app data that can slow performance when bloated.

Steps #

1. Check Activity Monitor #

This is the Mac equivalent of Task Manager — start here to find what’s hogging resources.

Steps:

  1. Open Activity Monitor (Finder → Applications → Utilities).
  2. Go to the CPU tab.
  3. Click the % CPU column to sort and identify any process using unusually high CPU (like “mds” or “mdworker”).
  4. Switch to the Memory tab and check Memory Pressure — if it’s red or yellow, you’re running out of RAM.

Terminal Command (Top 10 CPU-Heavy Processes):

ps -A -o %cpu,%mem,comm | sort -nr | head -10

2. Fix Spotlight Indexing (High “mds” or “mdworker” Usage) #

Spotlight indexing can spike CPU for hours after major updates or drive changes.

Steps:

  1. Open System Settings → Siri & Spotlight.
  2. Under Search Results, deselect file types you rarely use.
  3. Exclude large folders:
    • Go to System Settings → Privacy & Security → Spotlight PrivacyAdd Folder to exclude.

Terminal Commands to Stop / Restart Indexing:

sudo mdutil -a -i off     # Stop indexing
sudo mdutil -E /          # Erase current index
sudo mdutil -a -i on      # Re-enable indexing after fixes

Tip: Let Spotlight fully re-index once after cleanup; it should settle and stay efficient.


3. Review Login Items #

Too many apps starting on boot can bog down your Mac immediately.

Steps:

  1. Go to System Settings → General → Login Items.
  2. Review and remove anything not essential (e.g., Dropbox, Spotify, Adobe Updater).

Terminal Command to List Login Items:

osascript -e 'tell application "System Events" to get the name of every login item'

4. Clear Cached Files #

Caches help speed up apps — until they grow too large.

Steps:

  1. Open Finder → press Shift + Command + G.
  2. Go to: ~/Library/Caches /Library/Caches
  3. Delete unnecessary folders (avoid system-critical ones).
  4. Empty the Trash and restart your Mac.

Terminal Cleanup Command:

sudo rm -rf ~/Library/Caches/* /Library/Caches/*

Use this carefully — only if you understand what’s being deleted. Avoid touching /System.


5. Manage Memory-Heavy Apps #

Safari tabs, Chrome extensions, and certain creative apps (Photoshop, Xcode) can eat gigabytes of RAM.

Steps:

  1. In Activity Monitor → Memory, sort by Memory column.
  2. Close or restart high-usage apps.
  3. Consider using Safari’s Tab Groups or Chrome’s Memory Saver to minimize background load.

Terminal Memory Check:

vm_stat

Look at the “Pages free” vs “Pages active” — low free pages mean high memory load.


6. Reset NVRAM and SMC (if still slow) #

These low-level resets can clear odd hardware-level glitches.

NVRAM Reset (Intel Macs):

  1. Shut down.
  2. Turn on and immediately hold Option + Command + P + R for 20 seconds.

SMC Reset (Intel Macs):

  1. Shut down.
  2. Hold Shift + Control + Option + Power for 10 seconds, then release.

Apple Silicon (M1/M2/M3) Macs:
Just restart — the system handles this automatically.


7. Free Up Storage #

macOS runs best with at least 15–20% free space.

Steps:

  1. Go to Apple Menu → System Settings → General → Storage.
  2. Enable Optimize Storage and Empty Trash Automatically.
  3. Delete unneeded large files or downloads.

Terminal Command (List Large Files):

sudo find / -type f -size +500M -print

8. Optional: Rebuild Spotlight and System Caches #

If everything else is clean but performance still lags:

Terminal Commands:

sudo mdutil -E /
sudo update_dyld_shared_cache -force
sudo periodic daily weekly monthly

These commands refresh Spotlight’s index, rebuild shared libraries, and clean maintenance logs.


Conclusion #

You’ve optimized your Mac by taming Spotlight, slimming login items, and clearing memory-hogging processes. With these steps, most Macs regain their original responsiveness — apps open faster, startup smooths out, and the system runs cooler.

If sluggishness persists, it might be time to check for a failing drive or upgrade to an SSD (if you’re still on HDD).

Powered by BetterDocs

Leave a Reply

Your email address will not be published. Required fields are marked *