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
Hot runtime: choose the automatic worker count from the host #906
With the hot runtime and no maxWorkers, the worker count is MAX_AUTO_WORKERS = 4 (src/native/memory.mjs:16) on every host. That fits some machines and not others. One adopter's ~400-file suite on an Apple M3 Pro (6 performance + 6 efficiency cores) ran 18% faster with maxWorkers: 6 than with the automatic 4 (43.8 s vs 53.2 s, warm medians of 3). 8 workers was slower than 6 and used ~30% more CPU. Our own Bluesky matrix on a host with 4 performance cores found 4 best. In both cases the fastest count equals the number of performance cores.
Done when
The automatic count is derived from the host (for example, performance cores where the OS reports them, with a fallback elsewhere) and still bounded by the memory plan. A unit test covers each source of the count and the fallback.
A counted comparison on at least two hosts or core layouts shows the new automatic count is never slower than 4 beyond noise. The deciding numbers are posted on this issue.
The banner and the hot-runtime "Workers" docs describe how the count is chosen.
Notes
macOS reports performance cores as hw.perflevel0.physicalcpu. Linux containers report no core classes, so the fallback decides there. Measurements need AC power and a quiet machine.
Activity