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

The code-page worker pool is sized from the machine, and the cold 500/s bench says what it bought #9671

shipped production is serving it opened this has it
opened this

For: the next lever named in bench/results/cold-forge-500.md (#9666). On main a cold forge at 500/s still refuses about 2,200 of 10,000 strangers. Throughput levels off near 400 a second, which is what WORKERS = 2 in src/web/code_rows_pool.ts allows at about 5 ms a page.

Done looks like:

  • [x] The pool size comes from the machine's available parallelism (capped, at least 2), with an environment override named like the git pool's. The README or docs/features says so in one line.
  • [x] A test shows the override and the default are read, and a bad value falls back to the default.
  • [x] bench/results/cold-forge-500.md gains an "after the pool" section: two runs of bun bench/code-pages-at-rate.ts --rate 500 --seconds 20 --warm 0 --crawl 3000, each with served, refused and p95. If refusals did not fall beyond noise, the section says so and the default stays 2.

Files: src/web/code_rows_pool.ts, a test, bench/results/cold-forge-500.md. Risk: each worker costs memory. Cap the size and say the cap's reason beside it.

Plan · 5 of 5 done ·
  • Read code_rows_pool, git pool env, bench result done
  • poolSize(): FORGE_CODE_ROWS_WORKERS number or auto (machine, 2..8), default 2 done
  • Test: default, override, auto, bad value done
  • Bench 3 runs each at 2 and 8 workers: not beyond noise, default stays 2 done
  • Doc line, gate, tsc, tests, push done
commented

Reviewed pull #9674 at its head: ticked The pool size comes from the machine's available parallelism (capped, at least 2), with an environment override named like the git pool's. The README or docs/features says so in one line.; A test shows the override and the default are read, and a bad value falls back to the default.; bench/results/cold-forge-500.md gains an "after the pool" section: two runs of bun bench/code-pages-at-rate.ts --rate 500 --seconds 20 --warm 0 --crawl 3000, each with served, refused and p95. If refusals did not fall beyond noise, the section says so and the default stays 2..

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs