Search code examples
performance-testingjmeter-5.0

In JMeter Connect time apperas for certain records results in high elapsed time


I am running a JMeter test with 20 concurrent users (use kee alive is enabled). All 20 users with different login ids trying to login (1st test) and create a record(2nd test). While creating a record i observed most of the create records has connect time of '0' but certain records (say 5/20) has connect time of 21000 ms, so due to that elapsed time of 5 requests alone is so high compared to other 15 requests. Why its happening for 5 users alone ?


Solution

  • We don't know, according to JMeter Glossary

    Connect Time. JMeter measures the time it took to establish the connection, including SSL handshake. Note that connect time is not automatically subtracted from latency. In case of connection error, the metric will be equal to the time it took to face the error, for example in case of Timeout, it should be equal to connection timeout.

    So it's more a network metric which indicates how long did it take for JMeter to establish connection with the server.

    You need to check:

    1. Your network adapter statistics, it might be the case it doesn't have enough bandwidth to send 20 concurrent requests
    2. Your application connection pool settings, for example if it has 15 connections in the pool the remaining 5 will be put into queue and wait until a connection becomes available.
    3. Check your server baseline health metrics like CPU, RAM, etc. (it can be done using JMeter PerfMon Plugin) as it might be the case your server lacks resources to serve all connections at the same time
    4. Make sure to follow JMeter Best Practices as it might be the case JMeter is overloaded and cannot send requests fast enough