How to maintain Concurrent Users in Gatling

How can I maintain concurrent users in Gatling. I can specify “X” number of users over “N” duration but that does not guarantee that a certain number of concurrent users will be maintained.
We are trying to move away from generating load from another tool. In the tool I can specify concurrent vusers and it would maintain that through the duration of test. Is there a way to ensure that in Gatling.

Thanks
Barun

Have you tried atOnceUsers instead of rampUsers? It’s in the cheat sheet http://gatling.io/#/cheat-sheet/2.2.3

Or do mean that you need to ramp up users, but not ramp down? If so, check out this post: https://groups.google.com/forum/#!msg/gatling/ya2W_sDxt9I/QjXxkKtu8loJ;context-place=searchin/gatling/no$20ramp$20down|sort:relevance

atOnceUsers will launch the desired number of users, but that does not guarantee that number of user are sustained.

I am looking at something like this…

Specify number of concurrent users
Specify the time for run

Based on above Gatling maintains number of concurrent users and keep executing script for duration specified. This is how we are currently specifying in another tool so I am guessing there must be a way to do that in Gatling.

I’m running into the same issue. atOnceUsers does not give me the duration needed for a test.

And any flavor I use of rampUsers or constantUsers (# of users and duration)…the resulting report charts show an unexpected spike in the number of concurrent users which is impacting the results of my test. For example if I say constant users (20) for duration (60 seconds). On the results report, I always see a 5-10 second spike in the number of concurrent users to approx. 40. For a short burst, it always seems to double the number of users I expect to see in that 60 second test.

Any thoughts?

I have the same issue. Other tools such as JMeter and Webload is not difficult to generate load like that because they basically runs scenario repeatedly for each virtual users. Gatling makes me to think a bit more difficult way to generate loads since it runs scenario once for a virtual user. The only way to mimic the repetition like other tools for me is to use loop statements of Gatling but it prevents me to migrate load test scripts to Gatling.

We solved this wrapping the chains with a forever loop

Cool. Can you share your code?