How to determine the maximum number of connections to the Web site using Apache Jmeter

3.2k views Asked by At

With the help of Apache Jmeter we can test our web services, applications, etc. My goal was to set the maximum number of connections that server can response on them. At apache Jmeter i created Thread Group then at Sampler added Http Request and added Table to watch the result. My principal told that server can work with maximum 15-20 users. so i set 20 threads and set forever loop, i was surprised watched on the result table, server responed all packages were sent, no errors occured. The same with 100 connection. But then i added 300 connections and started to test it again i saw in table that beggining with 16 sampler errors were occuring (so this mean that site is crashing,right?) but why it doesn't crash when i set 20 threads?? Maybe the reason is that all http requests are not taking the same time? How to determine peak?

1

There are 1 answers

0
Dmitri T On BEST ANSWER

I guess that your threads are doing something very short so in case of 16+ concurrent threads you're receiving errors.

When you use 20 threads only it's likely that you run into situation that some tests have already finished their work and others haven't been started yet.

There are some techniques to control behavior.

  1. Increase loops number in Thread Group (or put your logic under Loop Controller) and play with Ramp-Up Period to simulate increasing load.
  2. Use Synchronizing Timer to assure that given number of threads will be fired at the same moment
  3. Use Constant Throughput Timer to set exact load (requests per second) for your site.