Why Jmeter Throughput Shaping Timer allows more requests than configured? - jmeter

I have configured Throughput Shaping Timer in my JMeter test to limit RPS to 50 while the Ultimate Thread Group is running 500 threads. I monitor the test using 'jp#gc-Transactions per Second' listener. I can see many instances where listener shows > 50 TPS. Not sure if I have configured my test wrongly.
My objective is to test my APIs with 50 concurrent hits with 500 sets of data which is in a CSV file. Thus I am using 'jp#gc-Ultimate Thread Group' to run 500 threads - each thread reads 1 data row from csv. To limit to 50 concurrent requests, I am using 'jp#gc-Throughput Shaping Timer' set to 50 rps. I have a beanshell, 1 HTTP Request and a post processor in the Test Fragment.
I am not expecting to see the spikes shown in image 3. Everything should be limited to 50 RPS.
I am using Jmeter 3.0 with Java 1.8 and Windows 7.

Related

How to achieve expected RPS using Two Concurrency Thread Groups (or more), each with its own samplers and Throughput Shaping Timers?

In JMeter 5.4.1, I am using 2 Concurrency Thread Groups in a test plan and each has a configuration as such:
${__tstFeedback(ThroughputShapingTimerXML,1,1000,10)}
Each thread group has 1 HTTP sampler underneath it and each HTTP sampler has a Throughout Shaping Timer
Here is my test plan:
Here is an example Throughput Shaping Timer configuration:
My intention is to be able to achieve 1 RPS on each sampler for the first X seconds, but apparently, it is splitting the 1RPS between the two samplers and trying to achieve in total 1 RPS, even though each concurrency thread group has it's own separate Throughout Shaping Timer.
There is the result I am getting:
My expectation was that the samplers would generate ~1 RPS load each and the total would be ~2.
Can someone please help me understand why this is happening?
Thanks in advance.
I cannot reproduce your issue:
Server Hits Per Second chart displays 2 RPS for the 2 Throughput Shaping Timers configured for sending 1 RPS
Server Hits Per Second graph can be installed as a part of 5 Additional Graphs bundle using JMeter Plugins Manager or there is the same chart in the HTML Reporting Dashboard
I had a very similar setup as the topic starter and here is what I have in 'Hits per second' listener (As Dmitri, I had 1 RPS max in Throughput Shaping Timer)
In some cases, I had no more than 1 hit per second. My guess here is that one API is twice slower than the other, which produced inconsistent results. I might be wrong though..

How to set 1000 threads which needs to completed in 1 minute(60 sec) by using stepping thread group in jmeter?

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:

Jmeter - Throughput shaping timer - sending more requests than expected

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.

Can jmeter send request more expected samples?

-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.

configure jmeter setting based on request per secon

i am new to Load testing and would like configure my jmeter setting for the following requirement below. My understanding is Theard are different from request per second. If so what will be values in thread group for the below requirement.
"Initial load 20 request/second, increase load with 100 request/second for each minute.
Perform load test until we see an increase in latency "
You should put something very high into Thread Group and use one of the following approaches to define your load pattern:
Constant Throughput Timer - it comes bundled with JMeter
Throughput Shaping Timer or Concurrency Thread Group- available via JMeter Plugins project
In order to automatically stop the test when latency exceeds threshold you can use AutoStop Listener, again it comes with JMeter Plugins.
In general latency is networking related metric so even if your application is slow as a snail you can have low or even zero latency so I would recommend considering response time and/or transactions per second metrics as well.

Resources