Skip to content

ci: sample runner memory pressure during iOS E2E (diagnostic)#172

Draft
V3RON wants to merge 8 commits into
mainfrom
agent/e2e-mem-pressure-probe
Draft

ci: sample runner memory pressure during iOS E2E (diagnostic)#172
V3RON wants to merge 8 commits into
mainfrom
agent/e2e-mem-pressure-probe

Conversation

@V3RON

@V3RON V3RON commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

What

Adds a lightweight memory-pressure sampler to the e2e-ios job: a backgrounded loop logs vm.swapusage + vm_stat every ~2s across the harness run, a step-summary reports peak swap / compressed / free + swapout delta, and the raw log is uploaded as an artifact (mem-pressure-e2e-ios).

Why

Investigating why the iOS harness takes >5 min on the standard macos-latest runner (3 vCPU / 7 GB). This probe confirms whether the box swaps while simulator + xcodebuild + Metro run together.

Result from run 29996372090 (this branch, Xcode 26.6)

Harness step ~322s. During it:

  • Free RAM collapses to ~55 MB within 25s and stays pinned ~3.5 min
  • Compressed memory peaks at 2.5 GB
  • ~600 MB swapped out near the end (peak swap used 598 MB, min free 48 MB)

Conclusion: the 7 GB runner is memory-constrained; compression (CPU work) amplifies the 3-vCPU bottleneck. Informs whether to move to a larger runner and/or reclaim simulator RAM.

Note

Diagnostic instrumentation — cheap (sysctl/vm_stat only) and if: always()-guarded. Keep it gated for ongoing visibility, or revert after the sizing decision.

@vercel

vercel Bot commented Jul 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
react-native-harness Ready Ready Preview, Comment Jul 23, 2026 10:47am

Request Review

Add a second sampler logging full `ps -Ao rss,pid,command` every 10s,
plus a peak-snapshot per-process/grouped breakdown in the step summary,
to attribute the 7 GB runner pressure to specific processes.
ps RSS double-counts shared framework memory, inflating simulator totals
absurdly. Switch the per-process sampler to `top -l1 -o mem` (phys_footprint,
Activity Monitor's metric) plus PhysMem total and process count.
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