InPhamouZ
InPhamouZ

Reputation: 51

Gatling performance Testing: TPS is much lower than Jmeter's TPS

I am currently using Jmeter for API Performance Testing, but recently I started to look into Gatling as a potential replacement of Jmeter. Below is the PoC I'm doing for Gatling but I notice the performance result is very different.

Setup:
where we hit a https endpoint with a concurrent user of 10 for 60 seconds.

Results
Jmeter: 10 threads (no ramp up), 60 seconds
Result: 150 TPS

Gatling: 10 concurrent users, also 60 seconds
Result: 27 TPS(cnt/s?)

Question:
first I want to confirm the terminology of Gatling; in Gatling result chart, I see a column named "mean cnt/s" I hovered over it and it says "count of event per second", I imagine that's the same thing as Jmeter's TPS?

Jmeter:
summary + 2386 in 00:00:16 = 153.1/s Avg
Gatling:
Mean cnt/s: 26.652

if above assumption is correct, can someone share some insight on why Gatling's number is much lower than Jmeter's?

Thank You!

Upvotes: 0

Views: 547

Answers (2)

Alex Karamfilov
Alex Karamfilov

Reputation: 674

Many things can cause deviations. I assume you use the same setup for both in terms of load generator/target insance. You can start with fixed number of requests first. Use loops in Jmeter and repeat in Gatling. Sending for example 60 x 10 = 600 requests in total. Gatling will be able to generate much higher load than Jmeter if properly used.

Upvotes: 0

Stéphane LANDELLE
Stéphane LANDELLE

Reputation: 6623

Gatling: 10 concurrent users, also 60 seconds

Do you understand what this does? This is going to spawn a new user every time an existing one finishes, and hence create new connections. Assuming it takes 100ms for a virtual user to complete the scenario, you're going to spawn 101060 = 6,000 virtual users and as many connections. Is that really what you want and is it the same thing as you do with JMeter?

If you actually want the same 10 users to loop for 60 seconds, you have to inject atOnceUsers(10) and add a during(60) loop in your scenario.

https://gatling.io/docs/gatling/reference/current/core/injection/#open-model https://gatling.io/docs/gatling/reference/current/core/scenario/#loop-statements

Upvotes: 2

Related Questions