perf(sandbox): wake orphan reaper on child exit - #3757
Conversation
Closes #3756 Replace the idle 50 ms procfs scan with SIGCHLD notifications and a 30 second recovery sweep. Preserve managed-child wait ownership and cover idle and exit behavior in isolated tests. Signed-off-by: Drew Newberry <anewberry@nvidia.com>
|
Label |
Manual Podman smoke testTested commit
Result: passed. This is a focused smoke check of idle wakeups, orphan cleanup, and continued sandbox use; it is not a full idle CPU benchmark. |
johntmyers
left a comment
There was a problem hiding this comment.
gator-agent
PR Review Status
The initial code review found no blocking issues. The SIGCHLD eventfd wakeup preserves managed-child wait ownership, retains a recovery sweep, and includes focused regression coverage and architecture documentation.
Blocking findings:
- No blocking findings remain
Carried findings:
- None
Non-blocking suggestions:
- None
Gator metadata
- Validation: Implements validated issue #3756 as a focused sandbox-runtime performance fix; the maintainer author has repository admin authority.
- Docs: Direct Fern documentation is not needed because this changes internal PID 1 reaping behavior without changing a CLI, API, configuration field, or user workflow; the sandbox architecture overview is updated.
- Checks: Current-head Branch Checks, Helm Lint, Trivy Changes, and required status gates are green.
- E2E:
test:e2eis applied, the E2E Label Help rerun instruction was followed, andOpenShell / E2Eis green on the current head. - Head SHA:
d448cd2d9ac9d3f323a7578360a4f9e01e27af48 - Base SHA:
8934b74a851696c70fd3445afd6ad59530bd8a52 - Merge base SHA:
8934b74a851696c70fd3445afd6ad59530bd8a52 - Patch ID:
c2e4005e8c55e5eee70d480cd8b739eaa29f9ade - Gator payload:
9 - Review mode:
initial - Previous reviewed SHA: none
- Review budget exhausted: no
- Maintainer decision required: no
- Next state:
gator:watch-pipeline
Monitoring CompleteMonitoring is complete because this PR has merged. Final status: The current head passed Gator review and required E2E checks, received maintainer approval, and merged from Gator metadata
I removed the active |
Summary
Wake the sandbox PID 1 orphan reaper when children exit, so an idle sandbox no longer scans procfs every 50 ms. Keep a 30-second recovery sweep and preserve managed-child wait ownership.
Related Issue
Closes #3756
Changes
SIGCHLDnotifier backed by a nonblocking eventfd before workload threads start.waitpid(WNOHANG)behavior.Deviations from Plan
None.
Testing
mise run pre-commitpassesmise run testpasses, including the new reaper testThe PR checks will provide the remaining verification. I have not measured the total idle CPU reduction in a deployed Podman sandbox; the reporter's main thread wakeups remain outside this change.
Checklist