Worker and Connection Pool Memory Budget Calculator
Estimate the maximum worker or connection count while holding the other count fixed within the same RAM budget.
Combine worker and connection memory only when both share the same RAM budget. Avoid double-counting shared memory and enter peak incremental values for each resource.
Results
—
- RAM used by fixed overhead and reserved resources
- —MiB
- RAM remaining for the selected resource
- —MiB
- Estimated RAM usage at the maximum count
- —MiB
- Spare RAM at the maximum count
- —MiB
Results update automatically when the required values are entered.
Method, applicability and sources
Calculation method
Required RAM = fixed usage + worker count×incremental RAM per worker + connection count×incremental RAM per connection. Maximum workers = ⌊(RAM budget−fixed usage−reserved connections×incremental RAM per connection)÷incremental RAM per worker⌋. Swap workers and connections to calculate the maximum connection count.
Worked example (hypothetical values)
Illustrative example: RAM 8192 MiB, fixed usage 2048 MiB, incremental RAM 160 MiB per worker and 4 MiB per connection, with 100 reserved connections. Maximum workers = ⌊(8192−2048−400)÷160⌋ = 35. RAM usage is 8048 MiB, leaving 144 MiB spare.
Applicability and limitations
Configurations within the same host or memory-limited container where peak incremental RAM per additional resource can be treated as constant. Excludes CPU, throughput, queuing, I/O, RAM on other hosts, double-counted shared memory, nonlinear peaks, and database- or worker-specific configuration limits.
Methods used
- Integer limit from an additive RAM budget (E083-linear-mib-2026-11-13): scope A shared RAM boundary with fixed peak incremental memory; region Global
Method and sources
Method: E083-linear-mib-2026-11-13 (integer arithmetic in thousandths of MiB). Data recorded: 2026-11-13.