Understanding QPS, TPS, Concurrency, and Throughput: Key Metrics for System Performance
This article explains the definitions and differences of QPS and TPS, how they relate to concurrency and system throughput, and introduces related metrics such as PV, UV, DAU, response time, and practical considerations for performance testing and capacity planning.
QPS and TPS Definitions
QPS ( Queries Per Second) measures the number of queries a server can handle per second, reflecting its maximum throughput capacity.
TPS ( Transactions Per Second) counts the number of complete transactions per second, where a transaction includes a client request, server processing, and response.
Differences Between QPS and TPS
TPS counts each complete request‑response cycle, while QPS can count multiple individual queries generated by a single page request. For example, a page load may generate three server queries, resulting in one TPS but three QPS.
Visiting a page that triggers three server requests creates one transaction (TPS) but three queries (QPS). Similarly, a fast eater handling ten buns per second represents TPS, whereas a slower eater handling one bun per second represents QPS.
Concurrency and Throughput
Concurrency (parallelism) is the number of requests a system can handle simultaneously, indicating load capacity. It can be derived from analyzing request logs within a one‑second interval.
System throughput is typically determined by two factors: QPS/TPS and concurrency. When either factor reaches its limit, overall throughput stops increasing and may even decline due to overload, context switching, memory pressure, etc.
Related Traffic Metrics
PV (Page View) : Number of page accesses; each refresh counts as one view.
UV (Unique Visitor) : Count of distinct users visiting within a day, deduplicated by unique identifiers.
DAU (Daily Active Users) : Number of users who log in or use the product in a single day, similar to UV.
MAU (Monthly Active Users) : Deduplicated active users over a month.
Key Performance Testing Concepts
From a user perspective, the critical metric is response time—the interval from initiating an action to the result being displayed. Short response times improve user experience.
Administrators should monitor:
Response time
Reasonable server resource usage
Reasonable application server and database resource usage
Scalability of the system
Maximum supported concurrent users and business processing capacity
Potential performance bottlenecks
Hardware upgrades that could improve performance
24/7 availability support
Developers should consider:
Reasonable architecture design
Reasonable database design
Code performance issues
Inefficient memory usage
Poor thread synchronization
Resource contention problems
System Throughput Evaluation
When designing a system, account for CPU, I/O, and external service latency to estimate performance. Besides QPS and concurrency, daily PV is another dimension for capacity planning.
Typical technical approach:
Identify the system's peak TPS and daily PV, noting that they have a relatively stable relationship except for holidays or seasonal effects.
Use stress testing or experience to determine the highest TPS, then calculate the maximum daily throughput based on the TPS‑PV relationship.
Important parameters influencing throughput include QPS/TPS, concurrency, and average response time, with the relationship:
QPS (or TPS) = Concurrency ÷ Average Response Time
When either concurrency or response time reaches its limit, overall throughput plateaus or declines.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Full-Stack DevOps & Kubernetes
Focused on sharing DevOps, Kubernetes, Linux, Docker, Istio, microservices, Spring Cloud, Python, Go, databases, Nginx, Tomcat, cloud computing, and related technologies.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
