Skip to content

0005 multi threaded parallel execution

nehashri edited this page Sep 25, 2017 · 1 revision

5. Multi-threaded parallel execution

This ADR has been recorded retrospectively.

Status

Accepted

Context

Parallel execution spins off a new runner process for each parallel stream. A new runner process can consume a lot of memory.

Decision

To reduce this, multi-threading has to be introduced. Instead of starting a new runner process, use the same runner. The runner can use multi-threading for parallel run of specs.
The runner can be initialized with multiple ports through which it can connect to gauge. One for each parallel stream.

Consequences

A runner process is started during validation stage. During validation stage, we would not know how many parallel streams needs to be created. Hence, the runner process is started with only one port connection. This runner process is killed by gauge and a new process is initialized with multiple port connections.
Currently this functionality exists only in java runner.
Datastores made thread safe.