Home > Enterprise >  How to obtain the expected TPS., which is calculated by parameters value?
How to obtain the expected TPS., which is calculated by parameters value?

Time:10-29

I have used the normal thread group of 40 threads,180000 of throughput, and expected TPS is 3000.., But , Resulted only 2750 tps., How can I improve the TPS? I have tried the concurrency thread group along with the shaping timer combination.. Can u pls guide me..,Thanks in Advance.

CodePudding user response:

TPS or the throughput is controlled by sending the required number of requests to the target server in a unit time (seconds, minutes, hours, etc)

It is not easy or good practice to control the throughput by changing the number of threads. When the server gets slow the throughput gets low and vice-versa.

You need to introduce delays when the server responds faster and introduce more threads when the server responds slower. It is not easy to achieve the desired throughput by setting the thread count.

Please note that

throughput will be lower if the server is not capable of handling it, or if other timers or time-consuming test elements prevent it.

JMeter has a number of ways to achieve the desired throughput by introducing delays to the requests.

Using Timers

In the above cases, you need to ensure a sufficient number of threads are available to generate the required throughputs. This solution is not efficient if a large number of threads are created than the required number of threads.

The best approach would be the test should create additional threads on-demand and introduce delays between requests as required.

In JMeter, you can achieve this with Concurrency Thread Group along with the Throughput Shaping Timer.

This video demonstrate the use of the controllers.

CodePudding user response:

  1. First of all your application must be able to handle such a load. I don't know what your 180000 of throughput, stanza means,if you put it to the Constant Throughput Timer be aware that:
  • it is precise enough on "minute" level

  • it can only "pause" JMeter to "limit" its throughput to the given value

    In general you can reach out 3000 TPS with 40 users only if 1 user will make 75 requests per second which means that your application response time should be below 75 milliseconds.

    If response time will be higher - you won't be able to reach 3000 requests per second with 40 users.

  1. Also JMeter should be able to send requests fast enough, so make sure to follow JMeter Best Practices and if this is not sufficient consider using Distributed Testing

More information: What is the Relationship Between Users and Hits Per Second?

  • Related