How to use this worker count calculator
Enter the core count, the target CPU utilization and the wait and compute time of one task, and the worker count appears. The table below repeats the figure for other core counts under the same conditions. Add throughput and response time to compare with the concurrency implied by Little law.
How the number is derived
N = cores x target utilization x (1 + wait / compute), the formula from Brian Goetz, Java Concurrency in Practice. Two cores at 100% utilization with 50 ms wait and 5 ms compute give 22 workers, and four cores give 44. With zero wait the result equals the core count. The Little law figure is throughput times response time.
Limits and cautions
There is no authoritative recommended worker count, and wait time includes lock waiting as well as I/O. Memory or a downstream limit may bind first, so always measure under real load and adjust. This is not a database connection pool calculator, and queue drain time is out of scope.
Frequently asked questions
It should when wait time is long. Two cores with 50 ms wait and 5 ms compute give 2 x (1 + 10) = 22 workers. With zero wait it equals the core count.
Any time spent waiting, including locks and condition variables, not only I/O. Put only the time the CPU is actually held into compute time.
Treat it as a starting point. No single number fits every case, and memory or a downstream limit is often the real ceiling.