Skip to content

Glossary

Working set

The set of pages a process has touched in a recent window. XNU's pageout daemon tries to keep every process's working set resident; when it can't, memory pressure escalates.

A process's working set is the set of memory pages it has actually accessed within a recent time window. It's not the same as "memory allocated" or "memory mapped" — a process can map gigabytes but only use a few megabytes; the working set is just the few megabytes.

XNU's pageout daemon tries to keep every running process's working set resident in physical memory. The pages NOT in the working set are candidates for the compressor or swap.

When the total working set across every process exceeds available RAM, you have memory thrashing — pages get evicted only to be faulted back in immediately. On macOS, this is what triggers jetsam before traditional thrashing fully sets in.

apple-oss-distributions/xnuosfmk/vm/vm_pageout.cvm_pageout — the page-replacement daemon, working-set tracker, jetsam trigger.View on GitHub(line )

The working set is also what footprint(1) reports per-process — a more accurate "memory in use" number than the ps and top RSS columns, which double-count shared regions.

See also: VM compressor, jetsam, and the memory pressure article.