JMeter - How To Distribute User Load In The Test Plan?

Bharti Garg

August 3, 2023

4 mins

You might have encountered this situation where not all users would do a particular scenario all the time. Let's consider an e-commerce application, having major scenarios such as user login, search, browsing the application by an anonymous user, product adding to cart and buying the product. Say for example:

  • 40% of authenticated users login to a website
  • 30% of anonymous users browsing the website
  • 20% of users doing a search
  • 9% of users adding product to the cart
  • And 1% of all users actually buying the product

To mimic this behaviour in a load test script, we use the Throughput Controller which controls how often a particular scenario should be executed. And the controller contains 2 modes:

  • Percent Executions
  • Total Executions

Now we will see how these 2 modes can be executed in Test Plan:

Consider 100 users/threads to be run. Percent Executions mode commands the controller to execute a certain percentage of the iterations through the test plan as defined in Throughput textbox shown below:

FrugalTesting blog on distributed user load in jmeter

As you can see below, after execution of the Test Plan, the samplers have executed according to the frequency (throughput) set in each request.

FrugalTesting blog on distributed user load in jmeter

Total Executions mode commands the controller to stop executing after a certain number of iterations have completed as given by the Throughput textbox shown below.

FrugalTesting blog on distributed user load in jmeter

As you can see below, the samplers have executed as per the limit defined in Total Executions, instead of all requests hitting with 100 users.

FrugalTesting blog on distributed user load in jmeter

If Per User checkbox is checked, the controller executes per user/thread basis. If unchecked, then the calculation will be global for all users.

Let's understand with an example, the Per User case. Say our test configuration is 100 users and the duration of the test plan is 300secs.

FrugalTesting blog on distributed user load in jmeter

Let's use total execution mode and check Per User.

FrugalTesting blog on distributed user load in jmeter

As you can see, the total number of executions is equal to the number of users times the number given for throughput.

FrugalTesting blog on distributed user load in jmeter

Bharti Garg

✨ Founder and principal architect at Frugal Testing, a SaaS startup in the field of performance testing and scalability

Possess almost 2 decades of diverse technical and management experience with top Consulting Companies (in the US, UK, and India) in Test Tools implementation, Advisory services, and Delivery.

I have end-to-end experience in owning and building a business, from setting up an office to hiring the best talent and ensuring the growth of employees and business.

Our blog

Latest blog posts

Discover the latest in software testing: expert analysis, innovative strategies, and industry forecasts
APM

How to Create Effective APM Dashboards: A Step-by-Step Guide

Rupesh Garg
Rupesh Garg
February 5, 2025
5 min read
Software Testing

What is LambdaTest? A Complete Guide to Cross-Browser and Real Device Testing

Rupesh Garg
Rupesh Garg
February 5, 2025
5 min read
Testing Tools

JIRA vs ClickUp: The Ultimate Showdown on Features and Pricing

Rupesh Garg
Rupesh Garg
February 3, 2025
5 min read