apache calculator

Apache Capacity Calculator

Estimate the Apache settings you need for peak traffic. Enter your traffic and response profile, then calculate recommended concurrency and worker limits.

Example: 2400 RPM = 40 requests/second average.
How much higher peak traffic is versus average (e.g., 2.5x).
Time Apache spends handling one request.
Additional headroom to reduce 503 errors during bursts.

What this Apache calculator does

This Apache calculator helps you estimate key values for capacity planning: peak requests per second, estimated bandwidth at peak, and a practical starting point for MaxRequestWorkers. It is designed for teams that need a quick, transparent model before running full load tests.

Apache can serve everything from tiny blogs to high-traffic APIs, but misconfigured worker limits often cause slow response times and 503 errors. A lightweight sizing estimate is a useful first step when tuning Apache performance.

How the calculator works

1) Convert your average traffic into peak traffic

The tool starts from average RPM and multiplies it by your peak factor:

Peak RPS = (RPM ÷ 60) × Peak Multiplier

2) Estimate bandwidth needed at peak

Based on the average response payload:

Peak Mbps = Peak RPS × Response Size (KB) × 8 ÷ 1024

3) Estimate concurrency and worker count

If each request takes longer, more requests overlap at the same time:

Concurrent Requests = Peak RPS × (Request Time in seconds)

Then we apply your safety buffer:

Recommended MaxRequestWorkers = Concurrency × (1 + Safety%)

Input tips for better estimates

  • Use real logs: Pull RPM and response size from access logs or monitoring tools.
  • Use p95 latency: If possible, use a slower percentile instead of average request time.
  • Model true peak: Launch events and ad campaigns can exceed normal daily peaks.
  • Start with 20–50% buffer: Low-risk environments can use smaller buffers; business-critical systems usually need more.

Apache directives related to these numbers

After calculating, compare the output against these directives:

  • MaxRequestWorkers (critical): maximum simultaneous requests served.
  • ServerLimit: hard upper boundary for MaxRequestWorkers in prefork/worker MPMs.
  • KeepAliveTimeout: high values may consume workers longer than necessary.
  • Timeout: very high timeout settings can increase concurrency pressure.

Example interpretation

Suppose the calculator returns 170 for recommended MaxRequestWorkers. That means your server should be able to sustain about that many overlapping active requests during your modeled peak. If your current setting is 80, you may see queueing, increased latency, or occasional 503 responses when traffic spikes.

The best practice is to combine this estimate with memory checks. Every worker uses RAM; setting MaxRequestWorkers too high can lead to swapping, which hurts performance more than a lower but stable limit.

Limitations

This calculator is a planning aid, not a replacement for load testing. Real-world performance depends on:

  • Apache MPM type (event, worker, prefork)
  • PHP mode (mod_php vs PHP-FPM)
  • Database latency and cache hit rate
  • TLS overhead, compression, and static asset strategy
  • Upstream reverse proxies/CDNs

Use the numbers as a baseline, then validate with stress tests and production telemetry.

🔗 Related Calculators