Commit 49b8f16
feat(orchestrator): improve concurrent benchmark tracing and enable huge pages (#2327)
* feat(orchestrator): add concurrency and sandbox attributes to benchmark spans
Add concurrency level, sandbox index, and sandbox ID attributes to the
bench-resume span so traces can be filtered by concurrency level in
Grafana/Tempo (e.g. {span.concurrency=5}).
* feat(orchestrator): enable huge pages by default in concurrent benchmark
Production uses huge pages, so the benchmark should too. Disable with
DISABLE_HUGE_PAGES=true for comparison. Uses a separate build ID per
mode to avoid cache collisions.
* feat(orchestrator): add spans for uffd socket and rootfs waits in resume-fc
During concurrent sandbox creation, resume-fc blocks on several
parallel waits before it can load the snapshot. These waits were
previously invisible — only covered by point-in-time ReportEvent
calls that do not capture duration.
Adding duration spans makes them visible as bars in the Grafana
waterfall view. This is important because wait-rootfs-path turned out to
be the primary bottleneck, growing significantly as more sandboxes are
created simultaneously.
* fix(orchestrator): parse DISABLE_HUGE_PAGES as a boolean flag
Use strconv.ParseBool so that common boolean env values like 1, TRUE,
or True are accepted, not just the exact string "true".
* Update packages/orchestrator/pkg/sandbox/fc/process.go
Co-authored-by: Jakub Novák <jakub@e2b.dev>
---------
Co-authored-by: Jakub Novák <jakub@e2b.dev>1 parent cdab472 commit 49b8f16
2 files changed
Lines changed: 30 additions & 4 deletions
Lines changed: 23 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
| 39 | + | |
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
| |||
137 | 139 | | |
138 | 140 | | |
139 | 141 | | |
140 | | - | |
141 | | - | |
142 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
143 | 146 | | |
144 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
145 | 156 | | |
146 | 157 | | |
147 | 158 | | |
| |||
423 | 434 | | |
424 | 435 | | |
425 | 436 | | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
426 | 445 | | |
427 | 446 | | |
428 | | - | |
| 447 | + | |
429 | 448 | | |
430 | 449 | | |
431 | 450 | | |
| |||
434 | 453 | | |
435 | 454 | | |
436 | 455 | | |
| 456 | + | |
437 | 457 | | |
438 | 458 | | |
439 | 459 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
489 | 489 | | |
490 | 490 | | |
491 | 491 | | |
492 | | - | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
493 | 496 | | |
494 | 497 | | |
495 | 498 | | |
| |||
500 | 503 | | |
501 | 504 | | |
502 | 505 | | |
| 506 | + | |
503 | 507 | | |
| 508 | + | |
| 509 | + | |
504 | 510 | | |
505 | 511 | | |
506 | 512 | | |
| |||
0 commit comments