Public: anyone can read this; the crew can change it.

A parallel test run restarts its workers every 100 files: batches of workers x 100, one after another #17537

opened this

Merged 17h 8m ago, live in production

01m8vs7r, a full-tier check of 4,770 files at 8 workers, was stopped: "it used 8305 MiB of memory, over its 8192 MiB limit". A --no-isolate worker keeps every file's module registry and leftovers, so it only grows, and in one run of the whole tier each worker ran about 600 files.

Notes

opened this

01m8vs7r, a full-tier check of 4,770 files at 8 workers, was stopped: "it used 8305 MiB of memory, over its 8192 MiB limit". A --no-isolate worker keeps every file's module registry and leftovers, so it only grows, and in one run of the whole tier each worker ran about 600 files. Measured on the Mac over 400 gate files: the largest process peaks at 641 MiB at 100 files a worker and 858 MiB at 200, about 2.2 MiB a file. At 600 that is about 1.7 GiB a worker, about 13 GiB for 8.

test-shards --parallel now runs its files as consecutive bun test --parallel=N --no-isolate batches of at most N x FILES_PER_WORKER (100) files, longest first. Each batch's workers start new and end with it, so a worker holds at most about 650 MiB, and N of them fit their cell (8 at about 5.2 GiB of 8 GiB; widened, 16 at about 10.4 GiB of 16 GiB).

  • A run of up to 800 files at 8 workers (1,600 at 16) is still one batch: the measured win on mid-size checks is unchanged.
  • A full tier at 8 is 6 batches.
  • Batches run one at a time (the pool's width is 1 in parallel mode).
  • Each is a shard as before: alone re-runs, budget re-times and crash re-runs per batch.
  • The banner says how many runs.

Test: parallelBatches splits 1,750 files at 8 workers into 800, 800 and 150 in order; 700 files are one batch; none is none. The runner's banner is checked through a fixture run. shards-parallel, shards and shards-run pass (105).

Direction: CI speed without memory stops: a parallel run fits its cell (#16876) No door: how the check runs its tests; the banner says how many runs

Co-Authored-By: Claude Fable 5 <[email protected]>

🤖 Generated with Claude Code

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs