My customer give me a traffic figure is 600 request/second and the RX(Mbps) is 30.
Please help me what is the suitable scenario test plan for this issue.
My customer and me is in different countries, so is the network effect to the result?
Many thanks on your pointers.
First of all, 600 requests/second rate isn't something which is recommended to be run from a single node.
You need to consider JMeter Remote Testing which assumes running the test from multiple JMeter instances. Make sure that you're following JMeter Performance and Tuning Tips guidelines while developing your test.
In order to achieve 600 requests/second rate, not more, not less you need to use Constant Throughput Timer
Related
In JMeter(Vr. 5.2.1) i have JSR223 sampler having a custom script to generate a payload to an endpoint. The end point is capable of receiving 100000 transactions per second. However, from jmeter i find that the max samples i can achieve is around 4000 requests per second per thread.
I tried to increase the thread limit to 10 then 100, however the result seems to stay the same i.e., jmeter is able achieve a max of 4k requests per second.
i tried to have two thread groups running in parallel to increase transaction rate, this did not increase the rate beyond the 4k per second, mark, no matter what i do.
Is there any way or method i can use to increase this request rate to 100k per second?
The test plan has one thread group within which a simple controller and one jsr223 sampler withnin it. This is followed by a summary report at test plan level.
I have followed all the best practices highlighted in some of the articles in stackoverflow.
Thank you.
If you would really follow JMeter Best Practices you would be using JMeter 5.5 as the very first one looks like:
16.1 Always use latest version of JMeter
The performance of JMeter is being constantly improved, so users are highly encouraged to use the most up to date version.
Given you applied all JMeter performance and tuning tips and did the same to the JVM and still cannot reach more than 4000 transactions per second you can consider the following options:
Switch from JSR223 Sampler to a Java Request sampler or create your own JMeter Plugin, in this case performance of your code would be higher
And consider switching to distributed mode of JMeter tests execution, if you can reach 4000 requests per second from one machine you will need 25 machines to reach 100000 requests per second.
We have some outside consultants whom are using JMeter to load test our application.
Our application consists of a web site and two mobile apps. Our usual usage pattern is having 20 users and x number of mobile users whom we track in our application. Our pattern is usually steady but we have some times of the year where our load will be heavier. We do not get spikes from no activity to, say, 300 mobile users. It will rise fairly steadily and reliably. We want to make sure our scaling settings will be able to handle the next time when we start adding load.
Our partner has written scripts that go from 0 load (zero CPU %, zero bandwith use, zero SQL etc) to a massive load that then ends in about 15 minutes. THIS IS NOT OUR USAGE PATTERN. Our system cannot scale out without a little bit of time.
I told them our usage pattern but they are having trouble using JMeter to do a more steady and slow ramp up. I know very little about the tool but I imagine this is a pretty typical use case.
Any tips or ideas that could send us in the correct direction, or is JMeter just not suited to this task?
It shouldn't be rocket science, for normal JMeter Thread Group ramping up from 0 to 300 users in 15 minutes looks like:
So it's sufficient to change Ramp-up period to 1800 in order to decrease users arrival rate by factor of 2x.
For Custom Thread Groups it's even easier because you can see visually users arrival chart:
So it's a matter of simple arithmetic, it shouldn't be that hard.
Check out JMeter Ramp-Up - The Ultimate Guide for more details if needed.
I like to use the Throughput Shaping Timer JMeter plugin for this. You can specify a duration of the rampup, full load, rampdown, etc. It's pretty flexible. I like to make these values parameters so I can pass in different values from the commandline at for flexibility without having to open and edit the script between differing test runs.
https://jmeter-plugins.org/wiki/ThroughputShapingTimer/
I am completely new to Performance testing and JMeter and hence my question may sound silly to some people.
We have identified some flows of an application and they are like:- Login, SignUp, Perform Transaction. Basically, we are trying to test our API's performance so we have used HTTP Request Sampler heavily. If I have scripted all these flows in JMeter, how can achieve answers to following
How can we decide the benchmark of this system? There is no one in organisation who can help with numbers right now and we have to identify number of users beyond which our system can crash.
For Example, if we say that 1,00,000 users are expected to visit our website in one hour's time then how can we execute this in JMeter? Should Forever loop be used with 3600 seconds(60 mins) of RampUp OR should I go ahead with Number of Threads as 1,00,000 RampUp ask 3600 and Loop Count as 1? What is the ideal way to test this?
What has been done till now?
1. We use to run above mentioned flows with Loop Count as 1. However, as per my knowledge, it's completely based on how much RampUp time I give and JMeter will decide accordingly how many threads it require in parallel to complete the task. Results were not helpful in our case as there was not much load to system.
2. Then, we changed the approach and tried Loop Count as Forever for some 100 users and ran the test for a duration of 10 minutes. After continuing with such test for sometime, we got higher Standard Deviation in JMeter's Summary Report which was fixed by tuning our DB and applying some indexes. We continued this way but I am still confused whether this can really simulate realistic scenario.
Thanks in advance!
Please refer my answer and comments to the similar question below:
performance-testing-in-production-environment-using-jmeter
I have single API to test and I want achieve 30K TPS with this API. Can any body explain me fully how to test this with Jmeter ?
It may be with 20 , 40 or 60 Users but I want to acheive this using Jmeter UI mode?
Your question is way too broad.
Anyway, the simple and straight answer is that you may not be able to achieve this in the UI mode and you may require multiple slaves. If your API has an SLA of 1 second, a single thread executing with 1 second pacing will result in 3600 transactions in an hour (1 TPS). So, you will require 30,000 threads in JMeter to achieve 30,000 TPS.
JMeter GUI isn't for Load Testing rather the test plan debugging purpose only. GUI is very resource intensive and consumes a lot of memory. It is better and highly suggested to perform load testing in Non-GUI mode.
When you run your JMeter in GUI mode you will see this:
As 30K TPS is too high and to test this you have to give enough number of threads. To calculate how many threads you need for this test, you also need to know the API's max response time.
Here is the formula for thread number calculations:
TPS* max response time in second
For example, if you have response time 1 second, then to generate 30K TPS you need 30K threads. If API's response time is 500ms, then you need at least 15K threads.
To generate this high load, you also need to go for Distributed Testing, cause you won't be able to generate such a high load from a single machine. To determine how many threads you can generate from a single machine, you also need to test this yourself. Try to gradually increase the thread number and monitor the machine's health. If it consumes 70-80% of your machine's health (CPU, Memory, Disk), then stop the test and mark the number of threads. Now you can assume how many machines you need to test this scenario.
Finally, I suggest you to double check your test requirements because 30K TPS (108000000 requests per hour) is too high!
See Apache JMeter's Best Practices for more.
while performance testing an application, i was unable to proceed further of handling large number of threads using JMeter, so, i would like to know the max number of threads that are allowed in Jmeter, Is jmeter capable of handling 1,50,000 threads?
There is no upper limit, it strongly depends on what your test is doing, what is response size, etc.
Also keep in mind that real users don't hammer the application nonstop, they need some time to "think" between operations plus they have to wait for response before they start "thinking" about next action.
For example, given users "think" for 10 seconds and response time is 2 seconds it means that each virtual user will execute 5 requests per minute.
In above scenario 1 50 000 users will execute 7 50 000 requests per minute - which is 12 500 requests per second - > 10x times less users to simulate.
So:
first of all make sure that your JMeter configuration is optimal, default settings are good for tests development and debugging but not very good for the load test execution. You need to
tune Java parameters (Heap size, GC, etc.)
disable all listeners
make sure that you have only those assertions and post processors which are absolutely required
you store only those metrics you need and you don't save any excessive results, especially response data
See 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure article for above points comprehensive explanation and some more tips
Even given you apply above tweaks I don't think you'll be able to conduct the load of 1 50 000 users from a single host (unless you have a supercomputer in your QA Lab) so I expect you'll need to consider JMeter Distributed Testing when one master machine orchestrates multiple load generators aka "slaves" acting as a single instance - this way you will be able to increase the load by factor equal to number of slaves
Yes Of course, it depends a lot on the machine running Jmeter, but if mileage counts I can give you some hints.
JMeter allows you to run multiple processes in the same box, and it's usually pretty reliable generating up to 200-300 threads per JMeter instance. If you need more than that, I'd recommend using multiple JMeter instances
Use below link for better description how Jmeter can handle 1,50,000 threads of multiple instances
https://blazemeter.com/blog/how-run-load-test-50k-concurrent-users