Jmeter run stress test with formula - testing

How can I run a Jmeter stress test with formula like 5 request per second on start and on each next second add plus 20 request per second?
For example, that I mean:
1s 5rps,
2s 25rps,
3s 45rps,
...

request per second is an outcome of what you have configured and server deployment etc. You really can't configure it. so, better focus on the number of threads (more the threads more the request per second), ramp-up, loop count, server resources, server configuration which effects requests per second.
In case you are looking for increasing load at regular intervals, try the JMeter plugins Stepping Thread Group or Ultimate Thread Group, so you can launch the threads in the step pattern that you want.

I would recommend using one of the following:
Throughput Shaping Timer - see Special Property Processing
Concurrency Thread Group
Both allow to define ramp-up basing on the desired concurrency, both are available via JMeter Plugins project.
The fastest and the easiest way to install JMeter plugins and keep them updated is using JMeter Plugins Manager

Related

Transaction per second Jmeter

hi i am new to Jmeter and using it for API testing. Had a query on how to calculate transaction per second in Jmeter
for example if i have 14 http transaction in one thread group how to calculate it and ensure it generates 10 transactions per second for the thread group which has 14 http api calls.
where exactly we get to see the TPS in Jmeter is it throughput that we see in summary or aggregrate report which is TPS for each transaction?
You can:
either check "Throughput" column value in the Aggregate Report listener
or generate HTML Reporting Dashboard which provides "Transactions per Second" chart:
or use Transactions per Second listener plugin (can be installed using JMeter Plugins Manager)
If you need to limit JMeter's throughput to 10 requests per second - consider adding Constant Throughput Timer to your test plan and configure it according to your requirements

Jmeter : how to get large number of rps in jmeter

I'm testing a web app using jmeter for load test and I getting a hard time on how can I set properly how many threads, ramp-up and loops will I use in order to get a large number of rps. Anyway, I want to check if my server can keep up to 500rps. Does anyone here can help me how can I set it properly. Thanks.
The number of requests per unit of time is called Throughput and mainly depends on two factors:
Number of active threads
Your application response time
The first one is obvious - more threads -> more requests per second. However JMeter will wait for response from the previous thread before starting the next request so application response time matters as well.
So the recommendations are:
Set number of threads in the Thread Group to the number of anticipated users of your system.
Set ramp-up period accordingly to the number of threads so the load will increase (and decrease) gradually, this way you will be able to correlate increasing/decreasing load with the changing response time and throughput
Instead of loops it might be a better idea to set desired test duration using Scheduler section of the Thread Group.
Run your test and observe the actual throughput using i.e. Server Hits Per Second listener or Transactions per second chart of the HTML Reporting Dashboard. If it matches your expectations - you are done, if not - you will need to increase the number of virtual users.
You can use ConcurrencyThreadGroup plugin , Specifically see how to Produce Desired RPS:
Threads pool size can be calculated like RPS * <max response time> / 1000. The more rate desired the more threads you will need. The more response time service have the more threads you will need.
For example, if your service response time may be 2.5sec and target
rps is 1230, you have to have 1230 * 2500 / 1000 = 3075 threads.

Apache JMeter - find out how many requests are possible

I am searching for a solution to test, how many requests my webserver could handle, until causing a load-time of more than 5s. Is there a possibility to manage this with Apache jMeter?
Server: SLES OS running a WordPress blog(Apache Webserver, MySQL)
Best regards
Andy
It is. Example action plan:
Record anticipated test scenario using HTTP(S) Test Script Recorder or JMeter Chrome Extension
Perform correlation (handle dynamic values) and parametrization (if required)
Add virtual users. It is recommended to configure users to arrive gradually, like starting with 1 and adding 1 each second. You can use Ultimate Thread Group which provides an easy visual way of defining ramp-up and ramp-down.
Add Duration Assertion with the value of 5000 ms so it will fail the request if it takes > 5 seconds
Use Active Threads Over Time and Response Times Over Time listeners combination to determine what maximum amount of users which can be served providing response time < 5 seconds.

jmeter setup thread group

My JMeter load test includes a setUp thread group that makes 190 http requests to my test environment prior to running my test thread groups. This results in a spike of requests at the beginning of the test that appear to be included in the results of the load test. The results for average throughput are higher than they would be without the setUp thread group traffic. Is there any way to exclude the setUp thread group from the test results?
There are several options:
Synthesis Report plugin allows to set telemetry start and end offset values so you will be able to filter out unneeded data
You can add Listener of your choice to 2nd Thread Group - it will record only samplers in its scope.
You can run your JMeter tests via Taurus tool - the report will come in fancy web interface where you can zoom to the report part you need.
Which Listener/Reporter do you use to check your results?
Some reporters can show you not only average throughput but also split it by requests or threads. So, you can rename your SetUp requests using one label and just exclude these values from your total. Don't know how to do it using built-in methods but you can easily export your result table data as a file or just operate it using scripting.
If you just want to prevent spike on your graph, then use Constant Throughput Timer for your SetUp thread. It will slow down your request sending (by increasing delays between them) to meet defined throughput.
If your recording catches extra "http requests" which are not required , Click on "Add Suggested Excludes" or else can exclude by defining , so that will not come in your Result Analysis.

How to analyse JMeter result?

I am new in JMeter tool. Can anyone help me for the best way to analyse JMeter reports?
Simply list of related links you can possibly find useful:
Native graphs:
JMeter Report Dashboard
Real-time plotting with 3rd party real-time series database like influxdb
Free Open source solutions for automated graphs:
JMeter Plugins - look onto custom graphs in this package; some of them provide better results reporting out-of-box than jmeter's original ones;
JMeter Result Analysis Plugin
JWeter tool for logs analyzing & visualization
Recipes with custom development:
JMeter Wiki: Suggestions and Recipes for Log Analysis
Better JMeter Graphs
Plotting your load test with JMeter
3rd party solutions:
Blazemeter Sense
Tricentis flood.io
RedLine13
JAnalyser: browser based results analysis tool
UPD.
Please find, use and feel free to extend this Awesome JMeter collection continued as github repo.
There are 3 test that are must when doing performance testing, there should always be a baseline, a peak test and a stress test. These test relate to each other because of the little's law. The long-term average number of customers in a stable system L is equal to the long-term average effective arrival rate, λ, multiplied by the time a customer spends in the system, W; or expressed algebraically: L = λW..
Jmeter already provides means to check this values, the standar plugin provides plots for reponse times, hits as well as throughput. There is no way to directly tell how many users were active on the system, it is not the same concurrent users than active users. The plugins are enough to produce the reports, but they do not allow to control much of the presentation, i will use some plots produced using python(they add labels, and have 2 y axis).
Baseline Test:
This case is an special case of the law, in this case the active users is constant and it is one, then:
L = λW
1 = λW
1/W = λ
If the application run the same piece of code, the response time will stabilize over time, then the arrival rate will be constant over time too.
There is a service that does nothing else than wait some time to go by:
2 Seconds service: The arrival rate was 1/2TPS.
3 Seconds service: The arrival rate was 1/3TPS.
Peak Test:
This is nother special case, in this case load incrase until it surpass the system thoughput, because the load is greater than throughput the response times do increase. During the test the threads number should increase fast enough to recover from long response times.
This time instead of running the peak, i will stress the system with more load than it is able to handle during the whole test. To control the service throughput:
The active transactions are those that had leave the injector but haven't get a reponse, those are transactions that are queue in some place whitin the system.
λ(t ) = c, T(t) = k; both the load as well as the thoughput are constant over time.
L = Σλ - ΣT = ct - kt; The active transactions is the difference in between the cumulative load and the cumulative thoughput.
L = (c - k)t
λW= (c - k)t
​cW(t) = (c - k)t
W(t) = t(c - k)/c
Because response times do grow as active users do, we will need the injector to create new threads as fast as new conections are requiered, most of the pool threads are going to be busy.
2TPS arrival rate, 1 TPS throughput:
The response times function is 1/2t
The injector stress the system during 300 seconds.
The test last 600 seconds.
4TPS arrival rate, 1 TPS throughput:
The response times function is 3/4t
The injector stress the system during 300 seconds.
The test last 1200 seconds.
6TPS arrival rate, 5 TPS throughput:
The response times function is 1/6t
The injector stress the system during 300 seconds.
The test last 360 seconds.
In simple word if you want to analyze your JMeter report...
Start with server CPU and RAM utilization. When you run a performance test on your server, see how much CPU and RAM is utilized by the current test.
Issue the following command on hosted site server; it will create a log file of CPU usage.
while true; do
( echo "%CPU %MEM ARGS $(date)" &&
ps -e -o pcpu,pmem,args --sort=pcpu | cut -d" " -f1-5 |
tail ) >> ps.log
sleep 1
done
See overall response time, it should not exceed your expected response time criteria.
See below image. My expectation is response time should not go above 525 microseconds, but some requests are crossing it. Find these kind of requests which are taking time.
Overall Response Times:
See Transaction per second, how many transaction are made per second and is there any drop in the test time frame?
Inspect the summary report, Average time, and max time to see which requests are taking the most time.
Currently many listeners are available in JMeter as add-ons or built in, but these are the major things to look at in order to be able to guess properly what's going on. And you can use other reports like that.
Follow my blog for more details https://softwaretesterfriend.blogspot.in/
Starting with version 3.0, JMeter includes a dynamic HTML report that can be generated either at the end of a load test or from a result file.
See generating-dashboard
In order to analyze your JMeter results, you can use
Listeners in JMeter
Blazemeter Sense
Reports Dashboard
In addition to all the other answers: there is a nice site of BlazeMeter where you can upload your test result file (.jtl) and it will generate all kinds of (interactive) reports for it. It even analyzes it for you and points out when the first error occurs, what the saturation point is, etc. https://sense.blazemeter.com/gui/
If you have a graphite/grafana infrastructure I can recommend to add the Backend Listener to the project. It will send real-time metrics to the graphite server and you can monitor the test in graphite (or grafana).
If you are new JMeter understanding JMeter listeners and other components will help you . check the tutorial
- https://www.youtube.com/watch?v=FfDVIklNjgw