Skip to content

Working set size

Working-set size is the memory footprint of the input and intermediate data required to solve a particular problem instance.

Version
v2 · 2026-11-14 · History
Domain-specific #
7804
Origin domain
Computer Performance Engineering

Core Idea

Working-set size (WSS) is the amount of memory occupied by the input and intermediate data that a program or algorithm needs while solving a particular problem instance. The working set is the data collection; its size is the corresponding memory demand. The quantity is instance- and execution-dependent. The same algorithm can have different working-set sizes for differently sized inputs or for implementations that retain, stream, recompute, or discard intermediate results in different ways.

How would you explain it like I'm…

Room for the Puzzle Pieces

When you do a puzzle, you need table space for the pieces and the parts you've already put together. Working set size is how much space a computer needs for all the stuff it's using to solve a problem. A bigger puzzle usually needs more space.

Memory a Program Really Needs

When a computer program solves a problem, it needs memory to hold the starting information and the in-between results it makes along the way. Working set size is how much memory all of that takes up. It changes depending on the problem: a bigger problem usually needs more. It also depends on how the program is written, since some programs keep old results and others throw them away. If the working set doesn't fit in the computer's fast memory, the computer slows way down shuffling data back and forth.

Active Data Memory Footprint

Working-set size (WSS) is how much memory a program needs for its input data and the intermediate data it creates while solving a particular problem instance. The working set is the data itself; WSS is its size. It depends on the instance and on how the computation is done: the same algorithm can have different WSS for different input sizes, or depending on whether it keeps, streams, recomputes or discards intermediate results. So it is not the size of the program file or the total size of the dataset on disk. When WSS is bigger than the fast memory available, a virtual-memory system keeps swapping pages to slower storage, which can cause thrashing, where performance collapses even though the answers are still correct.

 

Working-set size is the amount of memory occupied by the input and intermediate data a program or algorithm needs while solving a specific problem instance; the working set is the data collection and WSS is its memory demand. It is instance- and execution-dependent: input size and implementation choices about retaining, streaming, recomputing or discarding intermediates all change it. It is therefore distinct from executable size, total dataset storage, or a property of an abstract problem independent of the computation. WSS becomes a capacity constraint relative to available fast memory: if active data do not fit, a virtual-memory system repeatedly moves pages to and from slower storage, and continual replacement and reload can cause thrashing, collapsing performance while correctness is preserved. Measurements must declare which data and execution interval count; peak WSS, typical WSS and the OS's observed resident set can differ. Allocating a large address space does not imply a large working set if the data are never needed, while transient intermediates do count when required to finish the computation.

Scope of Application

Working-set size applies across computations wherever the input and intermediate data simultaneously needed for a declared problem instance and execution interval can be identified and assigned a byte footprint. The measure is literal only when its inclusion rule, peak or representative convention, implementation, and comparison memory tier are stated. - Algorithm and implementation analysis. — WSS compares how retaining, streaming, recomputing, tiling, or discarding intermediates changes memory demand while the problem instance and result remain fixed. - High-performance-computing system design. — expected footprints of target problem instances inform physical-memory capacity, node configuration, and problem decomposition before costly runs are provisioned. - Virtual-memory capacity analysis. — comparing WSS with available RAM identifies executions that must move data to a slower hierarchy tier and therefore face paging pressure. - Thrashing diagnosis. — a footprint that defeats available memory is combined with access and replacement behavior to explain repeated swap or page traffic that dominates useful computation.

Clarity

Working-set size separates the memory a computation needs for a particular problem instance from executable size, stored dataset size, or allocated address space. Input and intermediate data count when they are needed during execution; reserved but untouched pages do not. The quantity can therefore change with input size and with an implementation’s choices to retain, stream, recompute, or discard intermediates even when the underlying algorithmic task is unchanged.

Manages Complexity

A computation may allocate many objects, touch only part of a dataset, create transient intermediates, and move data across caches, main memory, and storage. Working-set size reduces this execution detail to the footprint of the input and intermediate data that must be available over a declared interval. The practitioner tracks the problem instance, implementation, included data, measurement window, and peak or representative footprint.

Abstract Reasoning

Working-set size supports a capacity-regime inference. From the peak or representative footprint of simultaneously needed input and intermediate data to its comparison with available physical memory, an engineer can predict whether the computation can remain resident or must rely on a slower hierarchy level. If replacement and reload recur faster than useful progress, the footprint-capacity mismatch provides a diagnosis of thrashing rather than of an incorrect algorithmic result. It also permits interventionist comparison across implementations.

Knowledge Transfer

Within computer performance engineering, working-set size transfers literally across programs, problem instances, implementations, memory hierarchies, and measurement tools when the footprint is tied to the data simultaneously needed over a declared interval. The cargo that carries intact is the instance, input and intermediate data, execution strategy, measurement window, peak or representative convention, and capacity comparison. Diagnostics transfer by changing retention, streaming, recomputation, or tiling and observing whether residency, paging, or thrashing changes. This is (C) a performance measure wherever those operational definitions are preserved.

Relationships to Other Abstractions

Local relationship map for Working set sizeParents appear above the current abstraction, mutual partners to the right, and children below. Node labels state whether each abstraction is prime or domain-specific; colors identify relation types.Working set sizeDOMAINPrime abstraction: Measurement — presupposesMeasurementPRIME

Current abstraction Working set size Domain-specific

Parents (1) — outgoing typed relations

  • Working set size presupposes Measurement Prime

    A working-set-size value is meaningful only through an operational chain that identifies the computation and required-data attribute, maps it to bytes through an inclusion rule and measurement window, and reports the resulting value under a stated convention.

Hierarchy path (1) — routes to 1 parentless root

Neighborhood in Abstraction Space

Working set size sits in a sparse region of the domain-specific corpus (68th percentile for distinctiveness): few abstractions share its structure, so a faithful description tends to retrieve it precisely.

Family — Program Execution & Runtime Concepts (34 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-11-14