your Mac is supposed to use all of its memory

updated · by

open Activity Monitor, see almost all your memory used, and the instinct is to close things. the instinct is wrong, and so is the number it reacts to. free memory is wasted memory, macOS fills it deliberately, and the only figure on that screen describing a problem is the coloured bar at the bottom.

what memory pressure measures, and what «used» does not

a large part of what shows as used is cached file data: things read from disk recently, kept in case they are wanted again. Apple calls that row files cached «into unused memory» — occupied, and instantly available: the moment an app needs the space, the cache is dropped and the memory handed over.

so «15 of 16 gb used» describes a system doing its job. a Mac with a lot of free memory an hour after booting has not yet got around to being useful with it.

memory pressure is the honest number because it measures stress, not occupancy. that is why it can be green with memory apparently full, and red on a machine that looks half empty.

what each row in the Memory tab counts: view memory usage in Activity Monitor — Apple Support

the same arithmetic one floor down, on disk space rather than memory: what the space a cleaner finds is made of

green, yellow, red: what the memory pressure colours track

Apple's wording is advice, not mechanism: green means your Mac is using its ram efficiently, yellow that it «might eventually need more», red that it needs more. nothing there says what the machine does differently under each.

the three colours as Apple defines them: check if your Mac needs more RAM — Apple Support

the version that fills the rest of the results — green, nothing happening; yellow, compression starts; red, swap starts — is tidier than the truth. neither switches on at a colour: both run all the time, and the colour tracks how much of your working set they are paying for.

  • green — the bill is small. compression is running and swap may hold gigabytes from last week, and neither costs anything you feel.
  • yellow — the bill is noticeable. more of what you are actively touching lives compressed, so every access spends a little cpu unpacking it. still no disk, and this more than anything is what makes an 8 gb Mac usable.
  • red — the bill is paid in disk trips. pages go out and come back, each round trip thousands of times slower than memory. this is the state you feel: the beachball, the app that takes four seconds to switch to.

compression does not wait for yellow

this is checkable without believing anyone. on the Mac this was written on — 24 gb, macOS 26.6.2, nothing slow — vm_stat reported 2 067 351 pages in the compressor occupying 642 687 of them: at 16 kb a page, thirty-one gigabytes folded into ten. sysctl vm.swapusage showed 6.29 gb of swap in use at the same moment.

so a Mac behaving perfectly is already compressing more than it physically holds and already has swap on disk. neither arrives with a colour change, and the first is visible without the Terminal: the Compressed figure in the Memory tab is rarely zero, whatever the bar says.

compression is cpu work, which is why a machine under memory pressure can get loud before it gets slow: the fan is not reacting to what you are doing now

how to read memory pressure in Terminal, and what is not there

there is a command called memory_pressure, it needs no sudo, and it will not tell you the colour. its man page describes a tool to apply real or simulate memory pressure: it exists to put a machine under load, and the statistics are what it collects on its way in.

the advice in circulation is to run it — often «with sudo» — for a one-shot pressure reading. that is wrong twice: no elevation is needed, and there is no reading. the level lives in Activity Monitor's graph and nowhere on the command line.

the number that is not the colour

the last line of that output says «System-wide memory free percentage» and a figure. it is tempting, and it is occupancy again. what the command line does give you is the raw material behind the bar:

  • sysctl vm.swapusage — total, used and free swap in one line. used is the figure that matters, and only next to itself an hour later.
  • vm_stat — «Pages occupied by compressor» is what compression costs you, «Pages stored in compressor» is what it buys. the gap between them is the argument for the mechanism.
  • vm_stat 1 — the same counters once a second. swapins and swapouts climbing while you watch is the red condition in numbers: not swap existing, swap moving.

to turn pages into gigabytes you need the page size, and it differs: 16 kb on Apple silicon, 4 kb on Intel. the wrong one makes the compressor look four times too big.

the page-size difference, and the related question of whether swap is wearing out your ssd: tracking swap space — The Eclectic Light Company

all three answer for this second, and the reading you want is the hour before the beachball. hop keeps that row quiet until a value leaves your range: the system monitor

why a full disk turns into memory pressure

swap is not one file that grows

the picture most people carry is one elastic file. it is not that. swap lives in /System/Volumes/VM/ as a sequence of files of exactly one gigabyte each, added one at a time as room is wanted. on the machine above there were seven, and vm.swapusage reported a total of 7168 mb — the same number, because that is all the total is. the numbering has gaps: files are handed back when they are no longer needed.

so nothing is reserved in advance, and a nearly full drive caps how much memory macOS can pretend to have. that is why «your system has run out of application memory» turns up on machines with 32 or 64 gb of ram. the memory did not run out: macOS asked the volume for a gigabyte, the volume said no, and there was nowhere left to move anything.

it also explains why no threshold exists to quote. a system that asks for a gigabyte only when it wants one has no line to publish, and Apple has published none: the percentages in circulation come from utility vendors and forum replies, not documentation.

where each repeated figure came from, and what to watch instead of a percentage: how much free disk space macOS needs for swap

that reverses the usual conclusion: on a Mac showing that message with a full disk, buying more memory changes nothing and deleting forty gigabytes fixes it entirely.

the space is rarely where you would look for it: system data: 180 gb, contents unspecified

when it is genuinely time for more memory

  • pressure sits amber or red during ordinary work — not during an export, not with forty tabs open for a week, but on a normal afternoon.
  • swap used is climbing between checks, not merely large. a steady figure on a Mac awake for a fortnight is history, not diagnosis.
  • the disk has room, which rules out the explanation above.
  • and the case that looks identical and is not: one process holding an absurd amount alone. that is a leak, fixed by updating or reporting the app, not by buying memory it will also consume.

every one of those is a comparison over time, not a reading. one glance at a red bar proves nothing; two a week apart doing the same work prove almost everything.

then there is the other category of answer. apps that free memory do it by dropping caches macOS filled on purpose. the graph improves and the next few minutes are slower, because everything cached is read again.

the same promise measured, in the version that sells disk space: the number is real. it is also not all yours to gain.

when the message has already appeared and you need it to stop now: «your system has run out of application memory»

frequently asked questions

what is memory pressure on a Mac?
macOS's own measure of how hard it is working to keep every app supplied with memory — green, yellow, red. it describes stress, not how much memory is occupied.
is it bad that my Mac uses almost all its ram?
no, it is the intended state. much of it is cached file data that is released the instant something needs the space. unused memory does nothing for you.
how do i check memory pressure in Terminal?
you cannot — the colour is not exposed on the command line. memory_pressure is a load tool, not a reporting one, and the free percentage it prints is occupancy again. sysctl vm.swapusage and vm_stat give the raw counters behind the bar.
what is memory compression?
macOS squeezing pages that have not been touched recently so more fits in physical memory. it costs a little cpu, avoids the disk, and is the main reason 8 gb machines remain usable. it runs constantly, not only when the bar turns yellow.
how much swap is normal?
several gigabytes on a Mac that has been running for days is unremarkable on its own. what matters is the figure climbing between two checks, alongside a red bar.
does swap wear out my ssd?
usually not: on most Macs swap is a small share of everything the drive is written with, and you can check your own share rather than guess. the reason to care about swap is speed today.
do memory cleaner apps help?
not meaningfully. they free memory that was deliberately holding useful caches, so the graph improves and the next several minutes are slower.

about the author

Anton Shakirov, the author of hop

makes hop

makes hop and every page on this site. eighteen tools under a single menu bar icon, MIT licensed and open source. reads and answers issues and email himself.