Loop count and Ramp Up period in JMeter - jmeter

I have created a set and just confused with the Loop Count and Ramp Up period.
I have a test set with the following parameters.
Threads = 30
Ramp Up Period = 30
Loop Count = 100
As per the page on
quora.
I suppose:
a) If Loop count is Zero, then each of the 30 threads will be starting every second. As per the shared the web page, I guess 30/30 * 100 ie 100 threads/requests will be hitting the server every second. Please correct me if I am wrong.
b) As per the above parameters, there will be a total of 30 * 100 threads/requests. Does this mean all the 3000 threads/requests will be sent within 30 seconds [ Ramp Up period ]

Assuming you have 30 users and 30 seconds ramp-up
JMeter will start each virtual user each second
Each virtual user will start executing samplers upside down (or according to the logic controllers, if any) as fast as it can (if you don't use timers) so the delivered load can be either more or less than 30 requests/second, it depends on how fast JMeter is executing requests and on your application response time as JMeter will wait for response from previous sampler before starting new one
When virtual user finishes executing all the samplers defined in test plan it will start over and do point 2 for 99 more iterations
When virtual user won't have more samplers to execute and loops to iterate it will shut down
A couple of tips:
You can use Server Hits Per Second listener to see how many requests per second you are actually making given your test plan configuration
You can control the number of requests per second via Constant Throughput Timer
Consider upgrading to JMeter 3.2 as newer JMeter versions normally contain new features, performance improvements and bug fixes

according to jmeter manual ramp up is:
How long JMeter should take to get all the threads started.
If there are 10 threads and a ramp-up time of 100 seconds, then each
thread will begin 10 seconds after the previous thread started, for a
total time of 100 seconds to get the test fully up to speed.
So if your goal is to reach 3000 request within 30 seconds the above wont do, it might take more than that depending on how much it takes to finish the requests you are sending.
If you are looking for Throughput you can add an aggregate report listener which calculates the throughput for you and depending on the results you can configure your thread properties to reach your goal.
Reference :
Jmeter user manual

Related

How to provide jmeter thread group , Ramp up peridod and Loop count?

I'm new to jmeter I have the following scenario. I want the jmeter to hit the given url, I have 13 such url in a csv file.
I want to hit the url at the rate of 2 requests per second for a given time period of 60 seconds.
In this case how should I specify my thread group, Ramp-up period and Loop count.
I understood the basic like 10 thread with 10 second rampup with a loop count of 1 will run 1 request per second for 10 user. But I'm not sure how to specify when we have 13 such urls.
Atleast any link for the given scenario is appreciated.
I understood the basic like 10 thread with 10 second rampup with a loop count of 1 will run 1 request per second for 10 user
not necessarily, JMeter waits for response from the previous Sampler prior to executing the next one, the configuration means that JMeter will start 1 user each second, it doesn't guarantee 1 request per second.
The easiest way of achieving X requests per second throughput is using Throughput Shaping Timer
Make sure to supply the sufficient number of Threads, i.e. if your application response time is 1000ms - 2 threads should be enough, if it's 2000 ms - you will need at least 2 threads, etc.
There is a special thread group: Concurrency Thread Group which can be connected to the Throughput Shaping Timer via Feedback Function so it will automatically kick off extra virtual users if the current amount will not be enough in order to conduct the required load.

Elapsed time of test in jmeter is not accurate

I am curious why the elapsed time of the current running test in JMeter is not accurate?
I set my thread group to the following specs:
Number of threads - 2;
Ramp-up period - 1;
Loop count - 60
I suppose that means that every second 2 users will perform some actions and the step will be repeated 60 times. Which means it will take 60 seconds to complete the test.
But the elapsed time of the current running test shows 25 seconds. Why it's less than 60 seconds? How can it be that my test is completed so fast?
JMeter acts as follows:
Each thread (virtual user) starts executing Samplers upside down (or according to the logic controllers) as fast as it can
When there are no more Samplers to execute (or loops to iterate) the Thread is being shut down
Your configuration means that 2 users will execute samplers 60 times, the elapsed time depends on:
how fast JMeter can send the requests
how fast your application can respond
If you're looking for a configuration where 2 threads are executing samplers for 60 seconds - amend your Thread Group setup as follows:
If you have troubles in setting up the workload model it might be easier to use a Custom Thread Group for example Ultimate Thread Group which provides extreme flexibility when it comes to ramp-up, ramp-down, time to hold the load definition, etc.
These "custom thread groups" can be installed using JMeter Plugins Manager
The requests inside your test will be executed 60 times using 2 concurrent users
For example if you have 1 request which takes 1 second it will take around 30 seconds:
Total 60 requests * 1 seconds (time per request) / 2 (concurrent) users = 30 seconds

How can I do performance testing on application for 20,000 user-request per second?

I want to put the load of 20000 user requests on my server to test can it handle this number of requests in a second.
I have put the Number of threads(user) - 20000
Ramp-up period (seconds) - 1
Loop count - 1
Output - It is showing 20 seconds Avg time after completing the script.
Interpreting the output:
It is stating that the average server response time is 20 sec.
To check whether your server can handle 20000 users per sec,
run the test plan from non-GUI mode (Generating HTML dashboard report). Because 20000 is a huge number.
Go get the best of the non-GUI mode add the JMeter plugin manager. Add the required reports needed by you.
If I am not wrong what you are trying to achieve is a throughput of 20000 per sec. The same can be found using transactions per sec graph from the HTML dashboard report generated in non-GUI mode.
This plugin might help your use case: Throughput Shaping Timer
To achieve the desired 20000 users per sec you need to experiment with ramp-up and loop counts based on the output. The end goal should be that your transactions per sec graph should show 20000 or more at one point in time and at the same time the error should be zero then your server is able to handle 20000 users per sec. But average server response time is also an important metric to watch out for. Because no user wants a slow response from the server.
You can also consider the Concurrency thread group. This thread group is specifically designed to generate the desired number of concurrent users.
If you tried to do a Spike Test, like access application with 20 000 users for 1 second - your configuration is fine and and application failed the test so you can raise an issue.
However I'm under impression that your test is kind of short and doesn't tell the full story
20 000 users will produce 20 000 requests per second only if your application response time is 1 second sharp. If your application response time is 0.5 seconds - the load will be 40 000 requests per second, if response time is 2 seconds - the load will be 10 000 requests per second, if response time is 20 seconds - the load will be 1000 requests per second, etc. See What is the Relationship Between Users and Hits Per Second? article for more details if needed.
Normally you should increase the load gradually, this way you will have possibility to correlate increasing load with other metrics (response time, throughput, number of errors, etc) so I would recommend going for ramp-up -> plateau -> ramp-down setting and check the number of requests per second during this "plateau" phase
20000 virtual users is quite a number so make sure to follow JMeter Best Practices and it might be the case you will have to go for Distributed Testing

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 report interpreting from loadosophia, Regarding Max virtual users in summary report

I've recently started working in Jmeter and I have run a test with 40 virtual users. I've also used loadosophia plugin that uploads results to loadosophia. But I've few doubts about numbers I've got in the summary report in loadosophia.
I've run with 40 virtual users with 3 seconds as ramp up period but in loadosophia report it shows Max virtual users=17 and Average virtual users = 6.5 but Transaction count is 40 which actually should be virtual users. Does this indicate there were maximum of 17 virtual users were concurrent ?
Test run duration it shows 3 seconds, but I can see Maximum response time is 5078 milliseconds which is(5.7 seconds) how can it be test can be completed in 3 seconds while it shows some requests took more than 5 seconds to send response? (I am assuming it is not considering ramp up period which I gave 3 seconds, Am I right?)
Thanks in advance.
Currently your scenario looks as:
Start with 1 user (which will immediately start test actions)
Each second add 13 users (each of them will start test actions as soon as the thread is started)
When thread finished it's job it exits.
So there is no way to say exactly what will be the load at the "peak" where all threads which are active at the moment are hitting the application under test.
Not too sure regarding loadosophia, but if you expect 40 concurrent virtual users the only way to reach this load is providing enough loops and adding a Constant Throughput Timer to orchestrate the load and limit (or ramp-up) it to the value, you set in timer.
Another option is using a Synchronizing Timer which allows to "release" threads when specified amount is reached.

Resources