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 ?
Related
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
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.
I am given a task in which I have to test my app for an hour with 300 TPS.
I have added my HTTP req in Jmeter and I need to configure below parameters to achieve my target
target concurrency
Ramp up time
Ramp-up steps
Hold target
thread iteration limit
I could guess by name few of these but still I am not quiet sure how to work around it to achieve my target. I am new to Jmeter can any one please help.
I assume you're talking about Concurrency Thread Group so answers are:
target concurrency - we don't know, it depends on your application response time, i.e. if response time is 1 second - go for 300, if response time is 2 seconds - go for 600, etc. If you don't know the response time you can put "sufficient" number of concurrent threads, for example 1000 and use Throughput Shaping Timer for limiting the load to 300 TPS
Ramp up time - again, we don't know your requirements. I can only recommend increasing the load gradually so you could correlate increasing load with increasing response time or number of errors so for example start with 1 TPS and increase the load to 300 TPS in i.e. 15 minutes and leave it running for 1 hour
Ramp-up steps - again, we don't know your requirements, start with above recommendation and adjust ramp-up period up or down as needed
Hold target - at least 60 minutes or 3600 seconds plus any ramp-up time
thread iteration limit - leave blank otherwise your test may end earlier than you expect
Example Concurrency Thread Group combination:
the values given in Schedule Feedback Function are for reference only, the example means that the Concurrency Thread Group will start 1000 threads initially with maximum of 1500 threads and have 300 spare threads in pool, hopefully it will be sufficient to produce 300 TPS load which is set by the Throughput Shaping Timer