Operations 5 min read

Understanding and Calculating QPS (Queries Per Second) with JMeter Performance Testing

This article explains what QPS (Queries Per Second) is, presents formulas and examples for calculating overall and per‑interface QPS, and shows how to use JMeter to create a test plan, add thread groups and listeners for accurate performance measurement.

Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Understanding and Calculating QPS (Queries Per Second) with JMeter Performance Testing

Hello, I am mikechen. QPS (Queries Per Second) is a metric used to measure how many requests a system processes each second and is a core indicator for large‑scale, high‑concurrency, high‑performance systems.

The method for calculating QPS depends on whether you are interested in the total number of queries of the whole system or the queries of a specific interface or service.

First case: Overall QPS

Overall QPS is the average number of requests the entire system handles over a period of time. For example, record the total number of requests processed in a given time interval and divide by the number of seconds.

Formula: QPS = Total Requests / Time (seconds)

Example: 3,000 requests in 1 minute → QPS = 3000 / 60 = 50 QPS. If 18,000 requests are processed in one hour → QPS = 18000 / (1 h × 60 min/h × 60 s/min) = 5 QPS.

Second case: Specific Interface/Service QPS

For a particular API or service, QPS is the average number of requests it handles over a time interval.

Formula: QPS = Interface Total Requests / Time (seconds)

Example: 2,400 requests in 15 minutes → QPS = 2400 / (15 min × 60 s/min) = 2.67 QPS. Another example: 1,200 requests in 5 minutes → QPS = 1200 / (5 min × 60 s/min) = 4 QPS.

Note: The time window should be long enough to obtain stable and accurate results.

For more precise measurement, you can use performance testing tools such as JMeter to simulate load and capture QPS.

Prepare Test Plan

Open JMeter and create a new Test Plan .

Add a Thread Group under the Test Plan to simulate concurrent users.

Add Listeners under the Test Plan to observe results, such as:

Summary Report : shows throughput, average response time, error rate, etc.

Aggregate Report : displays per‑second request count, min/max response times, throughput, and more.

JMeter will send requests according to the configured number of users and loops, producing the desired performance metrics.

Finally, a bonus for readers: a 300,000‑word collection of Alibaba architect advanced topics and a comprehensive set of major‑company Java interview questions with answers. Reply with the keyword “合集” to the public account “mikechen的互联网架构” to receive the materials.

For the full Java interview collection, visit the provided links and scan the QR codes.

performance testingJMetersystem monitoringQPSBackend Metrics
Mike Chen's Internet Architecture
Written by

Mike Chen's Internet Architecture

Over ten years of BAT architecture experience, shared generously!

0 followers
Reader feedback

How this landed with the community

login 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.