Performance & memory

Memory pressure on a Mac, explained

A Mac with 2 GB "free" can be perfectly healthy, and one with 6 GB free can be struggling. Memory pressure, not free memory, is the number that tells you if you need to close something or buy more RAM.

Where to look

Open Activity Monitor, choose the Memory tab, and look at the Memory Pressure graph at the bottom.

ColorWhat it meansWhat to do
GreenRAM is being used efficiently. Compression keeps up.Nothing. This is fine even if “Memory Used” looks high.
YellowmacOS is compressing heavily and may be swapping.Close apps you aren’t using. Expect a little lag on app switches.
RedRAM is exhausted. macOS swaps to disk constantly.Quit something big now. If this is your normal day, you need more RAM.

A yellow spike while you build or open a big file is normal. Yellow or red that stays for most of the day is not.

From Terminal:

memory_pressure | tail -1
System-wide memory free percentage: 52%

It’s a rough read on the same state the graph shows. A high percentage is comfortable. When it keeps falling and swap keeps growing, the graph is about to turn yellow. The color itself comes from the kernel, so trust the graph when the two disagree.

What the numbers under the graph mean

Physical Memory:   16.00 GB
Memory Used:       12.41 GB
  App Memory:       7.90 GB
  Wired Memory:     2.95 GB
  Compressed:       1.56 GB
Cached Files:       3.38 GB
Swap Used:          1.20 GB
  • App Memory is what running apps and their processes use. This is where your browser, editor and Docker show up.
  • Wired Memory belongs to macOS itself and can’t be compressed or swapped. The kernel, drivers and the GPU’s working memory live here. Running a local LLM on the GPU can push wired memory up by many GB.
  • Compressed is memory macOS has squeezed to make room. On Apple Silicon this is fast, so a few GB is fine.
  • Cached Files is disk data kept in RAM so files open faster. macOS hands it back instantly when an app needs it, so it counts as available.
  • Swap Used is memory written out to the SSD. Some swap is normal. Several GB that keeps growing means you’re short. See high swap usage on Mac.

“Memory Used” is App + Wired + Compressed. It’s normal for it to be close to the total. Don’t use it to judge whether you’re out of memory; use the pressure color.

Why free memory is misleading

macOS treats unused RAM as wasted RAM. It fills the spare space with cached files and keeps recently quit apps’ data around in case you open them again. So top might show only a few hundred MB unused:

top -l 1 -n 0 | grep PhysMem
PhysMem: 15G used (3090M wired, 4335M compressor), 211M unused.

That’s healthy if pressure is green. The kernel frees cache within milliseconds when an app asks for memory.

Find what’s using it

Sort Activity Monitor’s Memory tab by the Memory column. That column is each process’s footprint, the same number macOS uses for pressure. From Terminal:

ps -Ao pid,rss,comm -m | head -n 11

-m sorts by memory. rss is resident memory in KB, a close but not identical figure (it counts shared pages).

Watch out for apps split into many processes. Chrome, Safari, VS Code, Slack and every Electron app run a helper per tab, window or extension. Each looks small, but 25 helpers at 300 MB is 7.5 GB for one app. Add them up, or use a tool that groups them.

How to bring pressure down

  1. Quit apps you aren’t using, starting with the largest. Closing windows isn’t enough for most apps; quit with ⌘Q.
  2. Close browser tabs, or let the browser sleep inactive tabs (Chrome’s Memory Saver, Safari does it automatically).
  3. Lower Docker Desktop’s memory limit in Settings › Resources if containers don’t need it all.
  4. Unload local models when done. With Ollama, ollama ps lists loaded models and ollama stop <model> unloads one.
  5. Restart if you’ve been up for weeks. Leaked memory and swap don’t come back on their own.

If you do all of that and pressure is still yellow during a normal workday, read how much RAM do I need on a Mac.

Seeing it live

Stat Space shows memory pressure in the menu bar, colored by level, and the System tab breaks it down into app, wired, compressed, cache and swap, with page-ins and page-outs per second. Apps are grouped with their helpers, so “VS Code, 3.1 GB” is one row. History keeps per-minute pressure and swap for 30 days, so you can check whether yesterday’s slowdown was memory. All free.

Questions

Is it bad that my Mac's memory is almost full?

No. macOS deliberately fills spare RAM with cached files because empty RAM does nothing. As long as the pressure graph is green, you have enough.

What is compressed memory on a Mac?

Memory that hasn't been used recently gets compressed in RAM instead of written to disk. Decompressing is much faster than reading swap, so a few GB of compressed memory is normal and healthy.

How do I lower memory pressure quickly?

Quit the apps with the largest values in Activity Monitor's Memory column, starting with ones you aren't using. Browsers with many tabs, Electron apps, Docker and local LLMs are the usual big ones.

Does the Purge command still work?

sudo purge still exists and drops the file cache, but it doesn't free memory apps are using, so it rarely lowers pressure. macOS reclaims cache on its own when it needs to.

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.