M_K
M_K

Reputation: 3455

Test Plan is not giving me accurate results

So I am wondering if someone can help me please, I am trying to load test a java rest application with thousands of requests per minute but something is a miss and I can't quite figure out what's happening.

I am executing the load test from my laptop (via terminal) and it's hitting a number of servers in AWS.

I am using the infinite loop function to fire in a lot of requests repeatedly. The 3 thread groups have the same config. enter image description here

The problem I am having is the CPU is rising very high and the numbers do not match on what I have in production with the same enviornment with regards to CPU etc, the JMeter load test seems to be making the CPU work harder on my test enviorment.

Question 1 - Is my load test too fast for the server?

Question 2 - Is there a way to space out the load test so that I can say 10k rpm exactly?

Upvotes: 0

Views: 35

Answers (2)

Dmitri T
Dmitri T

Reputation: 168072

  • Question 1 - Is my load test too fast for the server? - we don't know, if you see high CPU usage using 60 threads only and application responds slowly due to high CPU usage it looks like a bottleneck. Another question is the size of the machine, the number of processors and their frequency. So you need to find which function is consuming the CPU cycles using a profiler tool and look for the way to optimize the function

  • Question 2 - Is there a way to space out the load test so that I can say 10k rpm exactly? - it is, check out Constant Throughput Timer, but be aware of the next 2 facts:

    1. Constant Throughput Timer can only pause the threads to limit JMeter's requests execution speed to the specified number of requests per minute. So you need to make sure to create sufficient number of threads in Thread Group(s) to produce the desired load, 60 might be not enough.
    2. Application needs to be able to respond fast enough, i.e. 10000 requests per minute is approx 166 requests per second, with 60 threads it means that each thread needs to execute 2.7 requests per second which means that response time needs to be 370 ms or less

Upvotes: 1

Sajan Jacob K
Sajan Jacob K

Reputation: 524

There are different aspects before we got for 10k requests.

  1. Configure the tests for one user(/thread) and execute. Check for all the request we are getting a proper response.
  2. Incrementally increase the number of threads from 1 user, 5 users, 10 users, 20 users, 50 users etc.
  3. Try for different duration scenarios like 10mins, 20 mins, 30 mins, 1 hour etc.
  4. Collect metrics like error %, response time, number of request etc.. You can check probable breakpoints like: CPU utilisaztion of machine getting high(100 %) from where you are executing the tests. in this case, you can setup few machines in master-slave configuration error % getting high. Server may not be able to respond, so it might have crashed. response time getting high. server may be getting busy due to the load.

Also, make sure, you have a reliable connectivity and bandwidth. Just imagine, you want to give a huge load, but the connection you have in few kbps. your tests will fail due to this.

Upvotes: 0

Related Questions