I'm using JMeter to test an Apache2 server I configured. I'd like to test whether the server can handle 200 HTTP requests coming altogether every second, repeatedly for a high number of seconds (like 1 minute, or even more). I read the JMeter documentation, but it struggled a little bit in understanding the Timers functioning. I configured the test with
- Numbers of Threads 200
- Ramp-up period 1
- Loop Count 100
Now, as far as I understood and noticed, the behavior of JMeter is to try to raise the 200 threads in 1 second, and then perform 200*100=20000 requests as fast as possible (or at least this is the behavior I'm experiencing on my server), in chunks of 200 requests per time. This means that the server might (it actually does) receive more than 200 requests/second. The behavior I'd like to reproduce is instead to have 200 requests exactly every second. I don't care if they are coming all together at the beginning of the second, or they come in a randomized way, distributed the second window (one every 5 milliseconds, or whatever). So I tried some Timers, but without success. I tried:
Constant Timer
with a Thread Delay of 5 milliseconds. Doing the math, it should send a request every 5 milliseconds, and being 200 Threads, it should send 200 requests/second (200*5 = 1000ms).Constant Throughput Timer
with a target throughput of 12000.0. Maybe I'm wrong here, but this should be samples per minute, so 200 requests per 60 seconds are 200*20 = 12000 (if a sample is a request). I did not understood the "Calculate Throughput based on" option, and I tried both "this thread only" (which one?) and "all active threads".
Anyway, none of this configuration is acting as I need.
Constant Timer
with 1000 milliseconds. Each thread should then make a request every second, for 200 requests / second. - RowlandB