Jmeter - What is the functioning of “Per User” checkbox under Throughput Controller?

1.5k views Asked by At

I need to divide the load on my application with some percentages i.e. Login Module - 60%, Accounts - 10%, Other Modules - 30%. After few research i find a option under Throughput Controller section in jmeter using which i can control these percentages. I find one checkbox there named "per user". Now i am not getting this check box.

As per blazemeter blog here i tried one scenario as below with "Per user" checkbox checked.

  • Select "Total Execution" from dropdown.
  • Marked Throughput as 40.
  • Threads used - 10, Loop count 1

Now, as per the blog specific transactions should execute for 400 times. but there was Zero execution for that transaction.

I tried another scenario with "Per user" checkbox checked.

  • Select "Total Execution" from dropdown.
  • Marked Throughput as 60.
  • Threads used - 10, Loop count 1

Now, as per the blog specific transactions should execute for 600 times. but it executed 10 times.

Can any experts out there share what am i doing wrong here? Or there is some more clarity needed how this checkbox works.

1

There are 1 answers

0
Naveen Kumar R B On BEST ANSWER

To understand the Throughput Controller (TC), just add one TC and one sampler (inside TC) and Aggregate Report in combination. then, play with all the parameters in the Throughput Controller.

From Official Documentation:

Total executions: causes the controller to stop executing after a certain number of executions have occurred.

and

Per User: If checked, per user will cause the controller to calculate whether it should execute on a per user (per thread) basis. If unchecked, then the calculation will be global for all users. For example, if using total execution mode, and uncheck "per user", then the number given for throughput will be the total number of executions made. If "per user" is checked, then the total number of executions would be the number of users times the number given for throughput.

Read both the statements carefully multiple times.

In both the scenarios that you specified, you have maximum executions of 10. (Thread count * Loop Count). Though you specified, Total Executions as 40 or 60, First, you should provide more than 60, in order to see all those 40/60 iterations get executed. So, always specify more iterations (using Thread count & Loop Count) than the Total Executions.

You have to consider Percentage Executions instead of Total Executions to match your requirements. Again, I suggest to simulate for one sample and understand the behaviour by varying the percentages.


Following are some scenarios and expected behaviour (EB).

Scenario:1

Thread Group - 10, Loop Count - 1, Throughput - 40 (Total Executions), Per User - Checked.

EB: Sampler will run only 10 times.

Scenario:2

Thread Group - 40, Loop Count - 1, Throughput - 40 (Total Executions), Per User - Checked.

EB: Sampler will run only 40 times.

Scenario:3

Thread Group - 40, Loop Count - 1, Throughput - 40 (Total Executions), Per User - Unchecked.

EB: Sampler will run only 40 times.

Scenario:4

Thread Group - 100, Loop Count - 1, Throughput - 40 (Total Executions), Per User - Checked.

EB: Sampler will run only 100 times. calculated whether each user executed 40 times. As the limit is not reached, it is executes all 100 iterations.

Scenario:5

Thread Group - 100, Loop Count - 1, Throughput - 40 (Total Executions), Per User - Unchecked.

EB: Sampler will run only 40 times. calculated at the global level. As the sampler reached 40 times for all the threads, stops executing it.

Scenario:6

Thread Group - 100, Loop Count - 40, Throughput - 40 (Total Executions), Per User - Checked.

EB: Sampler will run 400 times (Each user -> 40 times, 100*40). calculated whether each user executed 40 times. Here, even each user limit is also reached and no more executions after 40.

Scenario:7

Thread Group - 100, Loop Count - 1, Throughput - 40 (Total Executions), Per User - Unchecked.

EB: Sampler will run only 40 times. calculated at the global level. As the sampler reached 40 times for all the threads, stops executing it.