Sarvesh Upadhyay
Sarvesh Upadhyay

Reputation: 13

How to send 3000 requests with 100 Concurrent user in Jmeter?

How to send 3000 requests per minute with 100 Concurrent user in Jmeter ?

Can we send it ?

No of thread :100 Ramup period : 1 Loop :30

or anything other method ?

Upvotes: 0

Views: 4524

Answers (2)

Dmitri T
Dmitri T

Reputation: 168157

If you need to send 3000 requests per minute it means that you need to send 50 requests per second.

The relevant Thread Group configuration would be:

enter image description here

In order to limit JMeter's throughput to 50 requests per second the easiest option is using Throughput Shaping Timer

enter image description here

Also be aware that given the above setup you will be able to send 3000 requests per second only if your application response time is 2 seconds or less, if it's more - you will need to increase the number of threads in the Thread Group as Throughput Shaping Timer is only capable of pausing the threads, it will not kick off extra threads if the current amount is not enough in order to reach/maintain the desired load.

Upvotes: 2

Muditha Perera
Muditha Perera

Reputation: 1250

What you are trying to do will highly depend on the response times of the requests you send and the number of requests you have under a thread.

For example, with the config, you have suggested we can expect several outcomes.

100 Ramup period : 1 Loop :30

  • We will have 100 Threads up at the beginning of the test
  • They will loop 30 times
  • You will have 3000 hits, ONLY if you have one request under the thread group
  • For example, if a request has a response time of 2 seconds. It will take a minimum (30*2 = 60) seconds to complete the run if the ramp-up is 0. But the response times can be lower higher. Considering that, we can't expect to generate a load of 3000 per minute with 100 threads looping 30 times.

You can have different configs to serve you need and some solutions could have some drawbacks.

If you really need to use 100 Threads, to generate a load of 3000 hits per minute, you need to do the following.

  1. You must control the throughput
  2. You must control the request sending frequency ( send requests without waiting for the response

Controlling throughput is not a problem. You can simply use the Constant Throughput Timer enter image description here

But the problem is controlling the request sending frequency. In this case, if you are planning to monitor the server behavior with a load of 3000 hits per minute, this method will work. If you have multiple requests in a thread. Those requests will execute in a sequence (In most of the real-world scenarios, those requests are interdependent). In looping, for a new loop to be started, the current requests in the thread should be sent.

With the above behavior, we can't achieve a thread frequency of 3000 requests per minute. So we have to for the responses of the requests. To do that, move to the Advanced tab of the HTTP request sampler. and change the response time out 1ms

enter image description here

Now what will happen is, once the request is sent, JMeter will wait only 1 ms for the response. And will start sending the next request in line which means we can create a frequency that can serve 3000 requests per minute. With this most probably all of your requests will get "Timed out" errors but your server will get hits. If your threads have requests which depend on the previous request, this setup will not work for you. Which is why I do not recommend it.

Note: If you want to send hits to the server with a frequency of 3000 per minute. What I suggest is to use a

  • Constant Throughput Timer
  • Increase the number of threads and loops to create more than 3000 requests per minute

for example, 1000 threads, 10 Rampup 20 Loops with a constant throughput timer of 3000 hits per minute will help you to generate the load you need. But if you want to stick with the 100 threads option we must reduct the response timeout time and control the request frequency

Upvotes: 0

Related Questions