Calculate TPS (transactions per second) from a transaction count and elapsed time, or estimate a transaction count, test duration or load-test TPS.
- All Personal Finance Calculators
- Cancellation Rate Calculator
- Events Per Second Calculator
- Bit Resolution Calculator
Calculator Functions
| Function | What it does | What it requires |
|---|---|---|
| Transactions per second | Finds the measured throughput of a system over an interval | Requires the number of completed transactions and the elapsed time (seconds, minutes or hours) |
| Expected transaction count | Finds how many transactions a steady rate completes in a period | Requires the average transaction rate (per second, minute or hour) and the elapsed time |
| Time for a transaction count | Finds how long a steady rate takes to complete a number of transactions | Requires the number of transactions and the average transaction rate, which must be above zero |
| Load-test TPS estimate | Estimates the steady throughput of a fixed number of users or threads repeating a script | Requires the concurrent users or threads, the average transactions per iteration (1 unless changed) and the active time for one complete iteration (seconds or ms) |
Transactions per second and Load-test TPS estimate also show the rate per minute and per hour, and Time for a transaction count shows minutes and hours. The load-test function has two optional delays, a think time and an extra delay after each iteration, and a blank counts as zero.
Transactions Per Second Formulas
| TPS | Throughput in transactions per second |
| C | Completed transactions |
| T | Elapsed time (s) |
Throughput is the number of completions divided by the time over which they were observed [1]. The time is the whole interval, idle periods included.
Transactions per second
The main formula as written. 5,000 transactions completed in 3 seconds is 1,666.67 TPS, and 1,200 completed in one minute is 1,200 ÷ 60 = 20 TPS. Only completed transactions count, so requests that were sent but failed or timed out are left out of C.
Expected transaction count
A steady 20 TPS held for 5 minutes completes 20 × 300 = 6,000 transactions. A result with a fraction is an average expectation, since real counts are whole numbers.
Time for a transaction count
10,000 transactions at a steady 50 TPS take 200 seconds, or 3.33 minutes.
Load-test TPS estimate
N is the number of concurrent users or threads, k the average transactions in one iteration, R the active time for one complete iteration, Z the think time and P the extra delay after each iteration, all in seconds. It comes from the response time law for a fixed group of users, N = X × (R + Z), where X is throughput [1]: each user finishes one iteration every R + Z + P seconds. 64 users with a 2 second iteration and 30 seconds of think time produce 64 ÷ 32 = 2 TPS [1]. 100 threads running 3 transactions per iteration, with 0.5 s active, 1 s of think time and a 0.5 s delay, produce 150 TPS.
Limits of This Estimate
- A measured TPS is an average over the interval. It hides bursts, so a peak rate needs a shorter window around the busiest period.
- Expected transaction count and Time for a transaction count assume the rate stays constant. Start-up, queueing and changing load make real runs differ.
- The load-test estimate holds only while the system keeps up. As load rises the iteration time R grows, so throughput stops increasing in step with the number of users. It is not a capacity limit and needs checking against completed throughput and errors in a real test.
- The extra delay is a pause added after each iteration. A pacing setting that fixes the time from one iteration start to the next works differently and is not an added pause.
Sources
- Lazowska, Zahorjan, Graham and Sevcik, Quantitative System Performance, Chapter 3: Fundamental Laws: throughput as completions divided by observation time, and the response time law N = X × (R + Z) for a fixed number of users
