jmeter: control transaction rate for transaction controllers - jmeter

I have a test plan with HTTP requests grouping in transaction controllers, for example:
Transaction Controller A:
--Request 1
--Request 2
...
--Request N
Now, I need to control the request rate of such transactions instead of individual requests. For example, I probably want 60 instances of Transaction Controller A per minute.
There is a Constant Throughput timer, which as far as I understand, is to control throughput for individual requests. For example, if I set Constant Throughput timer throughput to be 60 per minute, JMeter will give me 60 requests per minute on avg, but not 60 instances of Transaction Controller A per minute.
What is the right way to configure JMeter to have 60 instances of Transaction Controller A per minute?
One workaround I can think of, but haven't tried it out, is to set throughput to be 60N(N is the number of requests in a transaction). Though, I need to update it every time I change the number of requests in a transaction controller.
Thanks.

You could just add a timer to each individual request.
This is a transaction that last a second, the thread pool has 20 threads, the first configuration has no timer at all.
The system is able to produce almost 20RPS, and 10TPS (The transaction has 2 requests, each one last half second).
Lets create a timer that will limit the throughput up to 10 TPS.
Let's add the timer to the transaction controller element, it is only able to produce 5 TPS, the timer is limmiting requests up to 10 RPS.
If we add the timer in each individual request, we will be able to get up to 10TPS, 20RPS.

Related

How to setup a throuput whereby we have mulitple different request in time interval using jmeter

I have the following scenario. So I have an OS process sample that will send a request to the console app and wait for the process to finish, I want to control the request to be line 6 Request in an hour.
So send 1 Request wait 10 min send another request wait 10 mins...at 20 min point after the first request send 2 requests (could have a wait time of 30 seconds) in between the request then at the 40 min mark have another request. I have been reading about precise throughput timers but I am not new to Jmeter so trying to get some help if possible.
1 request of 5k at : xx:00 min
2 requests ( 1 each of 2k, 5k ) at : xx:20 min ~
1 request of 2k at : xx:40 min -
1hr no activity
repeat steps 1-4 a few ( 3 ) times
There is no way to run requests with different throughput values within the bounds of a single Thread Group, the overall throughput would be the speed of the "slowest" request.
All JMeter timers like Constant Throughput Timer, Precise Throughput Timer and Throughput Shaping Timer are trying to spread the load evenly during the throughput period.
So your load pattern can be implemented only using Constant Timers or Flow Control Action samplers, whatever is more convenient to you.
Something like this:
You can use Test Fragments and Module Controllers to avoid copying and pasting the requests

concurrency test in jmeter

I am new to jmeter, and I would like to do a test in which I send 500 requests per second, this for 10 seconds
The configuration I have is:
I would like to know if my configuration is correct or it can be done better
Your configuration means:
5000 users will be kicked off in 10 seconds, i.e. each second 500 users will be started
Once started the users will start executing Samplers upside down
The actual number of requests per second will depend on the application response time.
In your case you will only be able to achieve 500 requests per second if your application response time will be 1 second precisely. If it will be more - you will get less requests per second and vice versa.
If you need to send 500 requests per second for 10 seconds sharp I would suggest using Concurrency Thread Group and Throughput Shaping Timer combination.
The Throughput Shaping Timer needs to be set up like this:
And the concurrency thread group like this:
The configuration is for example only, in your case the number of threads required to conduct 500 request per second load might be different and again in mainly depends on the application response time.

JMeter number of threads in a run

I am quite new to jmeter and try to do a performance test of my application. I want to generate 100 request per second scenario however my server takes 3-4 secs to respond to every request. I am running my test for 1 mins which means number of requests fired should be 60k within the time span. However jmeter actually waits for the response before it sends next request. Which is not what I am looking for.
How can I make sure that jmeter sends a new requests every second with 100 req/sec without waiting for the response so that the number of requests fired per min is 60k.
I am trying to use constant throughput timer with 60k as request per min, however that is not helping. Here is my test screenshot.
EDIT
I have done like this
And Throughput shaping timer being as
So ideally I should get number of samples as 3000?, still not getting that.
Make sure you provide enough threads (virtual users) under Thread Group, "vanilla" JMeter won't kick off any extra threads if actual throughput is less than target one you specify in the Constant Throughput Timer.
Another solution would be using Concurrency Thread Group along with the Throughput Shaping Timer. They can be tied together via feedback loop so if you use these test elements JMeter will start more threads if the current amount won't be enough to reach the desired requests per second rate.
You can install both using JMeter Plugins Manager
My suggestion is to consider using the Arrivals Thread Group. This TG will allow you to configure the desire average throughput (ATP); the TG will instantiate the required threads needed to achieve the ATP goal.

Jmeter Running two types of requests concurrently

I have a specific use case for my web app where I want to demonstrate the following flow:
Send Type-1 http requests for the first 15 minutes
Start sending Type-2 requests at the 10 minute mark, so they run concurrently with Type-1 requests for 5 minutes. Send Type-2 requests for a total duration of 15 minutes.
I'm having issues formulating my test plan to create this test. Currently I have one thread group with two HTTP requests samplers under it (one for type 1 and one for type 2). I've set the scheduled duration for this thread group to 25 minutes. Under each of the Http Request samplers, I have a throughput shaping timer. The first one is simply set to run for 15 minutes, the second is set to "wait" (rps is .000001 for the first 10 minutes of the test) and then start sending requests at the 10 minute mark for 15 minutes.
I think the second throughput timer is being ignored though. Type-1 and Type-2 requests both start being sent as soon as I start the test, suggesting only the first throughput shaping timer is being used for both samplers. If I remove the first throughput shaping timer, then the second one is used for both http request samplers.
Can you only have one throughput shaping timer per thread group, and if so, how else could I make a test to have the second sampler wait 10 minutes in the same thread group?
Use 2 thread groups, one per request type.
Configure on each the scheduler:
for type 1, start immediatelyvand last 15 minutes
for type 2, start after 10 minutes and last for 15 minutes.

Something like thread.join in JMeter?

I have a jmeter test with about 50 users. the beginning of the test performs a login and some set up stuff. I don't want this all to happen at the same time as there would be way too much contention for a part of the test I am not interested in. So I have a ramp up period of 10 seconds. There is then one specific HTTP request where I want the 50 users sending over 1 second interval i.e. a HTTP request every 20 ms. This is to ensure the 50 users are excuting this part concurrently. Ideally, something like a thread.join() after the login / ramp up would help out here, followed by another guassian timer.
Is there something similar to thread.join() in jmeter?
To mimic thread.join you can use a Synchronising Timer, this will block n threads until they reach a point and then execute them all at the same time.
If you want this request load of 1 every 20ms to continue (rather than a single burst) then you can use a Constant Throughput Controller to define the actual rate of requests you want JMeter to run. You can configure each thread to run at a rate of 60 requests per minute and this will give you one hit every 20ms (based on 50 threads with response times always less than 1 second). You can also tell JMeter to just make sure your load is 1/20ms no matter how many threads you use and it will dynamically adjust. This option is perhaps more useful in the context of load testing.
Note. When using a CTT controller, you would probably want to put the login request either in a Once Only COntroller or in a setup thread group.

Resources