1

What is the difference between the below 2 scenarios and will it have similar performance impact? What will be the delay between requests in scenario 2?

Will all the threads remain alive in Scenario 2?

I'm aware of the fact that thread simulates a user and loop-count means the number of times the thread will make request.

Scenario 1: If the number of thread count is 10, ramp-up time is 10 and loop count is 1.

Scenario 2: If the number of thread count is 1, ramp-up time is 1 and loop count is 10.

user2044296
  • 504
  • 1
  • 7
  • 18

2 Answers2

3

In Scenario 1, where 10 threads are used, and the ramp-up period is 10 seconds, then JMeter will take 10 seconds to get all 10 threads up and running. Each thread will start 1 (10/10) second after the previous thread was begun.

And another example from the user manual:

If there are 30 threads and a ramp-up period of 120 seconds, then each successive thread will be delayed by 4 seconds.

In Scenario 2 JMeter will run 1 thread, after the completion of one thread, the next one will start, and so 10 times.

Such a difference. So, it will have a different impact on performance.

Check Thread Group user manual and this JMeter thread groups guide to get more information.

Vadim Yangunaev
  • 1,817
  • 1
  • 18
  • 41
  • So in both the scenarios 10 threads will be created, right? And what will be the delay between successive threads in scenario 2? In scenario 2 when a new thread starts does the older thread remain alive? – user2044296 Jan 11 '19 at 08:56
  • 1
    Yes. But the difference is that in scenario 1 threads may work in parallel, and in scenario 2 each thread starts after the previous one stops. – Vadim Yangunaev Jan 11 '19 at 09:06
  • And there is no delay between threads unless you specify them. – Vadim Yangunaev Jan 11 '19 at 09:09
  • Thanks, I was looking for this type of difference only. So eventually, only one 1 thread remains alive in Scenario 2 and all the threads remain alive in Scenario 1. – user2044296 Jan 11 '19 at 09:22
  • @user2044296 Defenitely! So сan you mark the answer as correct if it suits you? – Vadim Yangunaev Jan 22 '19 at 09:55
1

JMeter works as:

  1. It kicks off the number of threads within the bounds of Ramp-Up period
  2. Once started thread starts executing Samplers upside down (or according to the Logic Controllers)
  3. If there are any Loops defined - the thread will start over
  4. If there are no samplers to execute and Loops to iterate - the thread is being shut down

Always apply end user perspective to your test plan as well-behaved load test should (or even must) mimic real user as close as possible, otherwise load test doesn't make a lot of sense. You need to have 1 to 1 mapping of each simulated virtual user to a real user and build your test plan to consider this real user anticipated behavior including

The situation when single user repeats the same set of actions 10 times is highly unlikely to happen therefore I would not consider this as a good/valid test scenario.

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • I wanted to be clear on how loop count and number of threads setting would impact the above mentioned scenarios so that conceptually I've no confusion. – user2044296 Jan 11 '19 at 09:29