CalculatorMasters

A/B Testing CPU Requirement Formula

Learn how to estimate total CPU cores and CPU capacity per concurrent user for an A/B test.

This calculation translates concurrent A/B test traffic and CPU work per request into planned CPU capacity. It includes a utilization target so the estimate leaves headroom instead of assuming servers can run continuously at full CPU use.

  • 100% Free
  • No Sign-Up Required
  • Private & Secure
  • Mobile Friendly

Estimated CPU Cores Required

CPU cores = [Users × Requests per user per minute ÷ 60 × (Baseline CPU ms + Experiment overhead ms) ÷ 1,000] ÷ Target utilization

Where:

First, calculate the total requests per second. Multiply that by the CPU time needed for each request, convert milliseconds to seconds, and divide by the planned CPU utilization.

Variables Explained

VariableWhat It MeansUnit
concurrentUsers - Concurrent usersThe expected number of active users at the same time during the test period.users
requestsPerUserMinute - Requests per user per minuteAverage application requests made by one active user each minute.requests/minute
baselineCpuMsPerRequest - Baseline CPU time per requestAverage CPU processing time for an application request before experiment processing.ms/request
experimentOverheadMs - Experiment overhead per requestAdditional CPU time for assignment, flags, analytics, or variant-specific processing.ms/request
targetCpuUtilization - Target CPU utilizationPlanned average percentage of available CPU capacity to use.percent
variantCount - Number of variantsTotal equally split variants, including the control, used to estimate users per variant.variants

Step-by-Step Calculation

1

Calculate total requests per second

Convert the per-user request frequency into the total request rate generated by all concurrent users.

requestsPerSecond = concurrentUsers * requestsPerUserMinute / 60

2

Calculate CPU time per test request

Add normal application CPU processing and the extra work introduced by the experiment.

cpuMsPerRequest = baselineCpuMsPerRequest + experimentOverheadMs

3

Convert request work into CPU seconds per second

This is the CPU work the application needs each second before capacity headroom is applied.

cpuSecondsPerSecond = requestsPerSecond * cpuMsPerRequest / 1000

4

Apply the utilization target

Divide workload by the usable share of each core to estimate planned total CPU capacity.

cpuCoresRequired = cpuSecondsPerSecond / (targetCpuUtilization / 100)

5

Calculate CPU capacity per concurrent user

Divide total planned cores by concurrent users to show average capacity attributable to one active user.

cpuPerUser = cpuCoresRequired / concurrentUsers

6

Estimate users per variant

Split concurrent users evenly across variants for a simple traffic-distribution estimate.

usersPerVariant = concurrentUsers / variantCount

Example: 10,000 concurrent users in a two-variant test

Concurrent users10,000 users
Requests per user per minute6 requests/minute
Baseline CPU time per request20 ms/request
Experiment overhead per request5 ms/request
Number of variants2 variants
Target CPU utilization70%
1

Total request rate

10,000 × 6 ÷ 60

1,000 requests/second

2

CPU time per test request

20 + 5

25 ms/request

3

CPU work per second

1,000 × 25 ÷ 1,000

25 CPU seconds/second

4

Planned CPU capacity

25 ÷ 0.70

35.71 cores

5

CPU capacity per user

35.71 ÷ 10,000

0.003571 cores/user

6

Users per variant

10,000 ÷ 2

5,000 users per variant

Final Result

Estimated capacity is 35.71 CPU cores, or 0.003571 cores per concurrent user, at a 70% CPU utilization target.

Try the Calculator →

Assumptions

  • Concurrent users generate requests at the stated steady average rate.
  • The supplied CPU milliseconds per request represent CPU time rather than total request latency.
  • Traffic is evenly distributed across variants for the users-per-variant output.
  • One CPU core provides approximately one CPU second of processing capacity per second.
  • The utilization target represents the planned usable portion of available CPU capacity.

Limitations

  • !Request CPU time can vary substantially by endpoint, device, cache state, and variant behavior.
  • !The calculation does not include separate capacity for databases, memory, network bandwidth, storage, or third-party services.
  • !Autoscaling delays, node failures, background jobs, and operating system overhead are not separately modeled.
  • !Uneven assignment, bot traffic, bursts, and event logging spikes can make real CPU use differ from the average estimate.

Common Mistakes to Avoid

1

Using average daily users instead of peak concurrent users.

2

Entering end-to-end response time as CPU time when much of the delay is database or network waiting.

3

Omitting CPU used by feature flags, exposure logging, analytics events, and variant-specific code.

4

Treating 100% utilization as safe production capacity rather than allowing operational headroom.

5

Assuming additional variants automatically increase total CPU demand when total traffic and per-request work remain unchanged.

6

Rounding the capacity estimate down before considering available instance or container sizes.

Related Formulas

Frequently Asked Questions

How is CPU required for an A/B test calculated?

Multiply total requests per second by combined CPU milliseconds per request, divide by 1,000, then divide by the target utilization as a decimal.

What is CPU cores per concurrent user?

It is total planned CPU cores divided by concurrent users. It is useful for comparing the relative CPU intensity of different workloads or experiment designs.

Does a higher number of variants increase CPU requirements?

Not by itself when total traffic and per-request CPU work stay constant. It can increase CPU use if more variants add more decision logic, assets, logging, or processing.

Why does target CPU utilization affect required cores?

A lower target means each core is planned to carry less average load, so more total cores are needed to provide headroom for changes in demand and processing time.

Should I use CPU time or request latency in the formula?

Use CPU time. Request latency may include waiting on databases, networks, queues, or external services that does not consume application CPU continuously.

Ready to calculate your result?

Use the calculator to get instant results with your own inputs.

Try A/B Testing CPU Requirement