I am new to jmeter, I want to create a report, I have following doubts:
I want to find out the maximum number of users that can be given in a thread for ramp-up time 1sec?
Ex: 5 simple Http Request
no of user : ?
Ramp up time = 1
Loop=1
How to set a proper ramp-up time depending on the number of user in a thread?
Ex: 5 simple Http Request
no of user : 100
Ramp up time = ?
Loop=1
I tried different combinations of ramp-up and number of users considering through put , but the results varies and not able to find out a relation with the ramp-up time and the number of users.
Please help to find a solution for it.
Thanks!
Ramp-up period is the time required for all threads representing virtual users to start.
JMeter starts with 1 user and kicks off another thread so all threads will start in ramp-up period time slot i.e.
10 users, 10 seconds ramp-up - start with 1 user, each second 1 user added
10 users, 20 seconds ramp-up - start with 1 user, each 2 seconds 1 user added
100 users, 50 seconds ramp-up - start with 1 user, each second 2 users added
Keep in mind that if the thread has finished its job and there are no loops defined it'll shut down. For JMeter greenhorns it's better to use Ultimate Thread Group (available via plugin) which provides easy-understandable and configurable load pattern definition.
Depending on what you're trying to achieve you can also use the following test elements:
Synchronizing Timer - to hold the threads until specified number will be reached and release them at the same moment
Constant Throughput Timer - to specify exact load in requests-per-second.
Hope this helps.
Related
I'm new to jmeter I have the following scenario. I want the jmeter to hit the given url, I have 13 such url in a csv file.
I want to hit the url at the rate of 2 requests per second for a given time period of 60 seconds.
In this case how should I specify my thread group, Ramp-up period and Loop count.
I understood the basic like 10 thread with 10 second rampup with a loop count of 1 will run 1 request per second for 10 user. But I'm not sure how to specify when we have 13 such urls.
Atleast any link for the given scenario is appreciated.
I understood the basic like 10 thread with 10 second rampup with a loop count of 1 will run 1 request per second for 10 user
not necessarily, JMeter waits for response from the previous Sampler prior to executing the next one, the configuration means that JMeter will start 1 user each second, it doesn't guarantee 1 request per second.
The easiest way of achieving X requests per second throughput is using Throughput Shaping Timer
Make sure to supply the sufficient number of Threads, i.e. if your application response time is 1000ms - 2 threads should be enough, if it's 2000 ms - you will need at least 2 threads, etc.
There is a special thread group: Concurrency Thread Group which can be connected to the Throughput Shaping Timer via Feedback Function so it will automatically kick off extra virtual users if the current amount will not be enough in order to conduct the required load.
In Jmeter Thread group section, if I am adding 3000 threads with a ramp-up time of 15000 secs, does that mean all 3000 users will be active till 15000 secs ends?
How many simultaneous users are on my website in that case?
Every 5 seconds a thread will be created until end of 15000 secs.
Simultaneous users depends on test plan execution, if only 1 loop and 1 request that finished in less than 5 seconds then you will have only 1 simultaneous user.
If loop is inifinite you will have 3000 simultaneous users after 15000 secs
It mainly depends
on the number of iterations you define in the Thread Group
number of Samplers
your application response time
Your "3000 threads with a ramp up time of 15000 secs" configuration means that JMeter starts a new thread (virtual user) each 5 seconds.
Once started thread starts executing Samplers upside down (or according to the Logic Controllers)
When there are no more Samplers to execute and loops to iterate - the sampler gets shut down
So depending on the number of loops and response time you can have from 0 to 3000 users.
In order to check the actual concurrency you can use i.e. Active Threads Over Time and Server Hits Per Second plugins (they can be installed using JMeter Plugins Manager)
Yes. Time taken per user to activate = Ramp up time / No. of threads, in your case 15000/3000 = 5 sec per user.
as you can see 1 user will be added per 5 second and eventually you will have all 3000 users active by the end of 15000 sec, given your first or any other user does not complete iteration and shut itself before last user gets chance to start ( last user starts at 15000th sec here)
Note : To achieve a load of 3000 users by the end of 15000sec, you can set LoopCount to "infinite" but this will cause increase in number of total samplers and you may end up iterating your script way more than 3000 times.
When I'm using the original JMeter Thread Groups and set 10 threads (users), it fires 10 external HTTP calls.
When I changed it to Ultimate Thread Groups (UTG) and set the following attributes...
Start Threads Count = 10
Initial Delay = 0
Startup Time = 60
Hold Load For = 30
Shutdown Time = 10
...it fires thousands of external HTTP calls. Even the Stepping Thread Groups (STG) and Concurrency Thread Groups (CTG) also behave the same as UTG.
Why this happens when using non-original JMeter thread groups? I'm looking for ways to create 10 users that create 1 external HTTP call each (means 10 in total for the whole test plan) using UTG, STG or CTG but I don't really understand why this happens.
Screenshots when using original Thread Group
Screenshots when using original Ultimate Thread Group
Your scenario results in:
On 5th second of the test 1st virtual users starts
Within next 55 seconds remaining 9 virtual users start
10 users are active for 30 seconds
Then each 1 second each 1 virtual user is being shut down
You're seeing much more than 10 requests because once virtual user is kicked off it starts executing Samplers as fast as it can and the actual number of executed Samplers will mostly depend on your application response time. Check out What is the Relationship Between Users and Hits Per Second? for more comprehensive explanation.
If your goal is to execute 10 requests in 1 minute 40 seconds you need to use Constant Throughput Timer or Precise Throughput Timer or Throughput Shaping Timer in order to limit JMeter to send 1 request per each 10 seconds.
I have created a set and just confused with the Loop Count and Ramp Up period.
I have a test set with the following parameters.
Threads = 30
Ramp Up Period = 30
Loop Count = 100
As per the page on
quora.
I suppose:
a) If Loop count is Zero, then each of the 30 threads will be starting every second. As per the shared the web page, I guess 30/30 * 100 ie 100 threads/requests will be hitting the server every second. Please correct me if I am wrong.
b) As per the above parameters, there will be a total of 30 * 100 threads/requests. Does this mean all the 3000 threads/requests will be sent within 30 seconds [ Ramp Up period ]
Assuming you have 30 users and 30 seconds ramp-up
JMeter will start each virtual user each second
Each virtual user will start executing samplers upside down (or according to the logic controllers, if any) as fast as it can (if you don't use timers) so the delivered load can be either more or less than 30 requests/second, it depends on how fast JMeter is executing requests and on your application response time as JMeter will wait for response from previous sampler before starting new one
When virtual user finishes executing all the samplers defined in test plan it will start over and do point 2 for 99 more iterations
When virtual user won't have more samplers to execute and loops to iterate it will shut down
A couple of tips:
You can use Server Hits Per Second listener to see how many requests per second you are actually making given your test plan configuration
You can control the number of requests per second via Constant Throughput Timer
Consider upgrading to JMeter 3.2 as newer JMeter versions normally contain new features, performance improvements and bug fixes
according to jmeter manual ramp up is:
How long JMeter should take to get all the threads started.
If there are 10 threads and a ramp-up time of 100 seconds, then each
thread will begin 10 seconds after the previous thread started, for a
total time of 100 seconds to get the test fully up to speed.
So if your goal is to reach 3000 request within 30 seconds the above wont do, it might take more than that depending on how much it takes to finish the requests you are sending.
If you are looking for Throughput you can add an aggregate report listener which calculates the throughput for you and depending on the results you can configure your thread properties to reach your goal.
Reference :
Jmeter user manual
Is that possible to simulate 1000 to 10000 user to jmeter?
If so how?
in 1 thread group only test 1k user:
Thread user = 1000,
Ramp up = 10 ,is this means it will test 1000 user in 10sec?,
Loopcount = 1, is there a disadvantage if I put 10 here ,is this means 1000x10 user = it will simulate 10k user?
Is 1 thread group can simulate 1000 concurrent user?
I could have written it as comment, but it went out of characters.
definitions given by #Quality-Expert are correct but his understanding of your test setup is wrong.
10 loop count doesnt mean 1000*10
It means at a given moment only 1000 concurrent users will be present but they will perform same action 10 times. It doesn't mean 10000 users.
Rampup is 10 doesnt mean 1000 users for 10 seconds
It means 100 users will come online in 1 second and next 100 users will online in next second i.e. in 2 seconds 200 users will come online and this is how 1000 users will come online in 10 seconds.
If you dont provide any test duration test will end their itself, it wont continue after threads have finished their task. If you want to load test with 1000 users then provide some test duration i.e. 10 mintues. Thus test will run with 1000 concurrent users for 10 min. Rampup is just warm up time for system under load test so that it wont face sudden load of 1000 users.
About 10000 load, use need to use distributed set of machines/client of Jmeter which will generate that load or use cloud load testing tools.
Number of Threads- The maximum number of users you want to run.
Ramp-Up Period - Defines how long it takes for JMeter to ramp up from zero users to X number of threads. It is in terms of seconds.
Loop Count - Defines how many times you want each user to run your script.
Other thing is that No. of user depends on your machine CPU , RAM , Physical memory. As far as I know using normal system you can user 250-500 max. users.
If you want to do testing like 1k,10k users then you will have to use cloud systems like Neoload.
As per your given example , you are right about if you put thread user = 1000 & ramp up = 10 then it will run test till 10 seconds for 1000 users.
Let me know if you have still any confusion.
Answer for the above question in below screen, in Jmeter manual its different which says threads/ramp-up period= user per seconds