Skip to content

Improve RSS measurement#515

Open
eightbitraptor wants to merge 2 commits into
mainfrom
mvh-improve-rss
Open

Improve RSS measurement#515
eightbitraptor wants to merge 2 commits into
mainfrom
mvh-improve-rss

Conversation

@eightbitraptor

Copy link
Copy Markdown
Member

Previously we would just capture the RSS (using either smaps_rollup if available, ps -o if not), but we would only do this once at the end of each benchmark run.

This change samples the RSS during each benchmark iteration (outside of the timed window), so that we can measure and report on the RSS variance during benchmark runs.

The harness took a single RSS snapshot after a forced full GC, so the RSS column carried no variance and small differences read as signal when they were only noise.

Sample RSS once per iteration across the bench window (default, gc and warmup harnesses) and report it as mean +/- stddev% with a mean-based ratio. The raw per-iteration samples are stored under rss_samples in the JSON; the post-GC rss snapshot and lifetime maxrss are still recorded.
The at_exit turbo/boost restore ran 'sudo -S' with stderr routed to /dev/null, so on long runs (past sudo's credential cache) it blocked waiting for a password whose prompt was invisible -- indistinguishable from a hang, and it left turbo disabled.

Keep the sudo timestamp warm with a background 'sudo -n -v' thread, and make the restore use 'sudo -n' so it fails fast and prints the manual command instead of blocking. Applies to both Intel and AMD.
@k0kubun

k0kubun commented Jun 10, 2026

Copy link
Copy Markdown
Member

Fix silent hang restoring CPU turbo at exit

Can we skip the diff in this PR? There's already a PR #514 for that problem.

@k0kubun

k0kubun commented Jun 10, 2026

Copy link
Copy Markdown
Member

The other commit looks good to me 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants