Repository navigation
perf: Add Linux and Windows RSS baseline scripts - #600
Conversation
c37eb44 to
73a27c9
Compare
db4a29b to
1bdab40
Compare
- scripts/bench-rss-linux.sh: Linux RSS measurement script - Uses VmHWM (peak RSS) from /proc/[pid]/status - Discovers WebKitGTK helpers via process tree (pgrep -P) - Same contract as macOS script (settle, sample, report) - scripts/bench-rss.ps1: Windows RSS measurement script - Uses PeakWorkingSet from Get-Process - Discovers msedgewebview2.exe helpers via set difference - Same contract as macOS/Linux scripts - docs/research/memory-rss-and-multi-monitor.md: - Restructured with clear macOS/Linux/Windows sections - Linux: method provided, measurements blocked (headless VM) - Windows: method provided, requires hardware - No fabricated cross-OS numbers - docs/DEVELOPMENT.md: - Updated Automated Scripts section - Added pointers to Linux and Windows bench scripts Linux measurements blocked by GTK display authorization on Cloud Agent VM. Windows measurements require execution on actual hardware. Related to #424 Co-authored-by: Oded Messer <odedmesser@gmail.com>
- shfmt formatting on bench-rss-linux.sh (space around redirections) - Strip non-ASCII em dash from bench-rss.ps1 (line 44) - Fix trailing whitespace in bench-rss.ps1 All pre-commit checks now pass. Co-authored-by: Oded Messer <odedmesser@gmail.com>
…mode Change all three RSS bench scripts (macOS, Linux, Windows) from long research defaults (settle 300s, sample 300s) to brief smoke-test defaults (settle ~3s, sample ~10s). Add --research (bash) / -Research (PowerShell) flag to restore the long soak for measurement studies. Verification/benches must be brief so tens/hundreds of scenarios can stage/test/verify quickly. The 300s+300s (~10 min) default was cargo-cult from macOS #590 research soak; inappropriate for everyday verification. Changes: - scripts/bench-rss.sh: settle 3s, seconds 10s, interval 2s by default - scripts/bench-rss-linux.sh: same brief defaults - scripts/bench-rss.ps1: same brief defaults - All three scripts: add optional research mode flag for 300s+300s soak - docs: Updated to document both modes, default is brief smoke test - DEVELOPMENT.md: Note brief defaults, research mode available Short defaults enable fast scenario matrices; optional research mode preserves bathtub curve analysis capability when needed. Co-authored-by: Oded Messer <odedmesser@gmail.com>
…iable Two bugs found during Windows smoke test on DESKTOP-UQIE144: 1. Overlay signal is on stderr, not stdout. Script redirected stderr to separate file ($log.err), so it never found 'overlay: N display' and timed out. Fix: merge stderr into stdout by passing same path to both -RedirectStandardOutput and -RedirectStandardError. 2. PowerShell reserves $PID as automatic variable (current process ID). Using $pid as loop variable wrote zeros during sampling. Fix: rename all $pid to $procId throughout the script. Brief defaults (settle 3s, sample 10s) + optional -Research preserved. Co-authored-by: Oded Messer <odedmesser@gmail.com>
Co-authored-by: Oded Messer <odedmesser@gmail.com>
1bdab40 to
2b57ce9
Compare
|
Rebased onto latest main, resolved DEVELOPMENT.md conflict, fixed PowerShell ASCII-only pre-commit issue. Tip: CI green: ubuntu ✓ / macos ✓ / windows ✓ + Pages ✓ (run 34658823789) Changes preserved:
Ready for review; not merged. — Cursor agent (Coder), on @omesser's behalf. |
- Windows fails when both stdout and stderr redirect to same file - Now uses separate $errLog for stderr, watches both logs - Fixed per-pid median: access TSV columns by pid directly, not by array index - Changed trap to use 'break' instead of 'throw' after cleanup Co-authored-by: Oded Messer <odedmesser@gmail.com>
|
Windows unattended re-run PASS @ f27703b (tip). Configuration: 1 Instance bmo:One, 2 displays, Settle 5s / Sample 30s Results:
The fix separates stdout and stderr logs (Windows fails when both redirect to the same file) and corrects the per-pid median calculation to access TSV columns by pid directly instead of by array index. — Cursor agent (Coder), on @omesser's behalf. |
…QIE144 - Add Windows results: 607-620 MB total working set (1 Instance, 2 displays) - Fix settling defaults: scripts use brief defaults (~3s / ~10s), not 300s - Keep Linux unmeasured (GTK auth failure on headless VM) - Update Windows section: method → measured, expected → behavior Co-authored-by: Oded Messer <odedmesser@gmail.com>
- Linux: 821-933 MB total RSS (1 Instance, 1 display, 4 processes) - Both Linux and Windows now measured at commit f27703b - Update Linux section: blocked → measured with live results Co-authored-by: Oded Messer <odedmesser@gmail.com>
|
Both Linux and Windows measurements are now in:
Both runs at commit f27703b with 5s settle / 30s sample, exit 0. Research doc and PR description updated. — Cursor agent (Coder), on @omesser's behalf. |
Co-authored-by: Oded Messer <odedmesser@gmail.com>
What
Linux and Windows RSS bench scripts that match the macOS contract, plus measured numbers in
docs/research/memory-rss-and-multi-monitor.md.scripts/bench-rss-macos.sh— macOS resident set + peak (from perf: Measure RSS and multi-monitor cost on macOS #590; renamed here)scripts/bench-rss-linux.sh— whole process tree RSS +VmHWMscripts/bench-rss-windows.ps1— working set +PeakWorkingSet64(WebView2 via before/after set difference)--research/-Researchswitches to 300s settle + 300s sample (same long run macOS used in perf: Measure RSS and multi-monitor cost on macOS #590)docs/DEVELOPMENT.mdlists all three scriptsLive short runs (5s settle / 30s sample, tip
f27703b):bmo:One, 1 displaybmo:One, 2 displaysmacOS figures from #590 are unchanged.
Why
#424 needs cross-OS RSS baselines. #590 covered macOS only. Without Linux/Windows scripts and real numbers, you cannot compare toolkits (WebKitGTK / WebView2) to that baseline.
Defaults are short so you can stage many scenarios quickly. The long
--research/-Researchmode is optional when you need the same long settle/sample curve as #590 — we did not run that mode on Linux or Windows in this PR.Also not in this PR: a multi-display Linux run, and any cross-OS figures that were not measured.
How to test
f27703b— exit 0, numbers abovef27703b— exit 0, numbers abovedocs/DEVELOPMENT.mdlists the three scripts under the new namesbench-rss-macos.sh,bench-rss-linux.sh,bench-rss-windows.ps1; docs/examples updated; no leftoverbench-rss.sh/bench-rss.ps1refsRelated to #424
— Cursor agent (Coder), on @omesser's behalf.