Skip to main content

Work Capacity Monitoring

Steam Headless session containers share host resources, including processor time, memory, file watches, and graphics engines. Work Capacity in the web interface shows how much is being used and warns you before contention causes dropped frames, stutter, or crashes.


1. Container Capacity vs Host-Wide Resources​

When multiple Steam Headless containers share a single physical host, resources fall into two distinct administrative categories:

Resource TypeScopeEnforcing MechanismBottleneck Symptom When Contended
Container MemoryContainer-scopedcgroup v2 memory.maxOut-of-memory (OOM) killer terminates game processes or browser streaming.
CPU Time & QuotasContainer-scopedcgroup v2 cpu.max / CFS schedulerVideo encoding falls behind frame cadence; audio drops and input lag spike.
Task / Thread LimitContainer-scopedcgroup v2 pids.maxProton prefixes, game threads, or subprocesses fail to spawn (EAGAIN).
Private tmpfsContainer-scopedVirtual tmpfs size limitsFile cache writes fail; temporary Steam downloads halt.
GPU 3D EngineShared host-wideKernel DRM GPU schedulerFrame rates drop in 3D titles; frame render times become erratic.
GPU Video EncoderShared host-wideHardware encoder queuesHardware encoding pipeline stalls; WebRTC packets are dropped.
GPU VRAMShared host-widePhysical graphics memory poolDirectX/Vulkan out-of-memory crashes; textures fail to stream.
Inotify InstancesShared host-widePer-UID kernel quota (ucount)File watchers crash with EMFILE: Too many open files.

2. Dashboard Capacity Summary and Dynamic Warning Badges​

On the Dashboard, the Container capacity section sits inside the Environment Card. It displays the active capacity generation, sequence counter, and container identity.

If any monitored resource approaches saturation, the dashboard displays high-contrast warning badges:

+-------------------------------------------------------------------------+
| Container capacity Container limits, peak memory and private tmpfs |
| [View capacity] |
| |
| [!] OOM event [!] PID limit reached [!] Elevated pressure |
+-------------------------------------------------------------------------+

Warning Badge Reference​

Warning BadgeTrigger ConditionOperational ImpactRecommended Action
OOM eventmemory.events.oom or oom_kill > 0The Linux kernel terminated one or more container processes to prevent memory exhaustion.Review peak memory usage in the Capacity Dialogue and increase container RAM allocation.
PID limit reachedpids.events.max > 0The container or an internal service reached its effective task ceiling; new processes or threads were blocked.Follow the task-limit checks and increase the container limit if required.
CPU throttlingcpu.stat.nr_throttled > 0The container exhausted its CFS CPU quota within a scheduling period.Remove CPU quotas in Compose or assign dedicated physical cores using cpuset.
Elevated pressurePSI 10-second average exceeds threshold (CPU > 20%, RAM > 10%, I/O > 10%)Kernel threads are stalled waiting for hardware resources. Input latency and stuttering will occur.Identify top consumers in the Process Dialogue; reduce container density on the host.
Unexpected tmpfs mountNon-standard mount point detected in container tmpfs treeUnrecognised storage layer mounted inside container, potentially leaking host filesystems.Verify container volume mounts in your deployment configuration.

3. Deep Capacity Inspection: The Capacity Dialogue​

Clicking View capacity on the Dashboard opens the comprehensive Container Capacity Dialogue. This modal surface is categorised into five technical inspection panels.


Section 1: Memory & Swap Composition​

The memory panel decodes cgroup v2 memory accounting into human-readable quantities, separating volatile application state from reclaimable caches:

+--------------------------------------------------------------------------------+
| Memory & Swap |
| |
| Linux tasks 184 Task limit 1,024 |
| Processes 42 PID-limit events 0 |
| Memory current 3.40 GiB Memory peak 4.82 GiB |
| Memory maximum 8.00 GiB Anonymous memory 2.10 GiB |
| File cache 1.30 GiB Shared memory 128.0 MiB |
| Kernel memory 82.4 MiB Slab memory 45.1 MiB |
| Swap current 0 B Swap peak 0 B |
| Swap maximum 0 B OOM kills 0 |
| OOM events 0 Memory-high events 0 |
+--------------------------------------------------------------------------------+

Metrics Breakdown:​

  • Linux tasks (pids.current): Total count of active threads and processes executing inside the container.
  • Task limit (pids.max): Maximum simultaneous tasks permitted inside the container.
  • PID-limit events (pids.events.max): Number of times a fork() or clone() system call failed due to the task ceiling.
  • Memory current (memory.current): Current resident memory consumed by all processes in the container.
  • Memory peak (memory.peak): The all-time high watermark of memory usage recorded since container initialisation.
  • Memory maximum (memory.max): Configured hard memory ceiling. When memory reaches this value, the kernel attempts page reclamation; if insufficient memory is freed, an OOM event occurs.
  • Anonymous memory (memory.stat.anon): Private application memory (Proton heaps, game buffers, runtime stacks) that cannot be paged out without swap.
  • File cache (memory.stat.file): Memory used to cache game files and libraries from disk. This memory is automatically released by the kernel when applications demand more anonymous RAM.
  • Shared memory (memory.stat.shm): POSIX shared memory and /dev/shm allocations used for inter-process communication and Wayland graphic buffers.
  • Kernel & Slab memory: Memory allocated to kernel data structures, dentries, and inode caches on behalf of container processes.
  • OOM kills (memory.events.oom_kill): The cumulative count of processes killed by the kernel OOM killer.

Section 2: Linux Pressure Stall Information (PSI)​

While traditional "load averages" indicate how many processes are waiting in the run queue, they cannot distinguish between benign concurrency and catastrophic hardware starvation. Steam Headless uses Pressure Stall Information (PSI) to measure the exact percentage of wall-clock time that tasks are delayed waiting for hardware resources.

+---------------------------------------------------------------------------------------------+
| Pressure Stalls (PSI) |
| |
| Resource some avg10 some avg60 some avg300 some total full avg10 full avg60 ... |
| ------------------------------------------------------------------------------------------- |
| CPU 1.25% 0.80% 0.40% 14.2s - - |
| Memory 0.00% 0.00% 0.00% 0.0s 0.00% 0.00% |
| I/O 0.45% 0.20% 0.10% 3.8s 0.10% 0.05% |
+---------------------------------------------------------------------------------------------+

Understanding 'Some' vs 'Full' Stalls​

  • some: Measures the percentage of time that at least one container task was stalled waiting for the resource while other tasks continued executing.
  • full: Measures the percentage of time that all active tasks were stalled simultaneously, resulting in a total cessation of productive execution. (CPU pressure only reports some because at least one task is always executing when the CPU is active).

PSI Threshold Matrix​

Pressure MetricGreen (Nominal)Amber (Elevated Contention)Red (Critical Starvation)Gaming Impact
CPU some avg10< 5.0%5.0% – 20.0%> 20.0%Micro-stutters, frame drops in 60/120 FPS video streams, audio buffer under-runs.
Memory some avg10< 2.0%2.0% – 10.0%> 10.0%Brief freezes while the kernel reclaims page cache or swaps memory.
Memory full avg100.0%0.1% – 5.0%> 5.0%Severe application freezing; imminent risk of process termination via OOM killer.
I/O some avg10< 5.0%5.0% – 15.0%> 15.0%Extended game loading screens; texture pop-in in open-world titles.
How to resolve elevated CPU pressure

If your container reports CPU pressure consistently above 20%:

  1. Assign dedicated physical CPU cores using the cpuset Compose directive (e.g. cpuset: "0-3").
  2. Avoid oversubscribing host CPU cores across multiple concurrent containers.
  3. Consult the Capacity and Service Troubleshooting guide for kernel tuning options.

Section 3: Private tmpfs Filesystem Capacity​

Steam Headless isolates in-memory filesystems using private tmpfs mounts. Because tmpfs resides in system RAM, unchecked disk writes inside /tmp or /dev/shm directly consume your container's memory working set.

+----------------------------------------------------------------------------------------------+
| Private tmpfs capacity |
| |
| Path Filesystem Bytes used Byte limit Used % Inodes used Inode limit Inodes %|
| -------------------------------------------------------------------------------------------- |
| /dev/shm tmpfs 128.0 MiB 2.00 GiB 6.2% 412 256,000 0.1%|
| /run tmpfs 14.5 MiB 512.00 MiB 2.8% 280 64,000 0.4%|
| /run/lock tmpfs 0 B 5.00 MiB 0.0% 1 1,000 0.1%|
| /tmp tmpfs 45.2 MiB 4.00 GiB 1.1% 850 512,000 0.1%|
| /dev/input tmpfs 4 KiB 1.00 MiB 0.4% 12 256 4.7%|
+----------------------------------------------------------------------------------------------+

Monitored Mounts:​

  • /dev/shm: Posix shared memory used by Chromium, KWin Wayland, and Mesa graphics drivers for frame exchange. Ensure shm_size: 2gb is specified in your Compose file.
  • /run & /run/lock: Temporary system runtime sockets, systemd D-Bus pipes, and PipeWire communication sockets.
  • /tmp: Temporary application files, shader compilation caches, and game scratch directories.
  • /dev/input: Virtual input character nodes (eventX and jsY) populated dynamically by shinputd.
  • Inode Accounting: Tracks total filesystem inodes to prevent exhaustion from thousands of small temporary files.

Section 4: CPU Accounting & Throttling​

This panel inspects cgroup v2 cpu.stat counters to detect scheduling enforcement:

+--------------------------------------------------------------------------------+
| CPU & Throttling |
| |
| Total usage 1,420.5s User usage 1,180.2s |
| System usage 240.3s Periods 45,210 |
| Throttled periods 0 Throttled time 0.0s |
+--------------------------------------------------------------------------------+
  • Total, User, & System Usage: Cumulative CPU time consumed in userspace vs kernel execution.
  • CFS Scheduling Periods: Total Completely Fair Scheduler (CFS) quota periods elapsed.
  • Throttled Periods & Time: If a hard CPU quota is configured (e.g. cpus: "2.0" in Compose) and the container exceeds its quota within a 100 ms period, the kernel forcefully suspends container threads.
Never configure CPU quotas for gaming containers

Do not set fractional CPU quotas (such as cpus: 2.0 or cpu_quota). CFS throttling introduces artificial scheduling latency spikes of up to 50–100 ms, destroying game frame pacing and causing video encoding pauses. Instead, use cpuset to pin containers to dedicated cores without quotas.


Section 5: Container GPU Clients​

The GPU capacity panel tracks active client connections to the DRM render node (/dev/dri/renderD128):

  • Active Clients: Count of open file descriptors associated with graphics rendering or video encoding.
  • Resident Buffer Memory: Total graphic buffer memory allocated by container processes, deduplicated across shared DMA-BUF handles.
  • Per-Engine Utilization: Instantaneous load across 3D, Video Encode, and Blitter engines for the container's active processes.

4. Host-Wide Inotify Capacity: The Multi-Container Bottleneck​

A critical architectural consideration when running multiple gaming containers is host inotify instance capacity.

Why Inotify Causes Unexplained Failures​

Desktop environments and game launchers maintain large file notification queues:

  • KDE Plasma: Watches themes, desktop icons, and configuration trees.
  • Steam & Proton: Monitors large game libraries, compatdata prefixes, and cloud saves.
  • Web Browsers & Electron Apps: Watches browser profiles, cache trees, and extensions.

The Linux kernel tracks inotify instance limits per real user ID (UID) (ucount), not per container. Because all standard Steam Headless containers run as user steamheadless with UID 1000, all concurrent containers on your host draw from the exact same inotify quota pool.

Most Linux distributions default to 128 inotify instances. A Steam Headless container and other host services can approach that ceiling quickly, while additional containers can exhaust it and cause games or file watchers to fail with EMFILE: Too many open files.

Diagnosing and Tuning Inotify on the Host​

If your applications report inotify failures:

  1. Check the active host limit:
    Host Terminal
    sysctl fs.inotify.max_user_instances
  2. Increase the quota to the standard 1,024-instance default for two or three concurrent containers:
    Host Terminal
    printf '%s\n' 'fs.inotify.max_user_instances = 1024' | \
    sudo tee /etc/sysctl.d/90-steam-headless-inotify.conf >/dev/null
    sudo sysctl --load=/etc/sysctl.d/90-steam-headless-inotify.conf

For comprehensive inotify diagnostics and recovery commands, see Host-Wide Inotify Instance Exhaustion.


5. On-Demand Process Inspection Dialogue​

When investigating elevated CPU pressure or memory saturation, you do not need to drop into a terminal. Clicking View processes on the Dashboard Environment Card opens the live Process Inspection Dialogue.

+-----------------------------------------------------------------------------------------------+
| Processes [X] |
| A total of 42 processes are running in this container. |
| |
| PID Name User State CPU % Resident RAM Owning Service GPU |
| --------------------------------------------------------------------------------------------- |
| 1420 steam steamheadless Sleeping 18.4% 842.1 MiB steam.service GPU1|
| 1532 sunshine steamheadless Sleeping 8.2% 194.5 MiB sunshine.service GPU1|
| 1102 kwin_wayland steamheadless Sleeping 4.1% 210.8 MiB - GPU1|
| 820 shui-server steamheadless Running 1.8% 64.2 MiB shui.service - |
| 950 pipewire steamheadless Sleeping 0.5% 38.1 MiB pipewire.service - |
| 980 wireplumber steamheadless Sleeping 0.3% 24.0 MiB wireplumber.service - |
| 710 shinputd root Sleeping 0.1% 12.4 MiB shinputd.service - |
| 1 systemd root Sleeping 0.0% 14.2 MiB - - |
+-----------------------------------------------------------------------------------------------+

Table Features:​

  • Sorting by Resource: Click the CPU % column header to instantly bubble the highest CPU-consuming thread to the top, or click Resident RAM to identify memory leaks.
  • Executable Inspection: Sub-titles beneath each process name show the full executable binary path.
  • Owning Service Cross-Links: Any process initiated by systemd displays its unit name as an active link (for example, steam.service). Clicking this link closes the modal and opens that service's logs and controls in Services and Logs.
  • GPU Utilization Tagging: Clearly flags which processes are holding open graphic rendering descriptors.

Summary of Capacity Best Practices​

  1. Pin Cores with cpuset: Avoid CPU oversubscription by dedicating physical cores to each container.
  2. Never Use CPU Quotas: Omit cpus: or cpu_quota: to prevent CFS scheduling stalls.
  3. Provision Sufficient RAM: Allocate at least 6–8 GiB of RAM per active 1080p gaming session.
  4. Size the Inotify Limit: Configure fs.inotify.max_user_instances for the number of concurrent containers using the host sizing table.
  5. Ensure Adequate /dev/shm: Always configure shm_size: 2gb in Docker Compose for Wayland buffer sharing.

Next Steps​