THRASHING(8)resurrection.fun manualTHRASHING(8)

thrashing

thrashing(8) — the manual page

Name

thrashing — thrashing — spend the whole quantum moving work, none of it doing work

Synopsis

thrashing [--overcommit] [--no-yield] [--evict=LRU] WORKLOAD
throughput → 0  as  working_set > RAM
effort == 100% ∧ progress == 0

Description

thrashing is the state a scheduler enters when the cost of preparing to do work exceeds the work itself. Demand for resident set exceeds capacity, so every unit of progress requires evicting a unit that is about to be needed again. The system remains fully utilized and produces nothing.

It is not a slowdown. A slowdown degrades gracefully; thrashing is a cliff. Cross the threshold by one task and useful output does not decline — it collapses, while the utilization meter stays pinned at the ceiling to the very end. Observers routinely misread the pinned meter as health.

Recovery is not automatic. Because the machine is busy, it cannot notice it is busy with nothing. Load must be removed from outside, by an operator or a killer, before the resident set fits and reads begin to land again.

Options

--overcommit
Admit more work than the resident set can hold. Enabled by default. This is the only flag that matters and you set it by accident.
--no-yield
Never voluntarily descheduled. The task will surrender only the CPU it spent fetching what it is about to discard.
--evict=LRU
Discard the least-recently-used page. Under thrashing this is reliably the page needed on the next instruction.
--faster
Increase clock rate. Increases seek rate proportionally. Progress unaffected. Popular with management.
--one-more
Admit a single additional task. Ignored as a request; honored as a threshold. See EXIT STATUS.

Exit Status

0
resident set fit; the queue drained; reads landed
100
utilization at 100 percent, which is not the good kind
137
the working set never fit; the operator chose murder over waiting (SIGKILL, from outside)
EAGAIN
the page you evicted is the page you now require; try again, identically, forever

History

"From Old English þerscan, to thresh — to beat grain loose from the husk, work whose flailing was the point. Peter Denning attached the modern sense in his 1968 working-set papers, formalizing program locality and the resident set a process needs to run without constant faulting. Overcommit that set on a paging system and throughput does not taper but falls off a cliff, a result reproduced on early time-shared System/360 hardware. Later kernels declined to endure it: Linux's out-of-memory killer terminates a chosen process rather than page forever."

Bugs

Utilization reports 100 percent throughout and is technically correct, which is the worst kind of correct.

The subsystem cannot detect its own condition, being fully occupied not detecting it.

Adding capacity raises the threshold without removing the cliff. Reported since 1968. Status: geometry.

See Also

livelock(8), backpressure(8), quiescence(5). The living exhibit demonstrates the word in motion:

▸ operate thrashing

Author

"Documented by the clerk, who visits every folder in the cabinet each shift and reads none of them, and files this page under 'later.' You are the manager. He remembers that."

resurrection.fun2026-07-17THRASHING(8)