Operations 9 min read

What’s the Real Difference Between QPS and TPS? A Deep Dive into System Throughput

This article explains the definitions of QPS and TPS, compares their meanings, explores related metrics such as concurrency, throughput, PV, UV, and DAU, and outlines key performance testing concepts and evaluation methods for system capacity and user experience.

Java Interview Crash Guide
Java Interview Crash Guide
Java Interview Crash Guide
What’s the Real Difference Between QPS and TPS? A Deep Dive into System Throughput

QPS

QPS (Queries Per Second) measures how many queries a server can respond to each second, representing the maximum request throughput of a specific query server.

TPS

TPS (Transactions Per Second) counts the number of complete transactions per second, where a transaction is a client request and the server’s response.

Difference Between QPS and TPS

1. TPS includes:

User request to the server

Server's internal processing

Server response back to the user

These three steps together constitute one transaction; the number of such completed steps per second is TPS.

2. QPS is similar but counts every individual request to the server, even if multiple requests are generated by a single page view, so a single page visit may generate multiple QPS.

For example, visiting a page may trigger three server requests, producing one transaction (TPS) but three queries (QPS).

Concurrency

Concurrency (concurrent degree) indicates how many requests the system can handle simultaneously, reflecting load capacity.

Throughput

Throughput is the number of requests processed by the system per unit time; TPS and QPS are common quantitative indicators of throughput.

The system’s throughput is determined by the interaction of request CPU consumption, external interfaces, I/O, and other factors.

Key Parameters

QPS/TPS: number of requests/transactions per second

Concurrency: simultaneous requests/transactions

Response Time: average response time

Relationship: QPS(TPS) = Concurrency / Average Response Time .

When either concurrency or response time reaches its limit, overall throughput cannot increase further and may even decline due to overload.

PV, UV, DAU

PV (Page View) counts each page load; UV (Unique Visitor) counts distinct users per day; DAU (Daily Active Users) counts daily active users, similar to UV.

System Throughput Evaluation

Designing a system requires considering CPU, I/O, external service latency, and estimating performance limits. Besides QPS and concurrency, daily PV is another important dimension.

By analyzing daily traffic patterns and QPS, one can estimate daily throughput.

Basic Concepts and Formulas for Software Performance Testing

From a user perspective, response time is the total time from initiating an action to receiving the result, directly affecting user experience.

From an administrator perspective, important metrics include response time, resource usage (CPU, memory, I/O), database and application server efficiency, scalability, maximum supported users, potential bottlenecks, hardware upgrades, and 24/7 availability.

From a developer perspective, considerations include architecture design, database schema, code efficiency, memory usage, thread synchronization, and resource contention.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

concurrencyThroughputQPSsystem metricsTPS
Java Interview Crash Guide
Written by

Java Interview Crash Guide

Dedicated to sharing Java interview Q&A; follow and reply "java" to receive a free premium Java interview guide.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.