configure jmeter setting based on request per secon - jmeter

i am new to Load testing and would like configure my jmeter setting for the following requirement below. My understanding is Theard are different from request per second. If so what will be values in thread group for the below requirement.
"Initial load 20 request/second, increase load with 100 request/second for each minute.
Perform load test until we see an increase in latency "

You should put something very high into Thread Group and use one of the following approaches to define your load pattern:
Constant Throughput Timer - it comes bundled with JMeter
Throughput Shaping Timer or Concurrency Thread Group- available via JMeter Plugins project
In order to automatically stop the test when latency exceeds threshold you can use AutoStop Listener, again it comes with JMeter Plugins.
In general latency is networking related metric so even if your application is slow as a snail you can have low or even zero latency so I would recommend considering response time and/or transactions per second metrics as well.

Related

How to create Burst test in Jmeter without using parallel threads?

I have a requirement to create simple Burst test in Jmeter:
10 requests-> 20 requests -> 30 requests
On single worker mode.
Throughput 20ms
Anticipated response time : <=200ms
How can we achieve this with Jmeter without using parallel threads?
I am looking for a simple solution.
Thanks a lot
Add plugin
Ultimate Thread Group to JMeter
Add Ultimate Thread Group component with settings of 3 rows
Set Start Threads Count 10,20 and 30
Use different start times so requests batch will be executed in different times
"Ultimate" means there will be no need in further Thread Group plugins. The features that everyone needed in JMeter and they finally available:
infinite number of schedule record
separate ramp-up time, shutdown time, flight time for each schedule record
and, of course, trustworthy load preview graph
Consider using Throughput Shaping Timer and Concurrency Thread Group combination which provides flexible way of defining load patterns:
They can be connected together using Feedback Function so JMeter will be able to kick off more threads in order to reach the desired throughput (number of requests per second) if current amount is not enough.
Both can be installed using JMeter Plugins Manager:

Validate newly created server support the same load

We are creating a new hosted server for one of our APIs on managed containers (Kubernetes) and we're trying to validate that it can handle at least the same amount of traffic load requests.
We've started with one of the APIs, where we would need to handle at least 140k requests per minute, all endpoints combined.
To verify this, I created a simple JMeter test as follows:
-Test Plan
---Thread Group Endpoint1
-----HTTP Request -> a GET request with query params for /path1
---Thread Group Endpoint2
-----HTTP Request -> a GET request with query params for /path2
For a local test, I used the following setup:
Thread Groups Endpoint1 and Endpoint2 are set to 200 threads (users), ramp-up period of 1s, loop count = forever and duration 60s.
Using a Summary Report listener when running the test gets me a total of ~9300 # Samples.
Using this approach, is it safe to just increase the number of threads (users) for the Thread Groups until I reach the desired 140k requests per minute?
Note: I only used JMeter a little before, so I'm aware that the entire approach may be wrong, therefore any suggestions and steering to the right path are more than welcomed.
Your approach is viable as long as it represents real-life application usage. If it has 2 endpoints with equally/evenly distributed load - your setup is just fine. If there are more endpoints and some of them are used more than the others - consider defining the workload correspondingly either using different Thread Groups or other distribution mechanism such as Throughput Controller
Increasing the number of threads is also fine, however consider increasing the load gradually, to wit increase ramp-up time so your test could have:
Arrivals phase
Time to hold the load
Ramp-down phase
This way you will be able to correlate various metrics like increasing response time, throughput, number of errors, etc. with the increasing load. Also you will be able to state what was the number of threads/requests per second when the system reached saturation point/breaking point and does it recover when the load gets back.
Also make sure you're following JMeter Best Practices as 2300/2500 requests per second is not something JMeter can support out of the box and you will need to do some tuning, at least increase JVM Heap size allocated to JMeter.
You may not be able to achieve the desired 140k requests per minute using a single Jmeter Machine, in that case you'll need Distributed Load Testing approach here.
refer: http://jmeter.apache.org/usermanual/jmeter_distributed_testing_step_by_step.html
Also keeping the ramp-up period of 1 second will lead to spike and unrealistic load in the system which will not give proper result unless you've pre-warmed your server, you should gradually increase the load as per real/estimated traffic pattern.

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.

How to make jmeter reach target throughput or fail trying?

I have a very simple web service and I'm trying to measure its latency metrics under different throughputs -
If the system under test can't handle the target throughput, I want Jmeter to keep the same throughput, even if a lot of requests fail.
I tried implementing this using a large number of threads and a constant throughput timer, but Jmeter tended to simply not reach the target throughput instead of requests failing.
Any recommendations?
Constant Throughput Timer has 2 main limitations:
It is accurate enough on minute level so you need to ensure that your test is running long enough (minute or more). Also its effect is not immediate so during 1st minute of your load test you need to control virtual users arrival rate using Ramp-Up Period setting on Thread Group level
Constant Throughput Timer is only capable of pausing the threads to limit their execution rate to the "target throughput", it will not be able to kick off any extra threads so make sure you define enough virtual users again on Thread Group level
Given Web service == HTTP transport and HTTP being stateful protocol (each JMeter thread (virtual user) will wail for response from the previous HTTP Request sampler prior to starting next one you can speed things up by defining a timeout for your HTTP Requests so they would fail earlier. The best place to put the timeouts is HTTP Request Defaults, this way you will be able to do it in a single shot for all HTTP Request samplers in scope
You may also want to try Throughput Shaping Timer which is a little bit enhanced version of the Constant Throughput Timer.

Webservice testing using Jmeter

I am new to JMeter and I have been tasked to do a POC where I need to load test the webserivce. I learnt the basics like adding the test plan, adding threads, adding SOAP/RPC Requestsampler and I got the response as well. But, I am not sure how to achieve the below scenario using JMeter.
I need 600 users to hit the service per request/second (this should run for 10 minutes) and the 2nd scenario is about 2000 users to hit the service at 5 request/second (again this should run for 10 minutes)
Also, would it be possible for JMeter to handle this many number of threads/users?
Any inputs would be deeply appreciated.
Given you properly configure JMeter it shouldn't be a problem to simulate 2k users, actually you may need more as if your web service response time will exceed 1 second - you won't be able to achieve 2k requests per second.
Configuring JMeter:
Run test in non-GUI mode
Disable all Listeners (if any)
Increase JVM Heap size
See 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure for detailed explanation and instructions
Simulating 600 / 2000 requests per second.
Set "Loop Count" to Forever or -1 in Thread Group
Tick "Scheduler" box and set desired duration (600 seconds)
Add Constant Throughput Timer and specify the desired throughput in requests per minute
It is recommended to use HTTP Request sampler for web services testing, you can set Content-Type and SOAPAction headers using HTTP Header Manager

Resources