2

How can I use Constant Throughput Timer with the Ultimate Thread Group in JMeter for a simple Script which includes only "Login" Requests?

  • Tests will be run in Non-GUI modes.
  • No assertions or Listeners will be used in the script.
  • The total number of threads in the Ultimate Thread Group will be 250.
  • Total duration= 300 Seconds (Initial delay=10+ Startup Time=180+ Hold Load= 60+ Shutdown time= 50)

I want to control the Request per second that hits my web server using Constant Throughput Timer.

4

As far as I know, it doesn't matter which type of Thread group you are using with Constant Throughput timer, at the end of the test in the results, you will get your desired Throughput which you mentioned in Constant Throughput Timer i.e. if you have mentioned 1200/min in Constant Throughput Timer with "Calculate Throughput based on" value as "All active threads" and there are 3 requests (samplers) in your thread group then JMeter will manage the requests in a way that it will generate only 6.6 requests/sec for each sampler i.e. 1200/min is divided among 3 requests, it doesn't matter whether you are using Ultimate Thread Group or the Simple Thread Group; Throughput timer works in same way for all types of thread groups.

In case you have only 1 request as in your scenario then it will generate Throughput of 20 request/sec (sometimes 20.1) with Constant Throughput Timer value as 1200/min with "All active threads" and Timer added at the root of script. Do not select "This thread only" value for Timer added at root, as it will change the result. Please refer this link for settings mentioned in Constant Throughput Timer.

Also, there is one more plugin called "Throughput Shaping Timer" available for the same task as done as Constant Throughput Timer and users who have used it (I haven't used this plugin) says it is better than the Constant Throughput Timer (although I don't have any comparison between the two). This is just for your reference.

  • I have performed some tests to understanding this. My test starts with the CTT=30/s and 250 virtual Users. Then I increased the CTT value up to 200 Requests per second (200/s). Every Time I monitored my output. It's always the same as per my CTT value until it goes to 120/s and so on. My Output: CTT=120/s, Output=104.2/s CTT=150/s, Output=104.1/s CTT=200/s, Output=104/s Even if I ran this test without using CTT value my Output is also showing 106.1/s. Now, What does it mean?? Why my Throughput is (~104/s) even I am using the CTT Value 120/s to 200/s?? – Mirk Apr 21 '16 at 3:52
  • By the way, I'm not using any simple thread group. – Mirk Apr 21 '16 at 7:07
1

Constant Throughput Timer can only pause the threads to reach specified "Target Throughput" value so make sure you provide enough virtual users (threads) to generate desired "requests per minute" value.

See How to use JMeter's Throughput Constant Timer guide for more information.

  • I have performed some tests to understanding this. My test starts with the CTT=30/s and 250 virtual Users. Then I increased the CTT value up to 200 Requests per second (200/s). Every Time I monitored my output. It's always the same as per my CTT value until it goes to 120/s and so on. My Output: CTT=120/s, Output=104.2/s CTT=150/s, Output=104.1/s CTT=200/s, Output=104/s Even if I ran this test without using CTT value my Output is also showing 106.1/s. Now, What does it mean?? Why my Throughput is (~104/s) even I am using the CTT Value 120/s to 200/s?? Is it required more Threads to get 200/s? – Mirk Apr 21 '16 at 3:59
  • There can be 2 reasons: 1. You don't have enough threads. 2. Your application cannot serve more requests per second than 100 – Dmitri T Apr 21 '16 at 17:09
  • After increasing the threads, Here is my output: 1. For 1500 users at CTT=100/s, I got No Errors and Throughput= 98.9/s 2. For 1600 users at CTT=100/s, I got Errors (40 Requests) and Throughput= 98.4/s 3. For 1500 users at CTT=120/s, I got Errors (58 Requests) and Throughput=94.8/s Summary is: Using 250 up to 1500 threads at CTT=100/s--->I got no Errors. But if I use CTT=120/s, I got always Errors for few requests. So, what decision can I take from this output? Thanks. – Mirk Apr 21 '16 at 21:18
  • Hello, Dmitri, I need to know this. Would you please help me? Am I doing anything wrong here?? – Mirk Apr 24 '16 at 4:44
  • Your application isn't able to serve > 100 requests / second – Dmitri T Apr 25 '16 at 4:44
0

I think he has made it clear that:

Your application cannot serve more requests per second than 100.

Regarding 1500 Users/threads from one machine, need to look at the CPU/Memory consumption during test, was it HIGH consistently, if yes this can attribute to the errors and high response time too.

That's the bottom line.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.