I'm using jmeter throughput shaping timer to send .011 reqs per sec. so I have given Start RPS as .011, end RPS as .011 and Duration as 300 secs. As per my understanding for that duration only 3 requests should happen but it sends 1 request per second.
ThroughputshapingTimer
Thread group
Expected - 3 hits for 300 secs
Actual - morethan 200 hits per 300 secs duration.
Throughput shaping timer might not work properly if some connections such as FTP etc are left open when the samplers are done with the execution. Ensure that the connections are being closed. Also, avoid using System.out.println statements in the samplers/postprocessors.
Always use FlowActionController if some FTP connections or API calls are made from Pre or PostProcessors.
Related
I Want to make a test case to send 50,000 Requests with 400 RPS using Jmeter.
I have been suggested to use combination of Concurrency thread group and Throughput Shaping Timer for this use case and I have tried following from the following link: https://www.blazemeter.com/blog/using-jmeters-throughput-shaping-timer-plugin.
Here the problem is I only get ~28K responses recorded in csv instead of 50K.
I need to make 400 RPS irrespective of the request sent the previous second
I also need to have time difference of ~1sec for each 400 rows so that I can confirm 400 requests are sent every second.
Any Other suggestions to achieving the same result are also okay.
I have used 400 as start and end rps and duration of 125 second considering 400 * 125 = 50,000
I have attached the image of my concurrency thread group too
In order to be able to send 400 RPS with 400 threads your application must respond in 1 second or less because JMeter waits for the response from previous sampler before starting the next one. If your application response time will be 2 seconds - you will get 200 RPS, 4 seconds - 100 RPS, etc.
If your application response time is higher - you need to increase the number of threads proportionally, your 40 spare threads might be not sufficient.
Also JMeter needs to be able to send requests fast enough so make sure to follow JMeter Best Practices and go for Distributed Testing if needed
If your application under test cannot handle 400 RPS - there is nothing you can do from JMeter side, you can only identify the bottleneck and either report it or fix it yourself prior to re-running the test
if the number of samplers is very high, nearly 100, how to use throughput controller in jmeter?
i want all samplers to be sent with equal number by jmeter.
my test configuration:
ultimate thread group : 50 threads, 10 minutes, ramp up 10s, ramp down 10s
sampler1 ,
sampler2 ,
...
sampler100.
throughput controller is not used.
when the test is executed the total request numbers will be like this:
sampler1 : 150 ,
sampler2 : 145 ,
sampler50 : 5 ,
sampler100 : 0
this is not the case that i want.
if i use the throughput controller (all the samplers are in the throughput controller), the result will not change satisfactory.
have any idea for the solution?
Throughput Controller doesn't guarantee that its children will be executed specified amount of times (or at least once), it can only limit the number of its children execution to the defined value.
If you have 100 samplers and 10 minutes + 20 seconds test duration if average response time exceeds 6 seconds - not all samplers will be executed
If you want all the 100 samplers to be executed at least once within the bounds of 10 minutes time frame you need to limit the time JMeter waits for the response to something below 6 seconds, i.e. to 5 seconds.
In case of HTTP Request sampler the timeout setting can be found at "Advanced" tab
or better use HTTP Request Defaults, in this case you won't have to set the timeout 100 times.
Also make sure that "Action to be taken after a Sampler error" is set to Continue
as having 150 occurrences of execution of 1st sampler most probably means that there is an error somewhere and the user is restarted so it executes samplers from the beginning once again
I am having a requirement to perform a load testing for api's with 1000 request per minute. i have setup a stepping thread group as displayed below :
In above image you can see that i have configured the parameters as 20 threads per second ,so it will take 50 seconds to reach 1000 threads. but still graph shows 2 min and 31 sec to completed the 1000 request.so please help me to set it.
Please help me to configure it properly , my exact requirement is as displayed below :
1) 1000 threads
2) In 1 minute it needs to be completed.
Change stepping thread group settings to hold 60 seconds 1000 threads:
1000 threads (virtual users) will produce 1000 requests in one minute only under specific condition: response time must be 16.6 milliseconds.
If response time will be higher - JMeter will execute less requests
If response time will be lower - JMeter will execute more requests
If you want JMeter to conduct the load at rate of 1000 requests per minute it's better to consider Concurrency Thread Group and Throughput Shaping Timer combination
Throughput Shaping Timer configuration:
Concurrency Thread Group configuration:
-I has a request for post data to server.
-I config Jmeter with info :
Number of Threads(users) : 16
Ramp-up : 1 and check forever
I run jmeter about 15 minutes(900s) and stop.After,i view report and see report display about 45000 samples .
=> I think only 14400 samples expect for 15 minutes but display more samples.
So,Can jmeter run more samples (> 16 thread in 1s) although i config 16 threads in 1s ?
Thanks,
JMeter tries to execute samplers as fast as it can, each thread sends request, waits for response, sends another request, etc.
You will get 14400 samplers only if response time for each sampler will be exactly equal to 1 second. If response time is less than one second - you will get more samplers executed within the given timeframe and vice versa.
If you need to throttle JMeter execution rate to 960 requests per minute (16 requests per second) you can use one of the following elements:
Constant Throughput Timer
Throughput Shaping Timer
Be aware that both timers are capable of only pausing JMeter threads to limit the load to the defined factor, they won't be able to kick off any extra threads to reach the target throughput in case if current is too low.
Following are the params,
in the above scenario, I expect 2 threads but i see 6 threads
below is the output,
Each JMeter thread executes all HTTP Request (or other) samplers under the Thread Group as fast as it cat. How many samplers will be executed given 2 seconds test duration depends on your application response time.
If you need to limit the throughput to certain value (i.e. 1 request per second) you will need to add Constant Throughput Timer to your Test Plan and configure the target throughput to be 60 requests per minute.