Transaction Per Second Calculator for Databases

July 5, 2026

Transaction Per Second Calculator

Estimate sustained TPS, peak TPS, commit pressure, retry overhead, and session capacity for app and database workloads.

📌App and Database Presets
🗄TPS Inputs
Logical transactions completed in the sample.
Duration for the completed transaction count.
Active client sessions, workers, or pooled connections.
Average commit, fsync, or durable write wait.
Average non-commit work per transaction.
Deadlocks, serialization retries, timeouts, or conflicts.
Use 1 for single-row OLTP commits.
Multiplier from average traffic to peak traffic.
Reserve capacity for bursts, vacuum, checkpoints, backups, and failover.
Approximates lock, network, storage, and connection overhead.
All outputs are planning estimates. Load test the real app before setting SLOs.

TPS Estimate

Sustained TPS 0 logical transactions/sec
Peak TPS Need 0 with peak factor
Session Capacity 0 latency-limited TPS
Retry Work 0 extra attempts/sec
📊TPS Workload Grid
400Observed TPS
410Commit TPS
5 msWeighted Latency
30%Headroom

OLTP web apps

Small transactions, short locks, and many commits. Watch p95 commit latency, connection pool saturation, and retry spikes.

Queue workers

Batching improves commit throughput, but large batches increase lock duration and replay cost after worker failures.

Read-heavy APIs

Cache hits and replicas can lift logical TPS, while the primary still needs write and invalidation capacity.

Checkout flows

Expect more write pressure, uniqueness checks, inventory locks, and payment callbacks than a simple page-view workload.

Analytics ingest

Batch size dominates commit TPS. Track rows per second separately from durable commits per second.

Distributed SQL

Consensus and cross-region writes add latency. Headroom protects failover and leaseholder movement events.

📘Transaction Mix Reference
MixRead / WriteTypical Commit PatternPlanning Note
Read-heavy API85% / 15%Mostly read-only, light writesCache and replica placement affect logical TPS.
Balanced OLTP60% / 40%Short read-write transactionsUse p95 latency if the app has tight response targets.
Write-heavy queue30% / 70%Frequent durable writesBatching can reduce commit pressure dramatically.
Checkout flow45% / 55%Inventory, order, and payment writesConflict retries matter during flash-sale peaks.
Analytics batch20% / 80%Bulk inserts and upsertsTrack commit TPS and row throughput separately.
Cache-backed reads95% / 5%Rare database writesDatabase TPS can be far below app request rate.
⚙Database Preset Table
PresetCompleted / WindowSessionsLatency and Batch
SQLite Home App12,000 / 10 min818 ms commit, batch 1
Postgres API180,000 / 5 min1206 ms commit, batch 1
MySQL Checkout95,000 / 5 min9010 ms commit, batch 1
MariaDB CMS60,000 / 10 min459 ms commit, batch 1
Redis Queue900,000 / 5 min642 ms commit, batch 25
MongoDB Feed360,000 / 5 min1405 ms commit, batch 5
SQL Server Line240,000 / 10 min1607 ms commit, batch 2
CockroachDB Edge110,000 / 5 min10018 ms commit, batch 1
Kafka Sink DB1,500,000 / 5 min804 ms commit, batch 100
Analytics Batch2,400,000 / 15 min3212 ms commit, batch 500
📏Capacity and Formula Table
MetricFormulaWhat It MeansWhen To Watch It
Observed TPSCompleted transactions / secondsLogical work finished by the app.Baseline performance reports.
Attempt TPSObserved TPS x (1 + retry rate)Total database attempts including retries.Conflict-heavy or serializable workloads.
Commit TPSAttempt TPS / batch sizeDurable commit operations per second.WAL, fsync, binlog, or replica lag pressure.
Peak TPSObserved TPS x peak factorTraffic level to provision for bursts.Daily peaks, releases, and campaigns.
Session capacitySessions / weighted latencyUpper bound from concurrency and wait time.Connection pool and p95 latency tuning.
🛠Operational Reference Table
SignalHealthy RangeWarning PatternAction
Retry rate0-2%Over 5% sustainedInspect locks, unique indexes, and isolation level.
Commit latency1-10 msSpikes during checkpointsCheck WAL device, sync settings, and replica wait.
Headroom20-40%Less than 15%Add capacity or lower peak fan-out.
Batch size1 for OLTP, 25+ for ingestHuge locks or slow replaySplit batches and measure p95 response time.
SessionsPool-sized to coresToo many active waitsUse pool limits and queue excess requests.
💡TPS Planning Tips
Measure attempts, not just successes. Retries, deadlocks, and serialization conflicts consume CPU, locks, log bandwidth, and connection time even when the user sees one completed transaction.
Do not compare app requests to database commits blindly. One page view may do many database transactions, while one batch commit may represent hundreds of logical transactions.

Start small… Get a couple of users and it’s ok. Get a bunch of users and everything seem fast. Then at some point you go over this magical line and now your database chokes on its own writes. It’s not magic. You didn’t plan for the physical cost of retries and commits, only for logical transactions.

When you know how many writes per second you want and how long a user session last, that’s when the calculator does the math. It spares you having to guess what number of disk writes your app will create. That’s the most difficult aspect of capacity planning: understanding the difference between what your app believes it did and what was actualy written to the database.

Plan Your Database Size

Completed transactions is the metric most developer focus on, but they ignore the silent tax of retry overhead. Even though users see just one request, the database still do work when a serialization conflict or a deadlock occurs. This additional work occupies connection pool slots, consumes lock resources, and use CPU cycles. To account for this, it asks you for your retry rate. Two percent may not sound like much but that’s a lot of load on the system when throughputs gets high. You’re paying for failed attempts as well as successful ones.

Batching is another variable that has a big effect in the equation. When you commit each row individually, you pay dearly with write-ahead log entries and fsync operations. Committing hundreds of rows at once cut down on that overhead substantialy. But bigger batches also mean those rows are held in lock for longer amounts of time. That makes it more likely that concurrent sessions will attempts to access same data, resulting in a conflict.

You’ll notice the calculator distinguishes between logical transactions and commit transactions to help illustrate this tradeoff. Use it to determine whether your batch size is truly improving concurrency or not.

Usually the bottleneck isn’t the CPU (it’s the connection pool). You can crank out ten thousand requests a second with your app, but if you can only handle fifty at once all those other requests get queued. That number above (session capacity) represent how much your current concurrency config limits throughput, assuming an average latency. When your response time goes up, your effective throughput go down. Unless, of course, you increase the number of connections.

And that’s why it’s important to monitor p95 latency rather than average out everything. Slow requests pile up at the end and clog pool faster than a steady, average performance. Average is not the same as peak. Traffic can spike 3-4x during your busiest times. This happens when people check email in the mornings, when a new product launches and everyone logs in, or during holiday sales. If you plan for average, you’ll fail during this period.

To handle these traffic spikes, you require some amount of “headroom“… The ability to absorb sudden increases in demand without sacrificing service quality. Use the calculator to specify how much reserve capacity (and headroom) you’d like to allocate for background work such as checkpointing or vacuuming. Such maintenance tasks uses the same I/O resources as your user queries. They will cause unpredictable latency spikes if neglected, and they will be hard to debug afterwards.

Not all workloads should be tuned the same way. For example, a read-heavy API generaly scales well with additional read-only replicas being added to spread most of the load off the main node(s). Conversely, write-heavy queues has stronger durability and consistency requirements, so you’re simply stuck with higher commit latencies. One set of settings does not fit all when it comes to database engines. A relational checkout flow isn’t the same as a Redis queue. Knowing what percentage of your traffic is write vs. Read will inform your decision regarding tool presets.

We’re not trying to push as much through here as we can. We’re trying to keep it steady with the load you’re seeing in real life. If you over provision, you waste money. Under provision, you lose your reputation. When you combine peak factors, commit pressure, and retry overhead into one view, you see the total health of the system. That shifts the discussion from raw numbers toward an architecture that works. Because you considered the areas of friction instead of pretending they didn’t exist, you end up building something that lasts. And the calculator will show you where to find that sweet spot before the traffic spikes roll in.

Transaction Per Second Calculator for Databases

Related posts

Leave a Comment