ru_maxrss
A field returned by Python's resource.getrusage(RUSAGE_SELF) that reports peak resident set size. On Linux the value is expressed in kilobytes and is used to monitor the peak memory usage of a process.
Core Facts
The entire system runs on a server with 1 vCPU, 2 GB of memory, and no GPU; the author recommends running only one process at a time, calling gc.collect() between assets, measuring peak memory with resource.getrusage, and rendering at the resolution actually needed
resource.getrusage(RUSAGE_SELF).ru_maxrss returns the maximum peak of physical memory actually occupied during the process lifetime, in KB (Linux).
resource.getrusage(RUSAGE_SELF).ru_maxrss returns on Linux the peak resident memory of the current process since startup, in kilobytes; monitoring peak RSS is more effective at preventing OOM than monitoring the average.
Timeline (last 90 days)
resource.getrusage is a system resource usage statistics interface provided by the resource module in the Python standard library; on Unix systems it can return data such as CPU time and peak memory for a process and its child processes, reporting the historical maximum of the resident set size through the ru_maxrss field, in units of KB (Linux) or bytes (macOS).
resource.getrusage(RUSAGE_SELF).ru_maxrss returns the maximum peak of physical memory actually occupied during the process lifetime, in KB (Linux).
The author frees memory between projects with gc.collect() and measures peak RSS rather than average using resource.getrusage(RUSAGE_SELF).ru_maxrss.
Peak RSS is a metric of the physical memory a process actually occupies, and ru_maxrss records the maximum resident set size reached during the process's lifetime.
In an image pipeline, measuring peak RSS (ru_maxrss) rather than average RSS reflects the true memory ceiling and avoids OOM misjudgments.
The entire system runs on a server with 1 vCPU, 2 GB of memory, and no GPU; the author recommends running only one process at a time, calling gc.collect() between assets, measuring peak memory with resource.getrusage, and rendering at the resolution actually needed
On a server with 1 vCPU / 2 GB of memory, knowing whether peak memory is approaching the OOM line is more useful than knowing average usage; ru_maxrss records the historical high-water mark and can catch short memory bursts.
resource.getrusage(RUSAGE_SELF).ru_maxrss returns on Linux the peak resident memory of the current process since startup, in kilobytes; monitoring peak RSS is more effective at preventing OOM than monitoring the average.
The ru_maxrss obtained via resource.getrusage is a reliable metric for measuring a process's peak physical memory on Linux, and is more suitable than ps's instantaneous value for evaluating batch tasks.
All Facts (9)
The entire system runs on a server with 1 vCPU, 2 GB of memory, and no GPU; the author recommends running only one process at a time, calling gc.collect() between assets, measuring peak memory with resource.getrusage, and rendering at the resolution actually needed
70%Partially Verifiedresource.getrusage(RUSAGE_SELF).ru_maxrss returns the maximum peak of physical memory actually occupied during the process lifetime, in KB (Linux).
65%Partially Verifiedresource.getrusage(RUSAGE_SELF).ru_maxrss returns on Linux the peak resident memory of the current process since startup, in kilobytes; monitoring peak RSS is more effective at preventing OOM than monitoring the average.
65%Unverifiedresource.getrusage is a system resource usage statistics interface provided by the resource module in the Python standard library; on Unix systems it can return data such as CPU time and peak memory for a process and its child processes, reporting the historical maximum of the resident set size through the ru_maxrss field, in units of KB (Linux) or bytes (macOS).
50%UnverifiedPeak RSS is a metric of the physical memory a process actually occupies, and ru_maxrss records the maximum resident set size reached during the process's lifetime.
50%UnverifiedThe author frees memory between projects with gc.collect() and measures peak RSS rather than average using resource.getrusage(RUSAGE_SELF).ru_maxrss.
50%UnverifiedIn an image pipeline, measuring peak RSS (ru_maxrss) rather than average RSS reflects the true memory ceiling and avoids OOM misjudgments.
50%UnverifiedOn a server with 1 vCPU / 2 GB of memory, knowing whether peak memory is approaching the OOM line is more useful than knowing average usage; ru_maxrss records the historical high-water mark and can catch short memory bursts.
50%UnverifiedThe ru_maxrss obtained via resource.getrusage is a reliable metric for measuring a process's peak physical memory on Linux, and is more suitable than ps's instantaneous value for evaluating batch tasks.
50%