Kelly Mears

Resource Starvation

Failures caused by competition for a finite shared resource rather than by any defect.

Testing & Verification2 min read209 words12 out · 14 in
also calledContentionCPU starvation

Resource starvation is what happens when concurrent work competes for a finite resource — processor time, memory, disk, file descriptors, a spending limit — and something misses a deadline as a result. The failure looks like a defect and is not.

The diagnostic signature is consistent and worth memorizing: a timeout, never an assertion failure, in a file unrelated to whatever changed, that passes in isolation. A test asserting something wrong fails the same way every time; a starved test fails on the timing and passes alone.

The commonest sources in a development environment are several test suites running at once, a development server's file watcher re-running a suite on every save by anyone, instrumented runs that are several times slower than uninstrumented ones, and continuous-integration runners with genuinely small disks. Disk exhaustion is especially deceptive: coverage tooling writing per-file data can consume a runner's free space in minutes, after which every subsequent error is a downstream symptom.

Responses that work: serialize rather than parallelize the contended step, give the starved run the machine, add retry only where the failure is known to be environmental, and — most valuable — record the resource state at failure time so the next occurrence is diagnosable rather than a mystery. See Observability.

See also11

Instrumentation

Adding measurement to code so its execution can be observed, and the distortions that introduces.

Testing & Verification19 connections

Fan-Out and Fan-In

Splitting work across parallel workers and recombining their results.

Agents & Language Models11 connections

Process

A running program with its own memory, environment, and identity.

Systems & Tooling33 connections

Token Budget

The finite allowance of model usage a task may consume, and the design decisions it forces.

Agents & Language Models20 connections

Vacuous Truth

A statement that holds only because its subject set is empty — a green result that measured nothing.

Method26 connections

Subagent

A model instance spawned by another to handle a scoped task with its own context.

Agents & Language Models11 connections

Flaky Test

A test that passes and fails on identical input, and the most corrosive thing a suite can contain.

Testing & Verification30 connections

Continuous Integration

Automatically building and testing every change, so integration problems surface immediately.

Version Control & Delivery38 connections

Pressure Stall Information

A kernel metric for how much time work spent waiting on CPU, memory, or I/O, which measures contention directly where utilization figures only hint at it.

Systems & Tooling13 connections

CPU Scheduler

The part of the kernel that decides which runnable thread gets each CPU core next, and for how long, trading throughput against latency.

Systems & Tooling16 connections

Connection Pool

A set of open database connections kept ready and lent out to requests, avoiding the cost of opening a new connection each time and capping load on the database.

Data & Content8 connections

Linked from14