Skip to main content

peak_rss

Function peak_rss 

Source
pub(crate) fn peak_rss() -> u64
Expand description

High-water mark of this process’s resident set, in bytes.

Resident footprint is one of the four axes performance is scored on (section 11), so a node that cannot report it can only be measured from outside with a sampler — which is how the 64-connection run in the last sweep came back with an implausible 26 MiB: ps simply missed the peak. getrusage cannot miss it, because the kernel keeps the maximum rather than the instant.

The peak and not the current value because the peak is the number that has to fit in the container’s limit, and because it is one portable call: ru_maxrss is bytes on macOS and kibibytes on Linux, which is the whole of the platform difference and is why this is not inlined at the call site.