How to maintain Concurrent Users in Gatling

1,819 views
Skip to first unread message

Barun Yadav

unread,
Dec 18, 2016, 9:41:08 PM12/18/16
to Gatling User Group
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

Luke Grantham

unread,
Dec 19, 2016, 4:53:36 PM12/19/16
to Gatling User Group
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%7Csort:relevance

Barun Yadav

unread,
Dec 19, 2016, 5:46:51 PM12/19/16
to Gatling User Group
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.

demigr...@gmail.com

unread,
Feb 16, 2017, 3:11:37 PM2/16/17
to Gatling User Group
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? 

Kevin

unread,
Feb 17, 2017, 9:04:49 PM2/17/17
to Gatling User Group
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.    

Lorenzo Urbini

unread,
Feb 19, 2017, 2:49:48 AM2/19/17
to Gatling User Group
We solved this wrapping the chains with a forever loop

Kevin

unread,
Feb 19, 2017, 2:55:53 AM2/19/17
to Gatling User Group
Cool. Can you share your code?
Reply all
Reply to author
Forward
0 new messages