Specify ramp up vus but keep total number of request fixed

We want to migrate from jmeter to k6, but unable to find substitute in k6 for the following setting in jmeter:
Number of Threads (Users): 500
Ramp-up period : 60 seconds
Loop count : 2
Specifically we wan to keep total number of request exactly to 500 but reaching it via ramping up in 60s.

Hi @emanzaman88,

Welcome to our community, thanks for sharing your question here :tada:

Specifically we want to keep total number of request exactly to 500 but reaching it via ramping up in 60s.

I’m sorry, but I cannot fully understand what’s the behavior you would like to observe.
Could you please explain it a bit more in detail, please?

For instance, some questions I have are:

  • Why would you like to ramp up to 500VUs, if you want to achieve 500 request in total? Depending on the “rate”, and how long a request takes, probably a single VU is more than enough to reach that number.
  • In case of a ramp up to 500VUs, what’s the “increase rate” of VUs you expect, like ~8 additional VUs every second?
  • Are you expecting to reach a target rate of RPS? Because my feeling is that, defining the load test as you described above, you cannot define that in a reproducible way, because it really depends on how long each request takes and how long it takes to initialize each VU (which depends on the test script).

Overall, my feeling is that it won’t be possible to reproduce exactly the same behavior you described with JMeter. So, what I would recommend you is to use the ramping-vus executor, which has the capacity of progressively ramp-up the amount of VUs, in combination with xk6-atomic to set a counter and “abort” (early return) the test once you reached the total amount of request you’re looking for (e.g. 500).

I hope that helps! :bowing_man:
Please, let me know if there’s anything else I can help you with!

hi @emanzaman88

In K6 have a options of the name ramping-arrival-rate wich use VUs with average of the resquests in your application.

documentation: Ramping arrival rate | Grafana k6 documentation

I hope that helps!
Please, let me know if there’s anything else I can help you with!