What are the concurrency semantics for running scenarios?

I had to build my own extension to support testing of one of our internal components.
The extension supports stateful, coordinated consumers pulling data from a proprietary system.

My implementation is essentially an implementation of an ExitableAction, where execute(..) creates a future on a dedicated ExecutionContext (with an arbitrarily high number of threads).
The future completion has some very basic throttle logic and calls next ! session.

if (throttled) {
  coreComponents.throttler.throttle(session.scenario, () => next ! session)
} else {
  next ! session

One of the coordination actions needs to take place on all the consumers, and cannot complete until confirmation is received from all the consumers.
When I increase the number of consumers (past 32), I see 32 consumers respond to this request correctly, and consumers in excess of 32 do nothing… until the previous 32 complete.
This breaks our test, as I cannot increase the number of coordinated consumers beyond 32.

The behaviour that I’m seeing only manifests when there are more than 32 users running a scenario that use this action…
My server has 32 cores, which may/may-not be a coincidence; I have not tested it on a machine with fewer cores.

Its also interesting to note that multiple (different) scenarios with a total of more than 32 users’ do not have this problem; it seems to be limited when I have > 32 users for the same scenario.

Is there any limit in gatling that would prevent more than some number of scenario-users’ being active, or waiting on a action-response simultaneously?
If so… how do I tweak it?

Thank you in advance.

  • Jon

Sorry, no idea what you do.
What I can say for sure is that:

  • there isn’t such limitation in Gatling itself, the issue is with your code
  • throttling is not a correct mechanism. This is something we ended up implementing because people kept on asking for something similar to JMeter Plugin’s Ultimate ThreadGroup. You should be controlling throughput with the injection profile.

Sorry, no idea what you do.
I’m trying to run an arbitrarily high number users, running the same scenario, but am only ever seeing 32 Actions running concurrently.
I was hoping there was a secret semaphore hiding somewhere that would limit the number of concurrent, incomplete Actions.

throttling is not a correct mechanism
Should I ignore the ScenarioContext.throttled value entirely? (I have never seen the value “true”, in any case.)

I guess I’ll keep digging.