Performance & memory

High swap usage on a Mac: check it, understand it, reduce it

Swap is macOS writing memory to the SSD when RAM runs out. A little is normal. Ten gigabytes that keeps climbing means apps are fighting for memory, and you'll feel it as lag when you switch between them.

Check how much swap you’re using

sysctl vm.swapusage
vm.swapusage: total = 9216.00M  used = 7903.25M  free = 1312.75M  (encrypted)
  • used is what’s actually in swap right now.
  • total is the size of the swap files on disk. macOS adds 1 GB files as it needs them and removes them later.
  • (encrypted) is normal. Swap is always encrypted on modern macOS.

The swap files themselves live here:

ls -lh /System/Volumes/VM/

In Activity Monitor, the same figure is Swap Used at the bottom of the Memory tab.

Is it a problem?

Swap on its own isn’t. What matters is whether it’s being used actively. Check paging activity:

vm_stat 5

The first line is totals since boot; every line after it is the activity in the last 5 seconds. Watch the swapins and swapouts columns (the last ones on the right). If they stay at or near zero, the swapped data is just sitting there and costs you nothing. If they’re large on most lines, macOS is constantly moving memory to and from disk. That’s what makes switching apps slow.

Swap usedMemory pressureVerdict
Under 2 GBGreenNormal
Several GB, stableGreenFine, from an earlier peak
Growing steadilyYellowClose something now
10 GB or more, growingYellow or redWorkload is bigger than your RAM

Read the pressure colors in memory pressure explained.

Why swap grows

  • Many big apps at once. A browser with 60 tabs, Slack, VS Code, Docker and Figma can add up past 16 GB.
  • Docker Desktop. Its VM reserves memory up to the limit set in Settings › Resources and doesn’t always give it back.
  • Local LLMs. A 30B-class model can take 20 GB or more on its own.
  • Leaks. An app that grows by hundreds of MB an hour will push everything else into swap. Sort Activity Monitor’s Memory column and check what’s unusually large.
  • Long uptime. Swap accumulates over days and is only fully cleared by a restart.

Does swap wear out the SSD?

SSDs have a finite number of writes, and swap is writes. That part is true. Whether it matters depends on how much:

  • If you swap 10 GB a day, that’s about 3.6 TB a year.
  • Consumer NVMe drives are typically rated for hundreds of terabytes written over their life, and larger drives get higher ratings. Apple doesn’t publish an endurance rating for its internal SSDs.
  • So light or moderate swapping is unlikely to be what ends your Mac’s SSD. Heavy swapping every day, on a small 256 GB drive, for years, is the case to watch.

Don’t guess: read your drive’s actual wear. Check SSD health on Mac shows how to see terabytes written and percentage used with smartctl. Check it today and again in a month, and you’ll know your real write rate.

How to reduce swap

  1. Find the biggest apps. Sort Activity Monitor’s Memory tab. Quit what you aren’t using with ⌘Q.
  2. Count helpers. Chrome, VS Code and Electron apps are split into many processes. Their total is what matters.
  3. Cap Docker. Lower the memory limit in Docker Desktop’s Settings › Resources, or stop the stack with docker compose down when you’re done.
  4. Unload models. ollama ps shows loaded models; ollama stop <model> frees them.
  5. Restart. If uptime is in weeks (uptime) and swap is several GB, restarting is the fastest fix.
  6. Keep free disk space. Swap needs room on the SSD. A nearly full disk makes memory pressure worse.

If swap still grows on a normal workday after all that, your workload needs more RAM. How much RAM do I need has rough sizes by workload.

Seeing it live

Stat Space shows swap next to memory pressure, plus page-ins and page-outs per second, so you can tell idle swap from active swapping. Swap can be pinned to Home as a tile, and history keeps per-minute swap for 30 days, so “it’s been creeping up all week” is visible on a chart. The System tab suggests a restart once you’ve been up 7 days with 2 GB or more in swap. All free.

Questions

Can I turn off swap on a Mac?

Not in any supported way, and you shouldn't. Without swap, macOS would have to kill apps when memory runs out. Reduce what needs swap instead.

Why is swap still high after I quit apps?

macOS doesn't rush to read swapped pages back. Swap Used drops slowly as memory is touched again or the processes that own it exit. A restart resets it to zero.

How much swap is too much on a Mac?

There's no fixed number. A few GB with green memory pressure is fine. Swap that grows every day while pressure sits in yellow or red means your workload needs more RAM than you have.

Get started

Know what your Mac is doing, without adding to it.

Free, no account. Pro is $9.99 once for the first 100 buyers.