Home > Enterprise >  How can the average response time remain more or less constant if I keep increasing the number of th
How can the average response time remain more or less constant if I keep increasing the number of th

Time:10-27

I have a simple stress test scenario which runs for 2 hours. I have configured 3000 threads to be ramped-up over the whole duration of the test. It's just one HTTPS POST request repeated multiple times with changing json body data on each request. The client is on one system and the server is on another system. I am just calling an API with some input data and that API looks up data in a file and responds back with whatever it is hardcoded to respond with.

How is it possible that although I keep increasing the number of threads as time goes by, the load on the system does not increase proportionally?

I am asking this because a few days ago when doing this test, the average response time was increasing proportionally with my increase in threads (virtual users). Now when doing the same test, this increase does not happen anymore - that is why now I am guessing that the devs have put some maximum TPS limitation.

This is the Response Times Over Time result: enter image description here

This is the Total TPS: enter image description here

Active Threads Over Time result: enter image description here

Bytes Throughput Over Time: enter image description here

Can someone please help me understand how this is possible? There are no error codes.

It seems that the server is somehow limiting the client, but I don't understand through which mechanism and I don't know which jmeter result graph would show me a clearer evidence of this. I would appreciate if someone could help me understand.

CodePudding user response:

You're showing results from different test executions so we cannot properly correlate them, i.e. response times start from 23:15 and 2 other charts end at 23:01.

In general well-behaved system's throughput should increase proportionally to the increased load. If it doesn't happen - there should be an explanation for this, i.e.

  1. Response time increases, try looking at response times for the duration between 22:23 and 23:01
  2. JMeter cannot send the requests fast enough, make sure to follow JMeter Best Practices and to monitor your load generators resources like CPU, RAM, etc. using i.e. JMeter PerfMon Plugin
  3. Application cannot respond fast enough due to configuration or implementation limitation, check what's going on under the hood of your API call using APM or Profiler tool
  4. The fact that JMeter doesn't report errors doesn't necessarily mean that there are no errors, your application may respond with HTTP Status Code 200 but the body contains the error details so it makes sense to look at i.e. Bytes Throughput Over Time chart to see if the volume of transmitted data grows as the users arrive. You can also consider adding Assertions to your requests to ensure that your test is doing what it's supposed to be doing

CodePudding user response:

The issue might be caused by the client throttling the actual number of threads been executed. In other words, the threads could be queuing at the load-generator. See Dr. Gunter How to Get Unbelievable Load Test Results, specifically the 4.4 Threads That Throttle section for a detailed explanation. The paper shows a method using Little's Law to estimate the actual number of threads been executed.

  • Related