Your Mac slows down for a short list of reasons: memory pressure, a saturated SSD, runaway processes, bloated login items, or a stuck Spotlight index. This guide walks through each cause with the exact Terminal commands and Activity Monitor checks to find and fix it. It covers Apple Silicon and Intel Macs running macOS Sequoia and macOS Tahoe.
Quick Takeaways
- Check Memory Pressure first. A yellow or red graph in Activity Monitor means macOS is swapping to disk.
- Keep 15-20% of the SSD free. Below that, swap and APFS snapshots throttle performance.
- Kill the real culprit.
mediaanalysisd,mds_stores,kernel_task, andWindowServercause most sustained high CPU. - Update, then reboot. Many post-upgrade slowdowns are just Spotlight and Photos reindexing for 24-48 hours.
| Symptom | Likely Cause | Fastest Fix |
|---|---|---|
| Beachball on app launch | Memory pressure / swap | Quit heavy apps, check Memory Pressure |
Fans loud, kernel_task high |
Thermal throttling | Clear vents, reduce load, reset SMC (Intel) |
| Slow after macOS upgrade | Spotlight/Photos reindexing | Wait 24-48 hrs, or rebuild index |
| Slow boot | Too many login items | Remove under Login Items & Extensions |
| Disk nearly full | APFS snapshots, caches | Purge snapshots, clear caches |
| Safari/Chrome lag | Extensions, tab bloat | Disable extensions, use Safari Memory Saver |
Prerequisites and Environment
- macOS: Sequoia (15.x) or Tahoe (26.x). Commands also work on Sonoma (14.x).
- Hardware: Apple Silicon (M1-M4 family) or Intel. Intel-only steps are labeled.
- Access: An admin account. Commands using
sudoprompt for your password. - Backup: Run Time Machine before deleting caches or rebuilding indexes.
Check your exact build:
sw_vers
system_profiler SPHardwareDataType | grep -E "Model Name|Chip|Processor|Memory"
sw_versprints the macOS product version and build number.system_profiler SPHardwareDataTypelists hardware details.grep -Efilters for model, chip, and RAM lines.
How macOS Performance Actually Works
Understanding the architecture tells you which fix to try.
Memory Compression and Swap
macOS compresses inactive memory pages before writing anything to disk. When compression can’t keep up, the kernel pages data out to /private/var/vm/ swap files. On a fast SSD this is tolerable. On a nearly full drive, it is not.
Open Activity Monitor (Cmd + Space, type “Activity Monitor”) and select the Memory tab. Read the Memory Pressure graph:
| Graph Color | Meaning | Action |
|---|---|---|
| Green | Healthy | None |
| Yellow | Compression working hard | Close apps, check for leaks |
| Red | Heavy swapping | Quit processes or add RAM (not possible on Apple Silicon) |
Unified Memory on Apple Silicon
Apple Silicon shares one memory pool between CPU and GPU. An 8 GB model with several browser windows, a Docker VM, and a video call hits pressure fast. You cannot upgrade it later, so process hygiene matters more.
Thermal Management and kernel_task
kernel_task is not malware. It deliberately consumes CPU cycles to cool the system when temperatures climb. High kernel_task usage means a heat problem, not a software problem.
Step-by-Step Fixes
Fix 1: Identify the Resource Hog
List the top CPU consumers from Terminal:
ps -Arcwwwxo pid,%cpu,%mem,comm | head -n 15
-Ashows all processes.-rsorts by CPU.-cshows only the executable name.-wwwprevents line truncation.-odefines the output columns: PID, CPU percent, memory percent, command.
For a live view, use:
top -o cpu -n 10 -s 3
-o cpusorts by CPU.-n 10limits to 10 processes.-s 3refreshes every 3 seconds.
Quit a stuck process by PID:
kill -9 <PID>
-9 sends SIGKILL, which cannot be ignored. Try a plain kill <PID> first so the app can save state.
Fix 2: Reduce Memory Pressure
Check swap and memory stats:
vm_stat
sysctl vm.swapusage
memory_pressure
vm_statshows page statistics. Watch Pages occupied by compressor and Pageouts.sysctl vm.swapusagereports total, used, and free swap.memory_pressureprints the system-wide free memory percentage.
If swap usage regularly exceeds several GB, close memory-heavy apps. Common offenders are Chrome, Slack, Electron apps, Docker Desktop, and Xcode simulators.
Fix 3: Free Disk Space and Purge Local Snapshots
APFS performance drops as the volume fills. Check free space:
df -h /
Time Machine stores local snapshots on the internal drive. They can eat tens of gigabytes. List them:
tmutil listlocalsnapshots /
Delete a specific snapshot by its date stamp:
sudo tmutil deletelocalsnapshots 2026-10-28-143015
Find large folders in your home directory:
du -sh ~/* 2>/dev/null | sort -hr | head -n 15
du -shprints human-readable folder totals.sort -hrsorts human-readable numbers in descending order.
Use System Settings > General > Storage to review Developer data, iOS backups, and Mail attachments.
Fix 4: Trim Login Items and Background Agents
Open System Settings > General > Login Items & Extensions. Disable anything you do not need at startup, including helper apps under Allow in the Background.
Inspect launch agents from Terminal:
ls ~/Library/LaunchAgents /Library/LaunchAgents /Library/LaunchDaemons
launchctl list | grep -v com.apple
- The
lscommand shows user and system-level startup plists. launchctl list | grep -v com.appleshows loaded third-party jobs, filtering out Apple’s.
Unload a misbehaving agent:
launchctl bootout gui/$(id -u) ~/Library/LaunchAgents/com.example.helper.plist
gui/$(id -u) targets your user session domain. Replace the plist path with the real file.
Fix 5: Rebuild the Spotlight Index
If mds_stores or mdworker_shared sits at high CPU for days, the index may be corrupt.
Check indexing status:
mdutil -s /
Rebuild it:
sudo mdutil -E /
-E erases and rebuilds the index for the volume. Expect heavy CPU for several hours afterward.
Fix 6: Stop Photos and Media Analysis Spikes
photoanalysisd and mediaanalysisd scan your library for faces, objects, and text. After a large import or macOS upgrade they can run for a day or more.
Leave the Mac plugged in, asleep with the lid open on a desk, and let them finish. Check progress in Photos at the bottom of the Library view.
Fix 7: Clear User Caches Safely
Cache folders hold temporary data. Delete only the contents, never the folders themselves.
du -sh ~/Library/Caches
rm -rf ~/Library/Caches/com.example.app/*
Target one app at a time. Avoid wiping all of ~/Library/Caches at once, because some apps rebuild caches slowly and perform worse until they finish.
Fix 8: Flush DNS and Reset Network Daemons
Slow page loads sometimes come from stale DNS state, not CPU or memory.
sudo dscacheutil -flushcache
sudo killall -HUP mDNSResponder
dscacheutil -flushcacheclears the directory service cache.killall -HUP mDNSRespondersignals the resolver to reload.
Fix 9: Tame Browser Load
Browsers are usually the largest memory consumer.
- Disable unused extensions in Safari > Settings > Extensions or
chrome://extensions. - Enable Memory Saver in Chrome (
chrome://settings/performance). - Check the browser’s built-in task manager: Chrome > Window > Task Manager.
- Use separate profiles so one heavy workspace does not load everything.
Fix 10: Reduce Visual Effects
On older Macs, transparency and animation tax the GPU and WindowServer.
Go to System Settings > Accessibility > Display and enable:
- Reduce transparency
- Reduce motion
Fix 11: Reset NVRAM and SMC (Intel Only)
Intel Macs with strange fan, battery, or sleep behavior may benefit from a reset.
- NVRAM: Shut down, power on, and immediately hold
Option + Command + P + Rfor about 20 seconds. - SMC (T2 Macs): Shut down, hold the power button for 10 seconds, release, wait, then power on.
Apple Silicon Macs have no SMC or user-resettable NVRAM. A normal restart handles those functions.
Fix 12: Reinstall macOS Without Erasing Data
When nothing else works, a clean system volume often fixes deep corruption. Boot into macOS Recovery:
- Apple Silicon: Shut down, then press and hold the power button until “Loading startup options” appears. Choose Options.
- Intel: Restart holding
Command + R.
Select Reinstall macOS. Your user data stays intact. Back up first anyway.
Diagnostic Comparison: Apple Silicon vs. Intel Slowdowns
| Factor | Apple Silicon (M-series) | Intel Mac |
|---|---|---|
| Thermal throttling | Rare, mostly under sustained load | Common, especially MacBook Pro/Air |
| RAM upgrade | Not possible | Possible on some desktop models |
| SMC/NVRAM reset | Not applicable | Available |
| Typical slowdown cause | Memory pressure, background indexing | Heat, aging SSD, background load |
| Rosetta 2 overhead | Affects x86 apps only | Not applicable |
| Diagnostics | Hold power button > Diagnostics (Apple Diagnostics) | Hold D at startup |
Troubleshooting Real-World Scenarios
Scenario 1: Mac Crawls After a macOS Upgrade
Cause: Spotlight, Photos, and Time Machine reindex after major upgrades.
Fix:
- Leave the Mac plugged in overnight, preferably for 24-48 hours.
- Check
top -o cpuformds_stores,mediaanalysisd, andbackupd. - If CPU stays high beyond three days, run
sudo mdutil -E /.
Scenario 2: kernel_task Consumes 400% CPU
Cause: Thermal throttling from blocked vents, a failing fan, a hot environment, or a faulty USB-C hub or charger.
Fix:
- Unplug external hubs and docks to test.
- Move the Mac to a hard, flat surface.
- Reduce load from video encoding or virtual machines.
- Run Apple Diagnostics. On Intel, reset the SMC.
Scenario 3: Mac Freezes with a Full Disk
Cause: Under about 10 GB free, swap cannot grow and the system stalls.
Fix:
- Boot into Safe Mode (Apple Silicon: hold power, select the disk, hold
Shift, click Continue in Safe Mode; Intel: holdShiftat startup). - Delete large files and local snapshots with
tmutil. - Empty the Trash and restart normally.
Scenario 4: Slow Boot and Login
Cause: Excess login items, legacy kernel extensions, or a failing disk.
Fix:
- Review Login Items & Extensions.
- Verify disk health:
diskutil verifyVolume /
diskutil info disk0 | grep -i "SMART"
verifyVolumechecks the APFS volume for structural errors.diskutil inforeports the SMART status (on supported drives).
- Run Disk Utility > First Aid on the Macintosh HD container.
Scenario 5: Create a Monitoring Script
Log top CPU consumers every five minutes to catch intermittent spikes.
#!/bin/bash
LOG="$HOME/cpu-watch.log"
{
date
ps -Arcwwwxo pid,%cpu,%mem,comm | head -n 6
echo "---"
} >> "$LOG"
Save it as ~/cpu-watch.sh, then make it executable:
chmod +x ~/cpu-watch.sh
Schedule it with launchd by creating ~/Library/LaunchAgents/com.user.cpuwatch.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key><string>com.user.cpuwatch</string>
<key>ProgramArguments</key>
<array><string>/Users/YOURNAME/cpu-watch.sh</string></array>
<key>StartInterval</key><integer>300</integer>
</dict>
</plist>
Load it:
launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/com.user.cpuwatch.plist
Replace YOURNAME with your actual username. Review ~/cpu-watch.log after a slowdown to see which process spiked.
Verification Checklist
After applying fixes, confirm improvement:
| Check | Command / Location | Healthy Result |
|---|---|---|
| Memory Pressure | Activity Monitor > Memory | Green graph |
| Swap used | sysctl vm.swapusage |
Low or near zero at idle |
| Free disk space | df -h / |
15-20% or more free |
| Idle CPU | top -o cpu -n 5 |
No process steadily above 20% |
| Spotlight | mdutil -s / |
Indexing enabled, not stuck |
| Disk health | diskutil verifyVolume / |
“appears to be OK” |
When Hardware Is the Limit
Software fixes cannot beat hardware limits. Consider replacement or upgrade when:
- An 8 GB Mac stays in the yellow or red memory zone under normal workloads.
- A Mac stays slow after a clean macOS reinstall.
- Apple Diagnostics reports storage or fan faults.
- The Mac is no longer supported by current macOS releases.
FAQ
Why is my Mac suddenly so slow?
Sudden slowness usually comes from a runaway process, a full disk, or post-update indexing. Open Activity Monitor, sort by % CPU and then by Memory, and quit the offending process. Check free disk space with df -h /.
How do I speed up an old Mac?
Free at least 15-20% of disk space, remove unneeded login items, enable Reduce transparency and Reduce motion, and use a lightweight browser setup. Reinstalling macOS from Recovery often helps aging systems. Old Intel Macs may also need a fan and vent cleaning.
Does restarting a Mac really help performance?
Yes. A restart clears memory, resets swap, kills leaked processes, and finishes pending updates. Restart at least weekly if you rarely shut down.
Is kernel_task a virus?
No. kernel_task is part of macOS. It throttles the CPU to lower temperatures. High usage points to heat, a failing fan, or a faulty peripheral, not malware.




