Not able to get RPS more than Users

123 views
Skip to first unread message

santosh shenoy

unread,
Aug 27, 2015, 10:24:35 PM8/27/15
to Gatling User Group
Hi,
I have started using gatling recently & seen this behaviour. To start with my application can scale upto 4000 tps which i have tested seperately using jmeter.
With gatling when i use 300 users, it translates to 300 RPS. When 400 users is used, translates to 400 rps and so on. Does it mean 1 user can return back only 1 rps? Would that mean i would need 4000 users to generate 4000rps?
Even with sync threads( of jmeter) 1 user was able to do close to 5 rps because my application takes about 200ms for 1 request.
Can you let me know what am i doing wrong here? I expect 300 users to translate to atleast 300*5( even if sync requests)

thank you,
santosh


package test
import io.gatling.core.Predef._ 
import io.gatling.http.Predef._
import scala.concurrent.duration._

class Delay_1sec  extends Simulation { 

  val httpConf = http 
      .baseURL("http://server:port") 


  val scn = scenario("ScenarioName")
      .exec(http("request_1")  // 8
      .post("/test-stub-restful/throttling-default/resources/employees/post_sizing?size=1&delay=1000")
      .body(StringBody("""{ "myContent": "my content" }""")).asJSON
      .header("Content-Type", "application/json")
   ) 
   
   setUp(
     scn.inject(constantUsersPerSec(300) during(900 seconds))
     .throttle(
      reachRps(4000) in (120 seconds),holdFor(900 seconds)
     ).protocols(httpConf)

 /*
 setUp(
       scn.inject(
                  rampUsersPerSec(1) to (300) during(90 seconds),
                  constantUsersPerSec(300) during(900 seconds)
                 )
                   .throttle(
                              reachRps(4000) in (120 seconds),
                              holdFor(900 seconds)
                            )
      ).protocols(httpConf)
 */

}

santosh shenoy

unread,
Aug 31, 2015, 1:42:39 PM8/31/15
to Gatling User Group
Hi,
Anyone had this issue and solved this?

thanks,
santosh

John Arrowwood

unread,
Sep 1, 2015, 12:47:59 PM9/1/15
to Gatling User Group
Gatling is doing exactly what you asked it to do.  You asked it to start 300 users per second.  Each user starts up, does exactly one transaction, and then exits.  Thus, if 300 transactions start per second, your requests per second are 300.  Make sense?

To get higher throughput, you either need to increase your number of users, or allow each user to do multiple requests.

Serega Sheypak

unread,
Sep 6, 2015, 12:38:20 PM9/6/15
to Gatling User Group
> allow each user to do multiple requests.
what is the right way to do it?

вторник, 1 сентября 2015 г., 18:47:59 UTC+2 пользователь John Arrowwood написал:

John Arrowwood

unread,
Sep 9, 2015, 1:25:44 PM9/9/15
to gat...@googlegroups.com

--
You received this message because you are subscribed to a topic in the Google Groups "Gatling User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gatling/aEXT4BuhZrE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gatling+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
John Arrowwood
503.863.4823

santosh shenoy

unread,
Oct 6, 2015, 2:02:11 PM10/6/15
to gat...@googlegroups.com
That i what i already did by including the thottle statement, right? I believe using 300 users and throttling to 4000RPS - Should have meant 300 users translating to 4000RPS. correct?

--

John Arrowwood

unread,
Oct 6, 2015, 2:14:24 PM10/6/15
to Gatling User Group
Throttle only injects pauses in order to SLOW DOWN to the specified rate.  It will not speed things up to reach it.  If you want 4,000 requests per second, and each user does one request, you will need to inject 4,000 users per second.
Reply all
Reply to author
Forward
0 new messages