You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bench #478] Add peak RSS, allocation-count and copy-volume parity to canonical benchmarks #491
Runtime alone is not enough for the claim that Flow beats Python. Add memory evidence beside every representative canonical and scaled workload.
Measure process peak RSS, heap allocation count/bytes where instrumentable, persistent model size, temporary workspace size and explicit matrix/vector copy volume. Separate cold process/import memory from steady estimator execution. Record whether BLAS/native libraries allocate internally when observable.
Acceptance: same-machine Flow/sklearn memory rows for all canonical estimator families; machine-readable fields and Pages plots; regressions can be gated directionally; a runtime win with materially worse memory remains an explicit yellow/red dimension rather than being hidden.
Worked through the memory-evidence contract and archived the full result in godofecht/OpenProjects as ml/phase-local-live-memory-certificates.md with an adjacent Flow witness.
The key recommendation is to report an exact phase-local live-memory certificate rather than trying to infer estimator memory from RSS alone. For a complete allocation/release trace, define live bytes L(t) and compute P=max_t L(t). With E live bytes at phase entry and X at exit, report H=P-E as additional live headroom and R=X-E as retained model growth, alongside cumulative allocated bytes, explicit copy payload, and category-specific peaks.
Two exact counterexamples matter for #491. First, category peaks are not additive: entering with 100 persistent bytes, then using 300 workspace bytes, freeing them, then using a 250-byte copy gives a total peak of 400 even though workspace+copy category peaks sum to 550. Second, allocation volume does not determine peak memory: two traces can both allocate 630 bytes and retain the same 80 bytes while peaking at 400 vs 650 solely because workspace and copy lifetimes overlap.
RSS should remain a process-level guardrail, but allocator page retention/reuse means RSS delta cannot identify workspace or copy pressure. Suggested machine-readable operation vector: (entry_live, peak_live, exit_live, headroom, retained_delta, allocated_bytes, copy_payload_bytes, peak_workspace, peak_copy) plus RSS separately. This makes zero-copy, arena/reuse, and workspace optimizations accountable to the memory dimension they are supposed to move.
Activity
godofecht commentedon Aug 26, 2026
Worked through the memory-evidence contract and archived the full result in
godofecht/OpenProjectsasml/phase-local-live-memory-certificates.mdwith an adjacent Flow witness.The key recommendation is to report an exact phase-local live-memory certificate rather than trying to infer estimator memory from RSS alone. For a complete allocation/release trace, define live bytes
L(t)and computeP=max_t L(t). WithElive bytes at phase entry andXat exit, reportH=P-Eas additional live headroom andR=X-Eas retained model growth, alongside cumulative allocated bytes, explicit copy payload, and category-specific peaks.Two exact counterexamples matter for #491. First, category peaks are not additive: entering with 100 persistent bytes, then using 300 workspace bytes, freeing them, then using a 250-byte copy gives a total peak of 400 even though workspace+copy category peaks sum to 550. Second, allocation volume does not determine peak memory: two traces can both allocate 630 bytes and retain the same 80 bytes while peaking at 400 vs 650 solely because workspace and copy lifetimes overlap.
RSS should remain a process-level guardrail, but allocator page retention/reuse means RSS delta cannot identify workspace or copy pressure. Suggested machine-readable operation vector:
(entry_live, peak_live, exit_live, headroom, retained_delta, allocated_bytes, copy_payload_bytes, peak_workspace, peak_copy)plus RSS separately. This makes zero-copy, arena/reuse, and workspace optimizations accountable to the memory dimension they are supposed to move.