A JMeter request gets faster in only two ways: the server answers sooner, or JMeter stops adding its own time to the measurement. JMeter’s side is the part you can fix in the test plan: reuse connections the way real users do, keep the load generator below its CPU limit by running in CLI mode without heavy listeners, and measure only the requests that belong to the scenario. A slow database query or an overloaded app server is a server fix, and showing it is the load test’s job.
Key takeaways
- Split every slow sample into connect time, latency and download time before changing anything. Each part points at a different fix.
- Keep Use KeepAlive on and leave Same user on each iteration ticked when your users reuse connections. In our test that meant 1 TCP connection for 20 requests instead of 20.
- Run the load in CLI mode with View Results Tree disabled. A load generator at full CPU adds its own queueing to every response time.
- More threads never make a request faster: they add load. Timeouts do not make it faster either: they turn a slow response into an error.
Is the slow request the server’s fault or JMeter’s?
JMeter records three times for every HTTP sample, and the gaps between them tell you where the time went. Connect is the time to open the connection, including the TLS handshake. Latency runs from just before sending the request to the first part of the response, and includes the connect time. Elapsed runs to the last byte of the response. None of them includes rendering or JavaScript.
| What is large | Where the time goes | Who can fix it |
|---|---|---|
| Connect | A new TCP connection and TLS handshake for this request | The test plan, if real users would have reused a connection; otherwise the network or TLS setup |
| Latency minus Connect | Sending the request, server processing, first byte back | The server |
| Elapsed minus Latency | Downloading the response body | The server (payload size, compression) or the generator’s network link |
All three are in the CSV results file by default (columns Connect, Latency and elapsed), and the HTML report plots them as Connect Time Over Time, Latencies Over Time and Response Times Over Time. If you have not built that report before, the JMeter load testing tutorial runs through the -e -o command.
How to reuse connections in JMeter (Use KeepAlive)
Connection reuse is the one JMeter setting that changes request time on its own. With Use KeepAlive ticked on the HTTP Request (it is by default) and the HttpClient4 implementation (the default when none is set), a thread reuses its connection for the next request to the same host. The manual warns that the older Java implementation gives no control over reuse.
There is a second switch on the Thread Group: Same user on each iteration, ticked by default. Unticked, JMeter treats every iteration as a new user and, in the manual’s words, “a new connection will be opened between iterations which will result in increased response times and consume more resources”.
We measured all three combinations with JMeter 5.6.3 on Java 17: one thread, five iterations of four HTTPS requests to a server on the same machine, which counted the TCP connections it accepted. Each setup ran twice.
| Settings | TCP connections for 20 requests | Mean elapsed per request |
|---|---|---|
| Use KeepAlive on, Same user on each iteration ticked (both defaults) | 1 | 6.0 to 6.1 ms |
| Use KeepAlive off | 20 | 9.7 to 10.3 ms |
| Use KeepAlive on, Same user on each iteration unticked | 5 (one per iteration) | 7.6 to 8.9 ms |
On localhost a new connection (TCP plus TLS) cost about 2 to 10 ms. Over a real network each new connection also pays round trips, so the gap grows with the distance between generator and server.
Before you switch reuse on everywhere, decide what your users do. A visitor clicking through a site reuses connections; a burst of first-time visitors opens new ones. Pick the setting that matches the traffic you are modelling, not the one with the best number. A plan that hides real handshake cost reports a faster site than your users get.
One more pattern from the same runs: the very first request of each run took 101 to 137 ms to connect, against 2 to 10 ms for later new connections. We did not profile it, but one-off start-up work in the JVM, such as loading the TLS classes, is the likely cause. Ignore the first seconds of a run, or let the ramp-up absorb them, before you read response times.
Is the load generator slowing your requests down?
A generator that runs out of CPU makes every request look slower, because JMeter’s threads queue for CPU time while the clock is running. JMeter’s best-practices page notes that a faster server makes JMeter work harder, since responses come back sooner, and that a badly sized thread count leads to the “Coordinated Omission” problem, where results are wrong or inaccurate.
What the manual recommends to reduce JMeter’s own resource use:
- Run the load in CLI mode:
jmeter -n -t test.jmx -l test.jtl. Never load test from the GUI. Starting JMeter in non-GUI mode covers the options. - Disable View Results Tree and View Results in Table during the load test; use them only while scripting.
- Save results as CSV, not XML, and only the fields you need.
- Use as few assertions as you can, and JSR223 elements in Groovy with “Cache compiled script if available” ticked instead of BeanShell.
- Generate large test data before the run and read it with a CSV Data Set, rather than building it at run time.
Then watch the generator’s CPU, memory and network during a run. If CPU sits near 100%, spread the load: how many threads JMeter can run from one machine shows how to find the limit, and increasing JMeter’s heap size covers the memory side.
Measure only the requests in the scenario
A recorded script often carries requests the scenario does not need: analytics beacons, third-party fonts, tracking pixels. They add time to transactions and noise to the results. JMeter’s manual says the most important thing when recording is to filter out the requests you are not interested in.
For page resources, decide how a browser would load them:
- Retrieve All Embedded Resources (HTTP Request, Advanced tab) makes JMeter parse the HTML and fetch the images, stylesheets and scripts it references, and the sample time then includes them. Tick Use concurrent pool so they download in parallel, as a browser does, and use URLs must match to skip domains you do not own.
- An HTTP Cache Manager with “Use Cache-Control/Expires header” ticked answers a GET from its cache, without a request, while the cached copy has not expired. That is what a returning visitor’s browser does. Leave it out when you are modelling first visits.
Both change what you measure, so keep the choice consistent between runs you compare.
Do timeouts make JMeter requests faster?
No. The HTTP Request’s Connect Timeout and Response Timeout fields set how many milliseconds JMeter waits before giving up, and a request that hits one is recorded as an error. The manual adds that the response timeout applies to each wait for data, so a response sent in chunks can take longer in total. To flag responses that are too slow without cutting them off, add a Duration Assertion. Using assertions in JMeter shows how.
What only the server can fix
When latency minus connect time is the large part, and it grows as you add threads, the server is the bottleneck: slow queries, an exhausted connection or thread pool, a cache that misses, or plain CPU. No JMeter setting changes that, and none should. Note the load at which the slope starts, fix the server, and run the same plan again to compare.
If the generator’s own limits keep getting in the way, LoadFocus runs your existing .jmx file on cloud load generators. Its JMeter page says it starts the machines for each run, spreads your threads across them, and breaks response times down by test region, so one slow region stands out from a server-wide slowdown (loadfocus.com, October 2026).
Frequently Asked Questions
Why is the response time in JMeter higher than in my browser?
Usually because the two measure different things. A browser reuses connections and caches resources, and fetches page resources in parallel. A JMeter plan may open a new connection per iteration, have no cache manager, or fetch embedded resources one after another. An overloaded load generator adds its own delay on top.
Which part of a slow JMeter sample is the server’s?
Latency minus connect time: the wait between sending the request and the first part of the response. Connect time belongs to the network and TLS setup, and elapsed minus latency is the download of the body. The definitions of each timer are in how Apache JMeter works.
Is connect time included in latency in JMeter?
Yes. JMeter’s glossary says connect time is not automatically subtracted from latency. Subtract it yourself to see the server’s share.
Does Use KeepAlive make JMeter faster?
It removes the cost of a new connection on every request to the same host. In our test with HTTPS on one machine, turning it off raised the mean request time from about 6 ms to about 10 ms and the connection count from 1 to 20.
Will adding threads make my JMeter requests faster?
No. More threads add load to the server, so response times stay the same or get worse. Add threads to find capacity, not to speed up a request.
Sources
- Glossary, JMeter user manual: elapsed time, latency, connect time (jmeter.apache.org, October 2026).
- HTTP Request, JMeter component reference: Use KeepAlive, implementations, timeouts, embedded resources and concurrent pool (jmeter.apache.org, October 2026).
- Thread Group, JMeter component reference: Same user on each iteration (jmeter.apache.org, October 2026).
- HTTP Cache Manager, JMeter component reference (jmeter.apache.org, October 2026).
- Best Practices, JMeter user manual: thread sizing, Coordinated Omission, reducing resource requirements, recorder filtering (jmeter.apache.org, October 2026).
- Generating Report Dashboard, JMeter user manual: latency and connect time graphs (jmeter.apache.org, October 2026).
- Connection measurements: our own runs of JMeter 5.6.3 on Java 17 (OpenJDK 17.0.20) against a local HTTPS server that counted TCP connections, macOS, 24 October 2026.