stress: raise Linux RSS threshold to 384 MiB; add ExecRSSGrowthOverride#4
Merged
Merged
Conversation
The 64 MiB Linux threshold was calibrated for thin supervisor shims (runc-style), where the shim process has negligible in-process overhead. Shims that host a VM in-process (e.g. nerdbox running libkrun on Linux) exhibit a large one-time RSS step from VM initialization that saturates early and does not grow linearly with exec count. Observed nerdbox data over a 19-minute / ~6000-iter run: RSS after 30s / ~150 iters: +181 MiB RSS after 60s / ~325 iters: +187 MiB (most growth happens here) RSS after 11m / ~3500 iters: +194 MiB RSS after 19m / ~6000 iters: +204 MiB (saturated) Growth from 60s to 19 minutes is only +17 MiB despite 18x more iterations; the per-iteration rate drops from ~570 KiB at 30s to ~3 KiB at steady state — a clear saturation signature, not a leak. Raise the Linux default to 384 MiB (matching Windows, which has the same one-time VM-state allocation pattern). 384 MiB = ~1.9x the observed peak (~204 MiB), giving headroom for CI variance while still catching genuine per-exec leaks: at the observed steady-state rate of ~3 KiB/iter a linear leak would cross the threshold after ~60 000 iterations (~45 minutes at 22 iter/s). Also add ExecRSSGrowthOverride to StressOptions so callers with unusually large or unusually small in-process overhead can tune the threshold without modifying the library. Signed-off-by: Derek McGowan <derek@mcg.dev>
austinvazquez
approved these changes
Jun 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The 64 MiB Linux threshold was calibrated for thin supervisor shims (runc-style), where the shim process has negligible in-process overhead. Shims that host a VM in-process (e.g. nerdbox running libkrun on Linux) exhibit a large one-time RSS step from VM initialization that saturates early and does not grow linearly with exec count.
Observed nerdbox data over a 19-minute / ~6000-iter run:
RSS after 30s / ~150 iters: +181 MiB
RSS after 60s / ~325 iters: +187 MiB (most growth happens here)
RSS after 11m / ~3500 iters: +194 MiB
RSS after 19m / ~6000 iters: +204 MiB (saturated)
Growth from 60s to 19 minutes is only +17 MiB despite 18x more iterations; the per-iteration rate drops from ~570 KiB at 30s to ~3 KiB at steady state — a clear saturation signature, not a leak.
Raise the Linux default to 384 MiB (matching Windows, which has the same one-time VM-state allocation pattern). 384 MiB = ~1.9x the observed peak (~204 MiB), giving headroom for CI variance while still catching genuine per-exec leaks: at the observed steady-state rate of ~3 KiB/iter a linear leak would cross the threshold after ~60 000 iterations (~45 minutes at 22 iter/s).
Also add ExecRSSGrowthOverride to StressOptions so callers with unusually large or unusually small in-process overhead can tune the threshold without modifying the library.