How should the JMeter throughput controller be configured?
The Throughput Controller in JMeter can be used to simulate multiple concurrent users accessing a system and control their throughput.
To set up the Throughput Controller in JMeter, you can follow these steps:
- Add a Throughput Controller in the test plan. Right-click on the test plan -> Add -> Logic Controller -> Throughput Controller.
- The following parameters can be configured in the throughput controller’s properties:
- Target Throughput: the desired number of requests to be sent per second. It can be set using a fixed number, variable, or function.
- Percentage Execution: The percentage of actual requests executed compared to the target throughput. For example, if set at 70%, then the actual number of requests executed would be 70% of the target throughput.
- You can calculate Throughput based on either the Thread Group or the entire test plan.
- For each user: If the thread group is selected, you can choose whether to calculate the throughput per user.
- As needed, you can add HTTP requests or other operations in the sub-nodes of the throughput controller.
- Running the test plan in JMeter will simulate the behaviors of concurrent users based on the settings of the Throughput Controller, controlling their throughput.
Please take note:
- The throughput controller is a logic controller that does not actually generate any load. To simulate concurrent users, you need to add corresponding requests or actions in the child nodes of the throughput controller.
- The throughput controller could potentially impact the execution time of the test plan. If the throughput is set too high, it may lead to excessive server load or exceed resource limits.
- When setting up a throughput controller, it is necessary to determine the appropriate settings value based on the actual situation of the system and performance goals. Optimization can be achieved through constant adjustments and observations of test results.