Search

A technology, a device or an article

When RAM pressure is measured in lost time

Linux PSI reports time affected by memory pressure. Its some, full and total fields need a time interval and an accounting scope.

Woven threads with a gap and sections of continuing work
ITNWS AI-generated conceptual illustration. Gaps in threads encode no PSI measurements; they evoke lost progress.ITNWS · image_gen · Original ITNWS AI-generated conceptual editorial illustration

The imaginary monitoring screen barely changes: the same amount of RAM appears occupied before and during a pause. Yet the application that answered immediately a moment ago now hesitates. Staring longer at the occupied-memory percentage cannot recover the missing seconds. To describe this kind of observation, Linux provides Pressure Stall Information, or PSI. Its memory figures concern time in which work is stalled because of memory pressure. They give an operator a different way to observe the machine, alongside the familiar accounting of bytes.

This is a constructed observation, not an incident from our servers and not an ITNWS performance test. Keeping that distinction visible lets us slow the scene down without inventing a diagnosis. The useful question is what could be learned if the observer recorded the right quantities before, during, and after the pause. The same capacity figure can accompany very different amounts of useful progress, and a time-based signal can expose that difference without pretending to explain every cause on its own.

At the beginning, there is no reason to demand empty RAM. File data retained in memory may save future reads. A busy but well-sized workload can use much of the available capacity while continuing to complete its work. Conversely, a workload constrained within a control group can encounter serious pressure even when a host-wide display suggests abundant capacity elsewhere. Occupancy and availability describe important conditions, but neither is already a measurement of disruption experienced by the particular work we care about.

While the screen is still waiting

The Linux PSI documentation describes the memory pressure interface at /proc/pressure/memory. Its familiar lines begin with some and full, followed by avg10, avg60, avg300, and total. The averages are percentages describing recent pressure trends over the named windows. The cumulative total is expressed in microseconds. These are time quantities. A value in avg10 is not the percentage of RAM occupied, a percentage of installed modules that are unhealthy, or a count of swap pages.

Some covers periods in which at least some tasks are stalled on the resource. Full identifies periods in which all non-idle tasks in the observed scope are simultaneously stalled on it. Full is therefore a more restrictive condition than some. The difference can matter enormously: other work may continue productively during partial stalls, while a scope spending prolonged periods in full memory pressure is making poor progress. The documentation relates extended full-stall conditions to thrashing. That is a description of time lost to pressure, not a conclusion obtained merely by noticing that a swap device exists.

Suppose a memory-pressure total grows by 200,000 microseconds between two observations made one second apart. In this deliberately simplified arithmetic example, that is 0.2 seconds, or 20 percent of that observation interval. The calculation uses the difference between cumulative readings, not the cumulative value itself. It also requires the same counter and the same accounting scope at both ends. It does not mean that exactly 20 percent of individual requests were slow or that every request lost exactly 0.2 seconds.

A time interval in which several tasks are stalled together must not be casually multiplied by their number to obtain a PSI percentage. The signal tracks pressure conditions for the scope rather than a simple sum of every thread’s waiting time. Per-task delay accounting answers related but different questions. The kernel’s delay-accounting documentation describes task delay information and its own collection requirements. Reading the two interfaces as interchangeable would lose the distinction between concurrent waiting and elapsed time affected by a collective condition.

The woven illustration presents continuing and interrupted threads as a conceptual image. It is not a plotted timeline, and the lengths of its gaps encode no measurements. Its purpose is to make one subtle difference memorable: some work can wait while other work still proceeds. A broad interruption across the observed workload means something stronger. The actual some and full definitions come from the kernel interface, not from counting lines in a piece of generated textile art.

During the imagined pause, a short pressure spike can matter more to a person than to a long average. A job that usually answers quickly can become objectionable after one brief interruption even if a five-minute trend remains small. That is why the cumulative total is useful for examining custom intervals. It can reveal a change that a coarser display smooths over. To relate the change to an application request, the observations still need timestamps and a known collection interval rather than a visual guess that two curves moved together.

Looking back after the answer arrives

Once the application responds, a pressure average need not immediately return to zero. Recent history is still part of the trend. Treating a lingering value as proof of a new stall at that exact moment confuses a time window with an instantaneous state. The reverse mistake is to conclude that nothing happened because the observer opened the screen afterward. A short episode can disappear from view or be diluted across the reporting interval, especially when collection is infrequent or the application has already moved on.

A counter saved without its provenance is equally treacherous. A reboot, a newly created cgroup, or a changed collection target can break the continuity assumed by subtraction. A negative difference is not negative memory pressure; it is evidence that the comparison must be revisited. Wall-clock timestamps can also jump, while elapsed-time measurements should be monotonic. Recording the relevant boundary conditions gives a modest arithmetic operation a chance to mean what the reader thinks it means.

Paper accordion evoking elapsed waiting time
ITNWS AI-generated conceptual illustration. Folds evoke waiting time; they are not an observed time series. — ITNWS · image_gen · Original ITNWS AI-generated conceptual editorial illustration

The paper accordion in the second illustration evokes uneven intervals. Its folds should not be read as a literal record of ten-second samples, and stretching paper is not a model of reclaim. This separation is intentional. An operator’s notebook can use an image to remember that waiting has duration, while its numerical entries must preserve units and acquisition details. A compelling visual does not supply the identity of a counter, its scope, or the actual start and end of a measurement.

Pressure monitoring can also be event-driven. PSI supports registering a threshold in terms of stall time within a time window and waiting on a file descriptor for notifications. The kernel documentation gives the interface and constraints. Such a notification says that a defined pressure condition crossed the registered threshold; it does not identify which allocation or subsystem caused it. A monitoring policy can use that signal to trigger observation or workload management, but an alert name should not smuggle a diagnosis into the evidence.

There is no universally correct percentage at which every computer needs additional RAM. A latency-sensitive interactive task, a restartable batch job, and a throughput-oriented service can attach different costs to the same pressure history. Their useful performance measures also differ. A threshold becomes meaningful when linked to the workload’s requirements and a measured relationship to those requirements. Otherwise a neatly coloured dashboard can be as arbitrary as an occupancy gauge with a red line drawn at an aesthetically pleasing round number.

The memory-pressure number also does not isolate a failed or slow DIMM. PSI is an operating-system observation of stalls, not a hardware integrity test. A capacity constraint, reclaim work, storage involved in memory management, and policy decisions can shape the observed episode. A claim about defective RAM needs evidence suitable for that claim. The timing signal is valuable precisely when its narrower meaning is preserved: work experienced memory-related pressure, and its duration can be studied.

The boundary moves to a service

The imaginary observer now opens a service’s cgroup rather than the host-wide display. In cgroup v2, memory.pressure provides pressure information for that group’s accounting scope. The host can continue doing other things while the service is constrained. A large full value inside the group need not mean every non-idle task across the entire computer was stalled. The word all belongs to a scope. Omitting that qualification turns an informative local observation into an exaggerated claim of a machine-wide freeze.

The cgroup v2 manual describes memory.high as a mechanism for throttling and reclaim pressure when a group exceeds its configured high boundary. Crossing it does not in itself mean the group has hit the hard memory.max limit or that an OOM kill must occur. This supplies one concrete reason that local pressure can rise even when the host has available memory. Understanding the policy is part of understanding the observation; adding physical capacity need not change an intentionally unchanged local boundary.

Memory events and pressure time complement each other. A counter of high-boundary events concerns occurrences under its own definition; PSI concerns durations of stall conditions. A large event count does not algebraically determine an avg10 value. Nor can a long full interval reveal exactly how many high events occurred. Aligning these records can help reconstruct an episode. It does not grant permission to replace one field with another simply because they both appear in a memory section of the monitoring interface.

The same care applies to hierarchy. A service can contain several worker processes and child groups. A collected pressure series should say which group it represents and how that relates to the service’s organization. Changes in placement or limits can alter what the time series describes. When two deployments are compared, preserving only the service’s friendly name is insufficient if its actual accounting boundaries changed. The unit called a service in a dashboard may conceal materially different kernel groups.

An operator might eventually consider pausing a lower-priority batch job or adjusting workload placement. The rationale would come from the relationship among pressure, application outcomes, and resource policy. It would not follow from a rule that every nonzero PSI reading is intolerable. Some contention can be an acceptable consequence of useful utilization. Persistent loss of required progress is a different operational outcome. Distinguishing them requires the application’s completion rate and latency alongside the kernel’s report of time affected by resource pressure.

The observation also has limits in the other direction. Low memory PSI does not certify excellent application performance. A task may wait on a remote service, contend on a lock, or use an inefficient algorithm without producing the memory-pressure pattern under discussion. CPU and I/O pressure have related interfaces, but their definitions and applicability must be read separately. In particular, the PSI documentation warns about the meaning of CPU full at the system level. A memory example should not silently become a generic recipe for interpreting every resource.

The imagined notebook can finally contain an honest entry: during a specified interval, in a named scope, the cumulative memory-pressure time changed by a known amount; the application’s response was also observed. Further records may establish whether reclaim, a group limit, or another mechanism explains their relationship. The stationary occupancy percentage was never enough. Now the missing seconds have a place in the record, with units and boundaries, while the explanation remains a task to complete. Sources checked October 23, 2026; no production incident or benchmark is claimed.

Sources & documentation

  1. Linux: PSI Pressure Stall Information ↗
  2. Linux: Control Group v2 memory.pressure and memory.high ↗
  3. Linux: Delay accounting ↗