0
votes

How to test 1 million users in Jmeter concurrently ? What should I use Number of threads & Ramp up period ?

I tried but I given Number of threads 1000000 and I have to give Ramp up period which don't allow to test in concurrent .

3

3 Answers

0
votes

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.

if you want all your threads starts simultaneously you can to set a ramp-up = 1 this means that jmeter will take 1 second to get all threads up and running! or 0 to starts them asap. but i hope that you have a good hardware to supports this.

http://jmeter.apache.org/usermanual/test_plan.html

0
votes

Actually I would recommend choosing ramp-up so the load will increase gradually. For instance, your application is able to serve 500k users without any lag, from 500k to 700k response time grows, at 750k concurrent users it dies.

If you release all 1M users at once you won't get above information, all you will know is that your application doesn't support 1M users.

So I would recommend increasing loops count so existing users could continue work while new users are arriving so you will have gradually increasing load up to 1M of concurrent virtual users

  1. Define desired test duration using "Scheduler" option in Thread Group (or using Runtime Controller)
  2. Set "Loop Count" to Forever or put -1 there.
  3. Set your ramp-up phase to be something between 20% and 50% of the overall test duration
  4. Optionally it would be also good to implement "ramp-down" to see the system under test behavior when the load gets back to normal

Also keep in mind the following:

0
votes

1,000,000 threads would get you 1,000,000 Transactions Per Second only if the Response Times were under 1 second. You will need enough threads to include the system response time. 10,000,000 threads would allow for up to 10 second Response Times.

Others are correct, ramp up slowly to the full rate in order to have the time to view where issues lie.

I would use these settings to begin sizing the lab and slave count:

  • Number of Threads: 10,000,000
  • Ramp-Up Period: 1800 sec (30 mins)
  • Loop: Forever

Throughput Shaping Timer: - Start RPS Row 1: 1 - End RPS Row 1: 1,000,000 - Duration Row 1: 1800 (same as rampup)

  • Start RPS Row 2: 1,000,000
  • End RPS Row 2: 1,000,000
  • Duration Row 2: 600 (10 minutes at full rate)

  • Start RPS Row 3: 1,000,000

  • End RPS Row 3: 1
  • Duration Row 3: 600 (gradually backing threads off to check for resource recovery)

Note what resource runs out first, adjust and repeat.