I need to simulate the following:
10 Throughput controller will run only once per player, Total executions, and is executing HTTP request every 5 minutes
1 Throughput controller will run 80 runs,Total executions
2 Throughput controller will run 20 runs,Total executions
How is to manage this.
I have tried with Random order controller
10X throughput controller Total execution 1 loop every 5 minutes
throughput controller Total execution 80
throughput controller Total execution 20
and i did not get result as i want.
Minimal running threads is 12. Each tread for one controller.
Please does any one have idea how to solve this issue?
Related
My Jmeter script have 2 requests Login and Logout with response time around 13-15 sec together (Login is 12-14 sec and Logout is 0.5sec). I need to run these 2 requests one after other to reach N transactions(for each request exactly) in one hour.So together 2N transactions/hour. How can I achieve this.
The most straightforward approach is just to increase number of threads in the Thread Group. If 1 user can execute both requests in 15 seconds it means that he can execute 4 requests per minute or 240 requests per hour.
However given your response times are fluctuating between 13 and 15 you might want to reduce JMeter's throughput slightly using i.e. Constant Throughput Timer or Precise Throughput Timer
In my test plan I want to send N requests per second (RPS), where:
20% from N I send to localhost:8888/api/journal (example address)
80% to localhost:8888/api/simulation
I use Throughput Controller to implement percentage and Constant Throughput Timer to send N RPS.
When my requests in single Thread Group - it works well. Test plan screen below:
But if I place my requests in separate Thread Groups - Throughput Controller doesn't work. Like this:
Throughput Controller config: Based on is Percent Execution and Throughput is 20.0.
Constant Throughput Timer config: Target Throughput is 600.0 and Calculate Throughput based on is all active threads.
2 similar Thread Groups: 4 threads, 1 rampup, infinity loop count, 5 seconds duration.
At first screen I get ~10 RPS and 80/20 percentage, at second the same ~10 RPS but 50/50
What's wrong with second configuration? Thanks.
jmx-file link - you can copy it (changed to the second test plan)
Summary of discussion in comments section.
This behavior seems unexpected and it's worth opening a bug with https://bz.apache.org/bugzilla/.
There are 2 workarounds:
Add additional request under Throughput Controller;
Set Loop Count to a finite number of iterations.
I am trying to send 1100 requests per minute to my API endpoint for a period of 5 minutes, so in total, I will make 5500 requests to the endpoint.
Based on the above requirement, Here is how I have set up my Jmeter:
It seems like I have misconfigured Jmeter, because in the end I can see Jmeter has made 8401 requests to the API instead of 5500.
What have I missed in the configuration?
Does the "Infinite" check-box need to be checked or unchecked?
The number of requests you're expecting (which is 5500) for this test plan is wrong.
As per your expectation, I think, you are making confusion between the Threads and Requests.
Ramp up is the time in which all the users arrive on your tested application server.
Requests are simulated by samplers but threads are the simulation of users.
According to your test plan:
- Total Number of Threads: 1100 vitual users
- Ramp-up time: 60 (1 min)
- Loop count: Infinite
- Test duration: 300 sec (5 min)
- No of requests/sampler in Test Plan: Unknown, assuming it 1
JMeter Execution:
JMeter will kick off those 1100 virtual users in 60 seconds according to the ramp-up time. So, (1100/60)~ 18 users will be active in every second for the first minute of your test. Each thread/user will execute the requests or samplers you have defined in your test plan hierarchy. As you have defined the loop count to infinite, each thread will execute the requests repeatedly until the test finishes. After 60 seconds, all of your 1100 users will be actively hitting those samplers/requests for the remaining 4 mins.
So the total number of requests you will be able to make through JMeter depends on your application response time.
If the avg response time of your requests is 1 second (assuming you have only 1 requests in your test plan), then you will be able to hit total 264000 (264000/240 = 1100 requests per second) for the last 4 mins (when all of your 1100 users are active) of your tests. You can also verify this accordingly by using Active Threads Over Time and Hits Per Second listeners.
So, Please double check the avg response time of your application or the requests/samplers you are using in your test plan.
If you want to control JMeter's throughput to 1100 per minute, you can use a Constant Throughput Timer at your test plan level and use target throughput value as 1100.
Do not forget to add the count of ramp-down time in your test duration. Yes, when you ramp up i.e. in the first minute generally you get more requests as threads are starting. In your case, your test duration should be 7 mins (60 seconds for the ramp-up 1100 users + 300 seconds for 5500 requests + 60 seconds for the ramp down for 1100 users).
You can also check this thread for more : How should I calculate Ramp-up time in Jmeter.
Please note- The total number of requests is related to throughput, Whereas the number of active threads performing the same activity is related to concurrency.
I am trying to send 1100 requests per minutes to my API endpoint for a period of 5 minutes, so in total I will make 5500 requests to the endpoint.
I don't know how you came with this 5500 number but this is not very correct.
Your setup means that:
JMeter will add 18 virtual users each second for 60 seconds
After 60 seconds pass JMeter will run 1100 users for another 4 minutes
The total number of requests JMeter will be able to make will mostly depend on application response time.
If you want to limit JMeter's throughput to 1100 requests per minute consider using Constant Throughput Timer or Precise Throughput Timer
If you don't want to limit JMeter's throughput but want 5500 executions either:
Set "Loop Count" to 5 (but in that case you might fail to get 1100 concurrent users)
Or use Throughput Controller in Total Executions mode so JMeter would stop after executing 5500 requests
I have a problem with JMeter that I can't figure out.
I have 3 requests in one thread group. Each request needs to be executed 5000 times in 5 minutes which means I need to execute 15 000 requests in 5 minutes altogether.
The thread group is set up like this:
Number of threads (users): 50
Ramp-up period: 1
Loop count: forever
Duration (seconds): 300
Each request has a Constant throughput Timer:
Target throughput: 1000.0
Calculate Throughput based on: all active threads in current thread group
And the results after the test run is complete are around 2000-3000 requests and that is too low. I can't figure out which settings are wrong.
Tests are ran in non-GUI mode on an Azure virtual machine with a Intel Xeon E5-2673 #2.3 GHz with 16 cores and 32gb of RAM and the server is more than capable of executing more requests since the response time is about 1 second so hardware should not pose a problem. JMeter heap memory is set to 12 GB.
Any help is appreciated!
I have 3 requests in one thread group. Each request needs to be executed 5000 times in 5 minutes which means I need to execute 15 000 requests in 5 minutes altogether.
That means you have to execute thread group for 5000 times in 5 mins => 300 seconds. If you execute thread group that much of time, you will automatically generate 15k requests.
From Documentation:-
Loop Count Number of times to perform the test case. Alternatively, "forever" can be selected causing the test to run until manually stopped.
When you set loop count: forever or any value in loop count for that matter, it means you want next set of users(threads) [which you have defined as 50 now], only when you are done with the first set 50 users request (150 requests as each thread group as 3 requests). Now, this 50 users request may take unexpected time and your next set will be returned only after this 50 users are done.
So to solve the problem at hand, you should have the following configuration for the thread group :
Number of threads (users): 5000
Ramp-up period: 300
Loop count: 1
So this means after every second around 17 Threads would be on-boarded.
To achieve your desired value configure the following
Number of threads (users): 50 / 60
Ramp-up period: 30
Loop count: forever
Duration (seconds): 300
It is good practice to give some ramp up time.
Also Constant Throughput Timer works on minute level and your desired throughput should be
Target throughput (in minutes): 3000.0
Calculate Throughput based on: all active threads in current thread group
So now, in 1 minute, JMeter will try to send 3000 requests and in 5 minutes, request count will be more or less around 15000.
Here are a few recommendations to tackle tests like this:
Use Ultimate Thread Group to create the threads required to run your tests.
Increase the total number of threads to 150-200 - Depending on the response time of your requests, 50 threads may be busy and you are not able to scale beyond certain throughput.
Add throughput shaping timer under Ultimate thread group, to maintain the throughput of 50RPS for 5 minutes(300 Seconds).
The combination of Ultimate Thread Group and Throughput Shaping Timer will allow you to have granular control over your requests and RPS you want to achieve.
Set Ulitmate Thread Group and Throughput Shaping Timer as below.
Put all your requests below Throughput Shaping Timer and you should be able to achieve the expected load.
Try to use Stepping thread group. It will allow you to send 50 user per second upto 300 second.
Download jar from below link.
https://jmeter-plugins.org/wiki/SteppingThreadGroup/
I want to get fluctuation in TPS using JMeter like given below
1 TPS to 10 TPS -- 60 minutes
2 TPS to 4 TPS -- next 60 minutes
10 TPS to 15 TPS -- for next 60 Minutes
1 TPS to 3 TPS -- for next 60 minutes
How to achieve such various TPS with respect to time.
I am using jmeter 4.0
My Requests are like
Login Application
Create Order
Active Order
Disconnect order
Cancel Order
Users: 300
Ramp Up: 300 seconds
Duration 4 Hours (14400 seconds)
Application can handle upto 45 TPS (Already Tested this)
Here we want to Check Semaphore and Server Res. memory are increasing/decreasing as per TPS increase/Decrease. (This is my target of this test)
For Your case you can use below link to understand the tree to create and use of throughput controller-
Purpose of Throughput Controller?
And I would suggest you to use multiple Once only controller and apply throughput controller with each of them and define the throughput values you want to achieve one by one, For Example
Thread Group
Runtime Controller (60 minutes)
once only controller
HTTP Sampler
Throughput controller (1 TPS to 10 TPS)
Run-time Controller (next 60 minutes)
Once Only Controller
HTTP Sampler
Throughput Controller (2 TPS to 4 TPS)
You can see the progress in listeners( In graphical form).
Hope It works :)
You should work with Ultimate Thread Group
In your case 3 lines with Hold Load For 3600 seconds
Each line will have different Initial delay, first is 0, second is 3600 (hour) and third is 7200 (2 hours)