Skip to content

test(benchmarks): automatic peak-memory-vs-native column#201

Merged
NathanFlurry merged 1 commit into
mainfrom
stack/test-benchmarks-automatic-peak-memory-vs-native-column-xzzvrxwp
Jul 2, 2026
Merged

test(benchmarks): automatic peak-memory-vs-native column#201
NathanFlurry merged 1 commit into
mainfrom
stack/test-benchmarks-automatic-peak-memory-vs-native-column-xzzvrxwp

Conversation

@NathanFlurry

Copy link
Copy Markdown
Member

Every latency-matrix op now reports peak memory attributable to the work, per
lane, plus memTax = guestPeak/nativePeak:

  • guest/wasm/vmCmd lanes: sidecar peak above the prewarmed baseline — write 5
    to /proc//clear_refs after prewarm (resets VmHWM), baseline
    VmRSS, then post-op VmHWM minus baseline (clamped >= 0). Idle-VM self-check
    runs once per matrix invocation and prints ~0 (measured 0B).
  • native/node lanes: live-child /proc VmHWM polling minus a measured nop
    startup baseline (native-baseline cpu_loop --iters 1 / node -e ''), floored
    to one page. GNU time -v is absent on this host, so /proc sampling is used
    uniformly.
  • Per-lane provenance strings recorded in results JSON; columns render '-'
    with a printed reason on non-Linux. Documented in the benchmarks README and
    CLAUDE.md §Benchmarks.

Every latency-matrix op now reports peak memory attributable to the work, per
lane, plus memTax = guestPeak/nativePeak:

- guest/wasm/vmCmd lanes: sidecar peak above the prewarmed baseline — write 5
  to /proc/<sidecarPid>/clear_refs after prewarm (resets VmHWM), baseline
  VmRSS, then post-op VmHWM minus baseline (clamped >= 0). Idle-VM self-check
  runs once per matrix invocation and prints ~0 (measured 0B).
- native/node lanes: live-child /proc VmHWM polling minus a measured nop
  startup baseline (native-baseline cpu_loop --iters 1 / node -e ''), floored
  to one page. GNU time -v is absent on this host, so /proc sampling is used
  uniformly.
- Per-lane provenance strings recorded in results JSON; columns render '-'
  with a printed reason on non-Linux. Documented in the benchmarks README and
  CLAUDE.md §Benchmarks.
@NathanFlurry

Copy link
Copy Markdown
Member Author

Stack for rivet-dev/secure-exec

Get stack: forklift get 201
Push local edits: forklift submit
Merge when ready: forklift merge 201

@railway-app railway-app Bot temporarily deployed to secure-exec / secure-exec-pr-201 July 2, 2026 11:56 Destroyed
@NathanFlurry NathanFlurry merged commit 286e671 into main Jul 2, 2026
1 of 3 checks passed
@NathanFlurry NathanFlurry deleted the stack/test-benchmarks-automatic-peak-memory-vs-native-column-xzzvrxwp branch July 2, 2026 11:56
@railway-app railway-app Bot temporarily deployed to secure-exec / preview July 2, 2026 11:56 Inactive
@railway-app railway-app Bot temporarily deployed to secure-exec / production July 2, 2026 11:56 Inactive
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.

1 participant