HiFirst of all I want to say that this tool is really amazing and I like it very much. After JMeter it looks brilliant ).
All works well when you try to simulate small amount of concurrent users. But if we are talking about thousands than got some weird behavior.
I want to simulate ramp up load strategy but using “constantUsersPerSec” method.
Here is my test
`
class AmazonScalingTest extends BaseTest {
val httpProtocol = http
.baseURL(config.getString(“url”))
.userAgentHeader(“Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0”)
.contentTypeHeader(“application/json; charset=UTF-8”)
.connection(“keep-alive”)
.shareConnections
.disableWarmUp
var addUsers = config.getInt(“users”)/10
var intervalTime = config.getInt(“time”)/10
var steps = new ListBufferInjectionStep
for {
i ← 1 to 10
} steps += constantUsersPerSec(addUsers*i) during (intervalTime minutes)
val scn = scenario(“Amazon scaling test.”)
.exec(http(“promotions search”)
.get("/customer/promotions/search")
.check(status.is(200)))
setUp(scn.inject( steps )).protocols(httpProtocol)
}
`
I’ve ran it with next parameters : users - 3000, time - 360
Here my results
The problem is that Active Users goes to 100k what is not very good as for me. Why Gatling generates so many connections?
Here for example how looks “rampUsersPerSec” method for same request. But test much shorter - 1 minute and 5k users.
As you see number of Active Users is much better. I was expecting near same increment of users for “constantUsersPerSec” method. Did I do smth wrong?
I have found only one way to limit number of Active Users - to use “atOnceUsers” in specific way like this :
`
class SearchPromotionsAtOnce extends BaseTest {
val latitude = “40.747290” ;
val longitude = “-73.986667” ;
val scn = scenario(“Customer search test.”).during(config.getInt(“users”) minutes) {
.exec(http(“promotions search”)
.get("/customer/promotions/search")
.check(status.is(200)))
}
setUp(scn.inject(atOnceUsers(config.getInt(“users”))).protocols(httpProtocol))
}
`
Does anybody have ideas on this?
P.S.
Gatling - 2.1.7
Env - test was ran at Linux Jenkins slave
Java - 1.8