Quick summary:
JMeter Performance Testing shows how fast a system responds and where it stops scaling. This load testing tutorial follows a stepped JMeter test our quality engineering team ran against a lab API: realistic test plans, CLI and distributed runs, p95, throughput, and error rate per step, bottleneck signatures, and the saturated connection pool we fixed. Every figure comes from that run.
Your API looks fine in a quick test, yet users report slow pages at peak, or a load test “passes” and production still falls over. Usually the test measured the wrong thing: an average hides the slow tail, and a single load level hides where the system saturates. Our quality engineering team at ScriptsHub Technologies sees this in client reviews, so we rebuilt it as a JMeter performance testing lab on version 5.6.3.
What is JMeter performance testing?
JMeter performance testing uses Apache JMeter to simulate many concurrent users against an application, then measures response times, throughput, and errors to judge whether it meets its performance targets.
JMeter software is a free, open-source Java application built for software performance testing. Its test plan elements define the virtual users (Thread Group), their requests (Samplers), pauses (Timers), and failure rules (Assertions). The same plan can hold expected peak traffic (a load test), keep adding users until something breaks (a stress test), or run for hours to expose memory leaks (a soak test). This tutorial steps from load into stress, because the step where things break reveals the bottleneck.
JMeter bottleneck analysis loop: run a stepped load test, read client-side metrics, find the knee, correlate server signals, change one constraint, rerun the same steps.

Figure 1: The JMeter bottleneck analysis loop used in this tutorial.
Which metrics matter in a JMeter load test?
Four numbers carry most of the meaning: response time percentiles, throughput, error rate, and the number of concurrent users that produced them.

Table 1: Core metrics in a JMeter load test and how to read them.
Our team used a p95 latency gate for performance testing a PHP to Python migration to gate releases on percentiles.
How do you build a JMeter load test plan?
Keep the plan small, parameterize every load setting, and assert on the response so failures count as errors.
For this JMeter performance testing run, our lab target is a Node.js orders API that simulates database calls through a pool of ten connections: each call holds a connection for 30 to 60 ms, with a 2% slow tail. In addition, a request that waits over one second for a connection fails with HTTP 503, just as a real pool times out. Meanwhile, the test plan itself is deliberately simple: one Thread Group, one HTTP sampler, a status assertion, and a 250 ms think time.

Table 2: JMeter test plan elements that make a load test realistic.
Our stateless lab endpoint needs only a Thread Group, a timer, and an assertion from this table; a real login-to-checkout journey usually needs every row.

Why this works
__P()reads properties passed with-J, so one plan runs at any load level. JMeter already fails 4xx and 5xx responses; the assertion makes anything but 200 an error. On pages, assert on content too, since some error pages return HTTP 200. Think time keeps user counts meaningful.
How do you run a stepped JMeter load test?
Run the plan in CLI mode at increasing user counts, write raw results to a file per step, and leave GUI listeners out of the load run.
The JMeter best practices for load tests recommend CLI mode with few listeners, because the GUI and View Results Tree eat the load generator’s memory. We ran six 70-second steps and discarded the first 10 seconds of each. JMeter and the service shared one 2-vCPU machine, so your absolute numbers will differ; the pattern transfers. A gotcha we hit: without -f, a rerun silently appends to old results.
If one load generator runs short of CPU or bandwidth, split the load with JMeter distributed testing: start jmeter-server on each worker and run the controller with -R host1,host2. Each machine should run the same JMeter and Java versions, with its own data files and an RMI keystore unless SSL is off. For live dashboards, a Backend Listener streams results to Graphite or InfluxDB for Grafana; Prometheus needs a third-party plugin.

When to use which
Use the built-in JMeter HTML dashboard to explore one run; it reports the 90th, 95th, and 99th percentiles by default. Use the script below to compare steps and fail a CI build. The same JMX file also runs in Azure Load Testing for JMeter scripts.

Why this works
The script drops ramp-up, computes nearest-rank percentiles, and divides samples by the time from the end of ramp-up to the last response, mirroring the throughput formula in JMeter’s glossary. It flags saturation when users grow by 50% or more but successful throughput grows under 10%, and exits non-zero on an SLA breach so CI can stop a release. On the 100-user step, its percentiles were within 4 ms of the JMeter dashboard’s.
How do you read percentiles, throughput, and error rates?
Read the steps in order and look for three changes: p95 jumping while p50 follows, throughput going flat, and errors appearing.

Table 3: Baseline results per step with a 10-connection pool, measured over 60 seconds after ramp-up.
Up to 50 users, throughput doubles and p95 stays near 60 ms. The p99 of about 200 ms comes from the 2% slow tail, which an average would hide.
The knee arrives between 50 and 100 users: users doubled, throughput rose only 26%, and p50 jumped from 47 to 220 ms. From 100 to 200 users, throughput stays near 207 requests per second while p95 nearly triples: the extra users are waiting. At 300 users, 10.5% of requests fail with HTTP 503 after the one-second pool timeout. Raw throughput climbs to 229.6 requests per second only because failures count as samples, so read successful throughput beside errors.
How do you find the bottleneck from JMeter results?
The knee tells you that a resource is saturated; server-side metrics, matched by timestamp, tell you which one.
JMeter shows when the system slowed; APM tools such as Dynatrace or New Relic, or OS and database counters, show why. Rule out the load generator, then match a signature.

Table 4: Common bottleneck signatures and how to confirm each one.
Our service logged its pool every second; at 50 users, about 8 of 10 connections were busy. At 100 users all 10 were busy and 37 requests waited an average of 177 ms. At 300 users, 231 requests were waiting on average, and 1,463 failed with HTTP 503 in the measured window.
Little’s law for queueing systems confirms it: at 150 users, 206.8 requests per second times 0.719 seconds (469 ms mean response plus 250 ms think time) gives 149 concurrent users. Capacity is pool size divided by average hold time: 10 connections at about 48 ms each allow roughly 208 requests per second, exactly where throughput flattened.
Why this works
When the plateau matches one resource’s calculated capacity, that resource is the bottleneck. If it sits below every resource you measure, look for an unmeasured one, such as a lock, a rate-limited downstream API, or capacity throttling on a shared platform.
If your load tests pass but production still slows at peak, our team can run load testing and bottleneck analysis on your system, as we did when diagnosing SQL Server linked server performance.
How do you verify a performance fix with JMeter?
Change one constraint, rerun the identical steps, and compare step by step: a real fix moves the throughput ceiling and keeps p95 and error rate inside the SLA at your target load.
We raised the pool from 10 to 30 connections and repeated the JMeter performance testing steps. The arithmetic predicted a ceiling near 625 requests per second; the rerun plateaued at 626, with CPU under 20% at every step.

Table 5: Same steps before and after raising the pool from 10 to 30 connections (successful requests per second).
Two line charts. Before the fix, p95 rises from 59 ms to 1,053 ms and throughput flattens near 207 requests per second from 100 users. After the fix, p95 stays under 260 ms and throughput rises to about 626 requests per second.

Figure 2: p95 response time and successful throughput per step, before and after the fix.
At 300 users, p95 fell from 1,053 to 254 ms and errors from 10.5% to zero. The knee moved rather than vanished: from 200 users all 30 connections are busy again, so in a real system the next question is the database behind the pool.
When to use which
A bigger pool helps only when the database has spare capacity. HikariCP’s connection pool sizing guide argues small pools usually win, so when the database is busy, shorten each connection’s hold time through SQL Server index tuning or caching patterns that cut database load.
How should you add JMeter performance testing to a release?
Run a short JMeter load test on every release candidate, a full stepped test on a schedule, and fail the build when p95 or error rate breaks the SLA.
Start with one critical journey and a target, such as p95 under 500 ms and under 1% errors. Keep test data near production volume. The AWS Well-Architected performance efficiency pillar stresses keeping efficiency as demand changes, so tests must repeat.
JMeter performance testing works best beside functional automation, covered in our post on AI test automation with agentic testing; our guide to retries, idempotency, and timeouts explains why timeouts decide whether overload fails fast or piles up.
Is JMeter still a good performance testing tool?
Yes, as a performance testing tool for load and stress tests of web apps and APIs, if you read percentiles and successful throughput, not averages.
JMeter software is free, runs from the command line, ships an HTML dashboard, and scales out with distributed mode. Teams wanting tests as code often choose k6 or Gatling instead. The method in this load testing tutorial applies to any load testing setup, because the knee and the plateau mean the same thing everywhere.
ScriptsHub Technologies helps teams in the US, UK, and India make software performance testing predict production. Book a software performance testing review to get this lab’s JMeter starter kit, and we will run the same JMeter performance testing method on your slowest endpoint.
Frequently asked questions
Q. How many users can JMeter simulate on one machine?
It depends on script complexity, response size, and hardware, so measure it. In our lab, 300 threads with 250 ms think time used under 20% CPU on a 2-vCPU machine shared with the service.
Q. Why should you run JMeter in CLI (non-GUI) mode for load testing?
Because the GUI consumes CPU and RAM on the load generator and can create false client-side bottlenecks. Every step of our lab ran from the command line, writing raw results to a .jtl file.
Q. What is the difference between load testing, stress testing, and soak testing in JMeter?
Load testing checks expected traffic against SLAs. Stress testing pushes past capacity to find the breaking point; our lab’s errors began at 300 users. Soak testing holds steady load for hours to catch leaks.
Q. What is the difference between latency and response time in JMeter?
Latency is the time until the first byte arrives; response time, JMeter’s elapsed time, runs until the last byte. With our 201-byte responses, the two were identical at the median and p99.
Q. Why do JMeter response times increase even when server CPU and memory are low?
Usually a pool, lock, or slow dependency is full, so requests queue without using CPU. In our lab at 100 users, all 10 connections were busy and 37 requests queued, lifting p50 from 47 to 220 ms.
About ScriptsHub Technologies
ScriptsHub Technologies is a data engineering and applied AI consultancy with teams in the US, UK, and India. Our engineers build data platforms, Power BI and analytics solutions, AI features, and the quality engineering practices that keep them reliable in production. Learn more at scriptshub.net.


