Skip to content
IT glossary
TestingUpdated December 3, 2026

Apache JMeter

JMeter

An open-source load testing tool that simulates multiple clients using a service and measures how quickly it responds, how much traffic it handles, and how often requests fail.

Also known as: k6, Gatling

What Apache JMeter measures

Apache JMeter is a Java-based tool for testing how a service behaves under load. It sends requests and records their outcomes and elapsed times. HTTP APIs are a common target, but JMeter also supports other kinds of traffic, such as database queries through JDBC. An HTTP test runs at the protocol level: JMeter does not render pages or execute their JavaScript, so its timings do not tell you when a page becomes usable in a browser. k6 and Gatling are alternatives, not aliases for JMeter.

How a test plan works

A Test Plan is a tree of components saved in a .jmx file. With a standard Thread Group, each simulated user gets a thread. The group specifies how many threads to start, how long to spread their startup over (ramp-up), and how many times to run the scenario or how long to keep it running. A Sampler performs an action, such as sending an HTTP request. Timers introduce pauses, and Assertions check that a response is actually correct. That last part matters: an API can return HTTP 200 with an error message in the body.

Use the graphical interface to build the plan and inspect a few sample responses. Run the actual load test in CLI mode and save the results to a file. Keeping detailed result viewers open during a run can consume CPU and memory that the load generator needs to send requests on schedule.

Example: can search meet its response-time target?

Suppose a team wants to check whether its search API can sustain 100 requests per second with a p95 response time below 250 ms and an error rate below 1%. On an approved test environment, the team uses representative search terms rather than repeating one query, which might mostly exercise a warm cache. After ramp-up, it checks all three measurements over the same steady-load window. A p95 of 220 ms means about 95% of measured responses took 220 ms or less. That result alone is not a pass: the team still needs to confirm that the run reached 100 RPS and that errors stayed below the limit.

Common interview question: users versus requests per second

Why doesn't 100 threads mean 100 RPS? In a standard Thread Group, each thread proceeds through its scenario in order. A slower response delays that thread's next action, and any pauses in the plan also affect the request rate. The thread count controls how many virtual users are active; the achieved request rate is something you measure.

If request throughput levels off while response times rise, don't assume the database is at fault. First verify that the load generator has enough CPU, memory, and network capacity. Then compare the JMeter results with service metrics from the same time window, such as queue depth or time spent waiting for a database connection. The test shows when performance changed; server-side measurements help explain why.