Skip to content
Advertisement

Gatling constant concurrent users request per second

I am running gatling script to measure my api performance. Below is the configuration which ramps up the user from 0 to 100 and eventually reaches 400 . Is is true to say in last step constantConcurrentUsers(400) 400 request called per second . Is below script calling 400 request/sec in last step ?

rampConcurrentUsers(0) to 100 during (1 minute),
constantConcurrentUsers(100) during (2 minute),
rampConcurrentUsers(100) to 200 during (1 minute),
constantConcurrentUsers(200) during (2 minute),
rampConcurrentUsers(200) to 300 during (1 minute),
constantConcurrentUsers(300) during (2 minute),
rampConcurrentUsers(300) to 400 during (1 minute),
constantConcurrentUsers(400) during (2 minute)

Advertisement

Answer

Absolutely not. Please read the documentation about injection models.

A closed workload model injection will guarantee the number of concurrent users, not the throughput.

For example, assuming scenario is 1 single request and response time is 250ms, 400 concurrent users would mean 400 * 4 = 1,600 requests per second (each virtual user perform 1 request in 250 ms, then is replaced with another one).

As explained in the documentation, closed workload models are definitely NOT the default to go.

You should design your injection profile and your scenario in order to match:

  • your expected throughput
  • AND your expected number of connections
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement