Search code examples
jmeterperformance-testing

Interpreting JMeter Results


I have been running some load tests against APIs using JMeter, the results are below:

JMeter Results

I am trying to understand what the cause of the two different patterns of slow behaviour I am seeing could be:

  • Pattern 1: Time to connect is low, Latency is high
  • Pattern 2: Time to connect is high, Latency is low

*Note: the majority of calls are returning in around 45-50ms.

My current thoughts are as follows:

  • Pattern 1: This is "server processing time" so for some reason back-end server is taking longer than usual to respond. We will need to do deeper dive to figure out why.
  • Pattern 2: This pattern shows a long time to establish a TCP connection. Is there a way to determine if this is a problem on the outgoing side i.e. JMeter itself is running out of threads to make API connections, or if the API server is running out of connections and is unable to accept more?

How should I interpret these results? Are there any additional data points I could pull or tools I could use to better understand the findings?


Solution

  • Both Connect Time and Latency are network-related metrics, the formula is:

    Elapsed Time = Connect Time + Latency + Server Response time
    

    It looks like your server itself is no brainer, the problem is either on network level or connected with JMeter which might lack resources in order to send requests fast enough.

    With regards to additional information sources:

    1. Generate HTML Reporting Dashboard and look into "Over Time" charts. It should allow you to correlate increasing load with the increasing connect time / latency.
    2. Consider setting up monitoring of essential health metrics of JMeter load generator(s) and the application under test. You can use JMeter PerfMon Plugin for this.
    3. Make sure to follow JMeter Best Practices as JMeter default configuration is good for tests development and debugging and you need to perform fine tuning of JMeter for the high loads.