I need to run a 14 hour soak test in JMeter. Need to hit a few pages with around 100 users an hour - so nothing crazy.
What would be an appropriate way to set this up in terms of ramp up period etc?
"100 users an hour" doesn't make a lot of sense, if you need to mimic 100 users for 14 hours you need to configure Thread Group like:
with regards to ramp-up - as per JMeter documentation:
The ramp-up period tells JMeter how long to take to "ramp-up" to the full number of threads chosen. If 10 threads are used, and the ramp-up period is 100 seconds, then JMeter will take 100 seconds to get all 10 threads up and running. Each thread will start 10 (100/10) seconds after the previous thread was begun. If there are 30 threads and a ramp-up period of 120 seconds, then each successive thread will be delayed by 4 seconds.
Ramp-up needs to be long enough to avoid too large a work-load at the start of a test, and short enough that the last threads start running before the first ones finish (unless one wants that to happen).
Start with Ramp-up = number of threads and adjust up or down as needed.
the point is to increase the load gradually so you can ramp-up i.e. for first hour and then hold the load for remaining 13 hours if nothing bad happens during the ramp-up phase
Also make sure to configure JMeter to behave like a real browser when it comes to:
cookies
embedded resources (images, scripts, styles, fonts)
cache
think times
Related
Can someone please help me with the best Ramp up time for 20 users as well as 600 users.
I have given Users: 20, Rampup: 60 sec , which is leading to Reason for socket exception in Client-Server Application
I have given Users: 20, Rampup: 60 sec , which is leading to Reason for socket exception in Client-Server Application
Non HTTP response code: javax.net.ssl.SSLException/Non HTTP response message: Socket closed
There is no "best ramp-up time", there is only a recommendation to increase the load gradually so you would be able to correlate increasing load with other metrics like response time, throughput, number of errors, etc.
If you need a quote with it comes to suggested ramp-up period you can stick to official JMeter documentation which states:
The ramp-up period tells JMeter how long to take to "ramp-up" to the full number of threads chosen. If 10 threads are used, and the ramp-up period is 100 seconds, then JMeter will take 100 seconds to get all 10 threads up and running. Each thread will start 10 (100/10) seconds after the previous thread was begun. If there are 30 threads and a ramp-up period of 120 seconds, then each successive thread will be delayed by 4 seconds.
Ramp-up needs to be long enough to avoid too large a work-load at the start of a test, and short enough that the last threads start running before the first ones finish (unless one wants that to happen).
Start with Ramp-up = number of threads and adjust up or down as needed.
"Socket exception" is too broad term, there could be multiple reasons behind it and therefore multiple solutions. If it doesn't happen for 1-2 users and happens for 20 - most probably your application gets overloaded somehow and cannot process that many requests. You can take a look at jmeter.log file
and/or add the next line to system.properties file:
javax.net.debug=all
and next time you run your test you will see a lot of debugging information in the STDOUT
More information:
Debugging SSL/TLS Connections
Connection Reset since JMeter 2.10 ?
I need to test an application can handle 500 users over the space on 1 hour. How long should I set the ramp up period for the specified amount of time and users?
It depends on what you're trying to achieve. There are no "strict" rules, no recommendations either.
As per JMeter documentation:
The ramp-up period tells JMeter how long to take to "ramp-up" to the full number of threads chosen. If 10 threads are used, and the ramp-up period is 100 seconds, then JMeter will take 100 seconds to get all 10 threads up and running. Each thread will start 10 (100/10) seconds after the previous thread was begun. If there are 30 threads and a ramp-up period of 120 seconds, then each successive thread will be delayed by 4 seconds.
Ramp-up needs to be long enough to avoid too large a work-load at the start of a test, and short enough that the last threads start running before the first ones finish (unless one wants that to happen).
Start with Ramp-up = number of threads and adjust up or down as needed.
So you can use 500 as ramp-up so all 500 users will be online in 500 seconds.
Other option is to set ramp-up period for 1st 30 minutes and next 30 minutes keep the load of 500 users.
The idea is to add users gradually so you could correlate increasing load with other metrics and KPIs like response time, number of transactions per second, number of errors, etc. so you could state where is the saturation point, where is the first bottleneck, etc.
More information: JMeter Ramp-Up Period: The Ultimate Guide
The ramp-up period, Is the time needed to start all the threads defined.
So, If you add 3600 with 500 Thread, This will mean a new thread will be launched every 7.2 seoconds, And the last one will start after 1h ( 3600 seconds)
If this is what you want, you can set Ramp up to 3600.
quote from official doc
The ramp-up period tells JMeter how long to take to "ramp-up" to the full number of threads chosen. If 10 threads are used, and the ramp-up period is 100 seconds, then JMeter will take 100 seconds to get all 10 threads up and running. Each thread will start 10 (100/10) seconds after the previous thread was begun.
How to calculate inputs (virtual users, ram up period) for performance and load testing using Jmeter.
If you're doing Load testing - you are supposed to be checking your system behaviour against the anticipated load, it means that you should know the expected number of users from NFR or SLA
If you don't have any requirements - go for the stress testing, i.e. start with 1 user and gradually increase the load until response time starts increasing or errors start occurring (whatever comes the first)
With regards to the ramp-up period duration - there are no strict requirements, as per JMeter Documentation
The ramp-up period tells JMeter how long to take to "ramp-up" to the full number of threads chosen. If 10 threads are used, and the ramp-up period is 100 seconds, then JMeter will take 100 seconds to get all 10 threads up and running. Each thread will start 10 (100/10) seconds after the previous thread was begun. If there are 30 threads and a ramp-up period of 120 seconds, then each successive thread will be delayed by 4 seconds.
Ramp-up needs to be long enough to avoid too large a work-load at the start of a test, and short enough that the last threads start running before the first ones finish (unless one wants that to happen).
Start with Ramp-up = number of threads and adjust up or down as needed.
so if you don't have any better ideas - just go for the above recommendation.
I have a requirement like API should be capable of handle 5k Concurrent user in 5 Sec.
How can i test this scenario in jmeter.
For 1k Concurrent user what should the RampUp time to be set in Jmeter.
5000 for 5 seconds is quite easy to achieve:
With normal Thread Group
With Concurrency Thread Group
With regards to the ramp-up, I can only give you:
a quote from JMeter documentation:
The ramp-up period tells JMeter how long to take to "ramp-up" to the full number of threads chosen. If 10 threads are used, and the ramp-up period is 100 seconds, then JMeter will take 100 seconds to get all 10 threads up and running. Each thread will start 10 (100/10) seconds after the previous thread was begun. If there are 30 threads and a ramp-up period of 120 seconds, then each successive thread will be delayed by 4 seconds.
Ramp-up needs to be long enough to avoid too large a work-load at the start of a test, and short enough that the last threads start running before the first ones finish (unless one wants that to happen).
Start with Ramp-up = number of threads and adjust up or down as needed.
and a piece of advice on ramp-up in general: if you're doing some form of a stress test it's a good idea to increase the load gradually, this way you will be able to correlate increasing load with the throughput and response time because running 5000 threads for 5 seconds will give you only a basic information on the response time for this workload and you won't be able to tell what is the maximum number of users/requests per second the application can support, when performance starts degrading, etc. So you could consider a load pattern like this:
and look at Response Times Over Time chart to see the relationship between the number of concurrent users and the application response time
I am testing an API endpoint. I would like to know if the server can handle 100 users in one minute.
This is the thread configuration that I am currently using.
My question is:
did I configure the threads, ramp-up period, and duration parameter correctly?
How much ramp up period is ideal, against the number of threads?
I would recommend either decreasing the ramp-up or increasing the test duration because with your current settings you will have 100 users online only during the last second of the test
So set "Duration" to 120 seconds so during first minute your threads would be ramping up followed by another minute of 100 online users or go for something like:
30 seconds of ramp-up
180 seconds of duration
You may find i.e. Ultimate Thread Group easier to use, it's default workload pattern seems to match your scenario:
and you will be able to play with ramp-up, ramp-down and time to hold the load and see the anticipated threads count in the chart.
You can install Ultimate Thread Group as a part of "Custom Thread Groups" bundle using JMeter Plugins Manager
The whole point of ramp-up is that your should be increasing the load gradually so you could correlate the increasing load with other metrics (throughout, response times, errors, etc.)
As per JMeter Documentation:
The ramp-up period tells JMeter how long to take to "ramp-up" to the full number of threads chosen. If 10 threads are used, and the ramp-up period is 100 seconds, then JMeter will take 100 seconds to get all 10 threads up and running. Each thread will start 10 (100/10) seconds after the previous thread was begun. If there are 30 threads and a ramp-up period of 120 seconds, then each successive thread will be delayed by 4 seconds.
Ramp-up needs to be long enough to avoid too large a work-load at the start of a test, and short enough that the last threads start running before the first ones finish (unless one wants that to happen).
Start with Ramp-up = number of threads and adjust up or down as needed.