Skip to content

v3.5 Concurrency Model

Andrey Kurilov edited this page Sep 12, 2017 · 13 revisions

Unlimited Concurrency

Usually Mongoose is used to measure the rates/timings with given concurrency limit value. By default Mongoose's concurrency is 1. But it may be very useful to allow Mongoose to work with unlimited (as high as possible) concurrency level (concurrent connections, open files). Unlimited here doesn't mean infinite, because there are OS limits and the internal number representation size limit (32-bit signed integer).

Requirements

  1. Allow to disable the concurrency limit.
  2. Measure and report the actual concurrency level.

Limitations

  1. ulimit -n system setting (usually set to 1024). The OS will not allow to use more simultaneous connections than count. Set that system setting value to higher value if a higher concurrency level is required.

  2. It's not possible to set ulimit -n value to more than 1048576 on the most Linux systems. So single process can't use higher count of the simultaneous connections even if the ulimit -n is set to maximum possible value (1048576). Use distributed mode if a higher concurrency level is required.

  3. 32-bit signed integer limit. It's not possible to reach concurrency level more than 2,147,483,647. In practice, such high concurrency level is considered as unreachable and not useful for the performance measurement purposes (this will require also the distributed mode using at least 2048 separate storage drivers).

Configuration

To disable the concurrency limit it's enough to set the corresponding configuration parameter to 0:

java -jar mongoose-<VER>/mongoose.jar --load-limit-concurrency=0

Also, it should be useful to limit the load rate:

java -jar mongoose-<VER>/mongoose.jar --load-limit-concurrency=0 --load-limit-rate=1000

The last example will show how many simultaneous clients/users/connections can handle the service/storage under the test.

Reporting

The actual concurrency is reported as metric. See v3.5 Metrics Output documentation for details.

Clone this wiki locally