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
Commit c366206
Browse filesBrowse the repository at this point in the historyBrowse files
feat(orch): collapse envd heap before pause behind a feature flag
Mirror the user-cgroup-freeze pre-pause path: when the new collapse-envd-heap
LaunchDarkly flag is set, the orchestrator calls envd's POST /collapse just
before pause so envd consolidates its scattered heap into hugepages and faults
fewer distinct frames on resume. Gate on envd version (>= 0.6.4, which exposes
the endpoint) with a dedicated 10s timeout, and keep it best-effort so a failure
never blocks pause. The flag defaults off and is rolled out via LaunchDarkly.
Observe the collapse on a dedicated envd-collapse span and two metrics: the
orchestrator.sandbox.envd.collapse.duration histogram (round-trip ms, with a
success attribute) for the pause-path cost, and the
orchestrator.sandbox.envd.collapse.chunks counter split by result
(collapsed|skipped) so chunk attempts (total) and successes (collapsed) are both
queryable. The per-call stats are attached as span attributes and logged on
success ("envd heap collapsed") so efficacy is visible in Loki when the metric
counters reset on restart. Add a resume-build -collapse flag that overrides the
LD flag on for local testing.
Signed-off-by: Nikita Kalyazin <nikita.kalyazin@e2b.dev>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
0 commit comments