How to calculate load profile and choose thread group in Jmeter - performance

I have a task to create profile load on the app. Profile load: Vuser 7 , 50 requests per hour. Create load dinamics: ramp-up 2 min , loading 20 min , end of loading 2 min. How to calculate this and choose thread group(and timer)?

Your test looks rather weird as 50 requests/hour is less than 1 request per minute and it is unclear why do you need 7 users and ramp-up/ramp-down periods.
No matter.
The easiest way of implementing your "load pattern" is using Ultimate Thread Group. It is not a part of normal JMeter distribution, you need to install it using JMeter Plugins Manager. The relevant configuration would be something like:
The easiest way of slowing down the requests to 50 request per hour is using Precise Throughput Timer, the appropriate configuration for your scenario would be:
You can check the actual throughput and the number of executed samplers using i.e. Aggregate Report listener. Given your test scenario lasts 24 minutes you should have around 20 sample results.

Related

Gatling performance Testing: TPS is much lower than Jmeter's TPS

I am currently using Jmeter for API Performance Testing, but recently I started to look into Gatling as a potential replacement of Jmeter. Below is the PoC I'm doing for Gatling but I notice the performance result is very different.
Setup:
where we hit a https endpoint with a concurrent user of 10 for 60 seconds.
Results
Jmeter: 10 threads (no ramp up), 60 seconds
Result: 150 TPS
Gatling: 10 concurrent users, also 60 seconds
Result: 27 TPS(cnt/s?)
Question:
first I want to confirm the terminology of Gatling; in Gatling result chart, I see a column named "mean cnt/s" I hovered over it and it says "count of event per second", I imagine that's the same thing as Jmeter's TPS?
Jmeter:
summary + 2386 in 00:00:16 = 153.1/s Avg
Gatling:
Mean cnt/s: 26.652
if above assumption is correct, can someone share some insight on why Gatling's number is much lower than Jmeter's?
Thank You!
Gatling: 10 concurrent users, also 60 seconds
Do you understand what this does?
This is going to spawn a new user every time an existing one finishes, and hence create new connections. Assuming it takes 100ms for a virtual user to complete the scenario, you're going to spawn 101060 = 6,000 virtual users and as many connections.
Is that really what you want and is it the same thing as you do with JMeter?
If you actually want the same 10 users to loop for 60 seconds, you have to inject atOnceUsers(10) and add a during(60) loop in your scenario.
https://gatling.io/docs/gatling/reference/current/core/injection/#open-model
https://gatling.io/docs/gatling/reference/current/core/scenario/#loop-statements
Many things can cause deviations.
I assume you use the same setup for both in terms of load generator/target insance. You can start with fixed number of requests first.
Use loops in Jmeter and repeat in Gatling.
Sending for example 60 x 10 = 600 requests in total.
Gatling will be able to generate much higher load than Jmeter if properly used.

JMeter - Keep current Threats Active

I want to ask a question regarding of how to perform my load test scenarios. I have multiple threat groups that each one executes a scenario (get,post,put requests) with a different number of threats on each scenario. Each scenario takes an X (unknown) of time to be execute always depending of how many requests it has. What i want is to run them all together and hold the load (keep threats active) for a specific amount of time.
Let me give an example:
Threat Group 1 - v. users 75
Threat Group 2 - v. users 50
Threat Group 3 - v. users 30
I want to execute all threat groups together and keep the load for 30 mins. The problem that i have its lets say that threat group 1 it takes only 2 mins to be executed, threat group 2 takes only 3 minutes and threat group 3 takes only 1 minute. I can not have the Infinite option tick as i have only specific number of data that i can use. For the first scenario i have 75 users (data) that if they execute the scenario once they can not execute it again thus i need 75 more (data) which i dont have.
Is there any way to do that? Is it feasible to keep threats alive in each threat group for specific amount of time? Or something that will execute the requests in a specific amount of time that will cover the whole duration? (30 mins)
Setting up the parameters in threat groups like the picture below when each scenario ends it shuts down its threats so i will never have lets say 30 v users to run in parallel for a specific amount of time.
The below graph shows that Scenario 1 (pink) ended its threats faster than Scenario 2 (ref). Here the settings are the following:
Threats in each scenario 5
Ramp-up 10 secs
Duration 90 secs
If I understand correctly you are constrainded by data and you have one data point for one loop per user . So I will try to manipulate rampup and set it to 1800 and loop = 1 for every thread group. Uncheck "specify thread lifetime". Jmeter will run new thread e.g for TG_1 every 1800/75 second. Whole test will run 1800sec + time for loop for last thread. If have to tink if this load profile is appropriate for your application.
As I can understand your query, you have data for say 75 users, the data cannot be repeated. And you need to hold the load for 30 minutes.
In simple words, I can say that you cannot hold the load for this much time unless you have more data, or you can repeat data.
If 75 users are taking only 1 minute or even 5 minutes, this means that you have not added human reaction time. To add that, you can simply use timers. Which will delay the execution of sampler.
If your first thread group executes 75 requests in 2 minutes and you want it to be executed in 30 minutes the only way of achieving this is making JMeter 15x times slower. JMeter provides a variety of Timers and each of them allows introducing delays between requests mainly to simulate real user "think time"
75 requests in 2 minutes is approx 37 requests per minute and if you need to make it 15x times slower you need to execute ~2.4 requests per minute.
So you can add i.e. Constant Throughput Timer to your first thread group and configure it like:
this way you will get 72 requests in 30 minutes.
Similarly you can slow down 2 remaining thread groups
Try with Ultimate Thread group plugin
Use different ultimate thread group and change the threads as per your requirement but keep other parameters same as shown below.
So, your threads will vary but other condition probably will remain same. Like Initial delay, startup time, holdloadfor sec and shutdown.
You can use plugin manager to download the jpgc#stardard set for all the plugin provided by jpgc. Then, you will get option to add jpgc ultimate thread group from Threads(Users) or from the same place we add normal/standard threadgroup.

How to get number of throughputs per second as 500 in jmeter

Good day.
I am new to J-Meter and here is the requirement I need to verify through J-meter TP.
I am using Jmeter: 5.1 version.
I need to get the results for 500 throughput per seconds.
Number of target users : 100
Time to run the test 1 hr.
Start the test with 5 users and increase the load by setting every 3 seconds 5 more users up to add till we reach reaching 100 users.
Once we reach 100 users >> Keep the load for 10 seconds hold and decrease the load by every 3 seconds to reduce 5 number of usrs.
Please help me on what are the parameters I have to set in J-Meter test plan.
Thanks.
Siva
The easiest way of controlling the number of requests per second (throughput) in JMeter test is using Constant Throughput Timer
Add Constant Throughput Timer to your Test plan and configure it to send 30000 requests per minute (500 requests per second)
Make sure that all the Samplers are in the Constant Throughput Timer's scope and you have all active threads selected in the dropdown
You can only achieve 500 requests per second with 100 users if your application response time is 200 ms or less, if it's more - you will have to increase the number of threads accordingly.
And last but not the least, according to JMeter Best Practices you should always be using the latest version of JMeter (5.3 as of now) so consider upgrading at next available opportunity
Below are some suggestions that might help you to start with:
You might need to calculate the pacing required to achieve target total transactions:
Pacing = 3600(Test duration time in seconds) * ( target no.of user) / (no.of total transactions to achieve).
To setup ramp up, ramp down more effectively you will need one of the plugin available in Jmeter Plugins Manager (Plugin name : Stepping Thread Group by blazemeter) which comes with a preview.
How to setup Plugins manager (https://jmeter-plugins.org/wiki/PluginsManager/)

JMeter: Seeing a sawtooth graph instead of a smooth one (constant load)

I am using JMeter to load test my application. This is how my thread group configuration looks like:
I am expecting to hit the application with 200 threads (requests) and keep up that load for 30 minutes.
I am using 5 throughput controllers which use percentage executions and each HTTP request (under each controller) uses a specific percentage (totals to a 100).
I use the non-GUI mode to start the test and output the results to a csv. When I plot this though (using Kibana), I see a graph which looks like this
I see a peak and drop every 5 minutes. I am expecting to see uniform load across the 30 minutes I am running my test. Any idea why this is happening ? Is there something wrong with my configuration ?
Looking into "Loop Count" of 1 in your Thread Group I don't think your tests lasts 30 minutes, my expectation is that it takes seconds (or whatever time is needed to execute all your Samplers with 200 threads)
So tick Forever box or set "Loop Count" to -1 and re-run your test.
More information: JMeter Test Results: Why the Actual Users Number is Lower than Expected

jmeter calculate page load time, the which type of thread to be used to observe the maximum load in which server is stable

I am new to jmeter and scripted for login authentication. Project requirement is to see the load for 10K concurrent users.
Script is working fine but to enhance I need suggestions on how to do the following thigs:
How can I see that how much time/average time the server takes to load a page.
which thread grp (studied Ultimate thread group but it is not very clear to me), should be used to see the maximum load the server can sustain in a particular time, for that rampup time need to be adjusted (correct me if I am wrong).
Please tell how to adjust the rampup time with respect to users/waiting time etc., in short how to do incremental/proportional observation to see the server performance(there is no Gateway error etc)
If you're looking for your server capacity boundaries I would rather stick to "requests per second" rather than to "concurrent users" as users may work with different applications in a different way.
For instance, if it is image gallery - the majority of users will be browsing images and do this rather frequently, for instance request next image i.e. each 2 seconds. Given image load time 1 second it will be an image per 3 seconds - 20 images per minute. In this case 10000 users will create the load of 3333 requests per second.
If your site is articles collection, users will need some more time to read an article, i.e. 2 minutes. In that case 10000 users will create 83 requests per second load.
JMeter provides Constant Throughput Timer out of the box, you can set desired target throughput in requests per minute using it. And once you're already aware of JMeter Plugins project, it offers Throughput Shaping Timer - more advanced test element with extended functionality.
If you go "throughput" way, no matter which Thread Group you choose as the load will be orchestrated by aforementioned timers.
See What is the Relationship Between Users and Hits Per Second? article for more detailed explanation.
Once you design your test scenario run it in non-GUI mode (as JMeter's GUI is very resource intensive) as:
jmeter -n -t /path/to/your/testplan.jmx -l /path/to/resultsfile.jtl.
When the test finishes, open JMeter GUI, add Aggregate Report listener and inspect min/max/average response times per requests.

Resources