Migrate from ab

How can I write same codes as following?

a) ab -n 10000
b) ab -c 10 -n 10000

“rampUsers(10000) over(1 second)” means logically same?

I’d like to to know how long does it take to process 10k reqs.

Hi (again),

“ab -n 10000” => send 10.000 requests with one single connection (default c = 1)
“ab -c 10 -n 10000” => send 10.000 requests with 10 concurrent connections

I’d like to to know how long does it take to process 10k reqs.

One parameter is missing from your sentence: “with X connections”.
The number of concurrent connections you open and that your server has to handle is a huge factor, you have to configure it properly.

Gatling tries to mimic real users, ie browsers/user-agents. The consequence is that virtual users have by default their own connections and don’t share them.

If you write something like “rampUsers(80000) over(1 second)”, you’re trying to open 80.000 new connections in 1 second. I doubt you have a system capable to dealing with such a load.

“ab -n 10000” would be a repeat(10000) loop with only one user (atOnceUsers(1))

“ab -c 10 -n 10000” would be a repeat(1000) loop with 10 users (atOnceUsers(10)).

Get it?

Cheers,

Stéphane

Thanks for your quick response!

Our service currently has 150k unique user requests per minutes.
In this mean, the concurrency is 150k, and the scenario should be
“rampUsers(150000) over(60 second)”.

And then, we must consider a extreme case such as just after reboot.
We assume that “rampUsers(10000 to 50000) over(1 second)” at peak time.
Our system can’t serve these reqs. But it should be tested what happened.

Finally, we have a new scenario that how long does it take to serve all 150k reqs.
We’ll test many times with changing the concurrency(N) from 1000 to 10000 or higher.
Although this would be a bad style for gatling, I’m searching some injections like
“ab -c N -n 150000”. (without duration; ASAP?)

Do you use keep-alive?

2014年9月2日火曜日 0時31分17秒 UTC+9 Stéphane Landelle:

Do you use keep-alive?

No. It’s a polling api service. All requests are individual.

Thanks.

So first, you should check that your server properly responds with with “Connection: close” header.
If not, you really should disable connection pooling in gatling.conf.

Then, you have to realize that you have to provide 2 informations in one way or another (and adapt to Gatling way of doing thing, this is simply not ab).
If you don’t want to pass a duration, then use a loop just like it explained in one of my previous emails.

Hi, Stephane

2014年9月2日火曜日 0時51分54秒 UTC+9 Stéphane Landelle:

If not, you really should disable connection pooling in gatling.conf.

Oh, I forgot KA stuff! You saved me from wasting time to solve file descriptors issue.

Then, you have to realize that you have to provide 2 informations in one way or another (and adapt to Gatling way of doing thing, this is simply not ab).

Well, I’ll make the points clearly first. And then, go in gatling way!
Thanks a lot.