Not able to achieve 2000RPS using constant arrival rate executors. Any suggestion?

Not able to achieve 2000RPS using constant arrival rate executors. Any suggestion?

my_api_test_constant_arr_rate_vu: { 
           executor: 'constant-arrival-rate',
           rate: 2000,
           duration: '1s',
           timeUnit: '1s',
           preAllocatedVUs: 2,
           maxVUs: 500,
        },

Output:

scenarios: (100.00%) 1 scenario, 500 max VUs, 31s max duration (incl. graceful stop):
           * my_api_test_constant_arr_rate_vu: 2000.00 iterations/s for 1s (maxVUs: 2-500, exec: getQuotes, gracefulStop: 30s)

running (01.4s), 000/348 VUs, 945 complete and 0 interrupted iterations
my_api_test_constant_arr_ra... ✓ [======================================] 000/348 VUs  1s  2000.00 iters/s

Hi @subhasis

Assuming the System Under Test can keep up with the load, you would probably need to set this up differently.

  • preAllocatedVUs: 2. The test will start with 2VUs, which might not be enough to reach the 2000 rps in 1s. And k6 will allocate more VUs up to maxVUs: 500, which will probably take more than 1 second.
  • duration: '1s' is probably too short anyway, even if you set preAllocatedVUs: 2000 which would start the 2000 iterations at the same time (if there are enough resources in the load generator).

I would recommend you have a read at:

You can try:

my_api_test_constant_arr_rate_vu: { 
           executor: 'constant-arrival-rate',
           rate: 2000,
           duration: '1s',
           timeUnit: '1s',
           preAllocatedVUs: 2000,
        },

Though the duration might be too short for the iterations to finish. And for that I would try increasing the duration. Based of course on what type of test you need to run, what you want to achieve.

I hope this helps.

Cheers!