Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An actorless load generator #852

Closed
danielmitterdorfer opened this issue Dec 20, 2019 · 2 comments · Fixed by #916 or #935
Closed

An actorless load generator #852

danielmitterdorfer opened this issue Dec 20, 2019 · 2 comments · Fixed by #916 or #935
Labels
enhancement Improves the status quo :Load Driver Changes that affect the core of the load driver such as scheduling, the measurement approach etc. meta A high-level issue of a larger topic which requires more fine-grained issues / PRs

Comments

@danielmitterdorfer
Copy link
Member

At the moment Rally uses a process per client model (see #9 (comment), #58 and fe5dba3 for more details) and implements this with an actor system that allows clients (actors) to communicate with each other. The basic structure is that there is a controller actor (called Driver) for all clients and each client (actor) is responsible to execute scheduled tasks. However, this has several drawbacks that we've seen in practice:

  • Complexity added by the actor framework: we need to spin up a separate process to communicate across nodes. Having the ability to communicate across nodes was mostly needed to spin up a cluster from the coordinator machine (where the benchmark has been started) but is less important for the load generator (although we also use it to distribute it across several machines). This was convenient in the early days but nowadays we let other tools handle remote connections during setup (e.g. Ansible) and use Rally only to setup the individual nodes. Thus we don't need an actor system as much as we did before.
  • Terminal output issues (the actor system performs a double-fork and thus we cannot write to the terminal)
  • Issues to even startup the system on Windows that are hard to debug.
  • Limit on the upper bound of supported clients (the whole system is just hanging if there are too many actors).
  • Logging issues: logs are sent to a central component which then writes to the log file. If one actor issues too many logs, the actor system just becomes unresponsive (which is quite hard to debug because there are no logs to begin with).
  • Debugging actor issues is quite tricky and we don't have much influence over what is logged.

Note that these limitations are due to the specific actor system implementation, and not necessarily conceptual issues. There are, however, also shortcomings that can be related to the process per client model:

  • There is no built-in mechanism for clients to share state (this is not technically impossible, it's just a bit harder than with a single process model). Sharing state can be sometimes convenient e.g. if in an initial step, data is retrieved from Elasticsearch and then we can use this information in later steps. This is done for example by the eventdata track that retrieves the minimum and maximum date of log entries in Elasticsearch and uses it to choose appropriate date range parameters for simulating dashboard queries in later steps.
  • Starting a process for each client is quite heavy-weight and thus it's not feasible to simulate thousands of clients with Rally.

We should explore a few options based on these shortcomings:

There are maybe other options as well but these are the choices that first come to mind. We should also refine this ticket as we proceed with our analysis.

IMHO it is ok to support only one load generator machine in the first step but we should aim to support the Rally tracks that we currently maintain.

@danielmitterdorfer danielmitterdorfer added enhancement Improves the status quo meta A high-level issue of a larger topic which requires more fine-grained issues / PRs :Load Driver Changes that affect the core of the load driver such as scheduling, the measurement approach etc. discuss Needs further clarification from the team labels Dec 20, 2019
@danielmitterdorfer danielmitterdorfer self-assigned this Jan 23, 2020
@danielmitterdorfer danielmitterdorfer removed the discuss Needs further clarification from the team label Feb 10, 2020
danielmitterdorfer added a commit to danielmitterdorfer/rally-tracks that referenced this issue Feb 20, 2020
Due to elastic/rally#852 we will implement a compatibility layer in the
current load generator that will also use the asyncio API and thus
requires custom runners to be registered differently (by specifying
`async_runner=True`). Rally's runner registry will also expose a new
attribute `async_runner` that is set to `True` if Rally requires runners
to be registered as described above.

With this commit we introduce a (temporary) compatibility layer for all
custom runners that allows older Rally versions to work with the classic
runners and newer Rally versions with the async runners.

Relates elastic/rally#852
danielmitterdorfer added a commit to danielmitterdorfer/rally-eventdata-track that referenced this issue Feb 20, 2020
Due to elastic/rally#852 we will implement a compatibility layer in the
current load generator that will also use the asyncio API and thus
requires custom runners to be registered differently (by specifying
`async_runner=True`). Rally's runner registry will also expose a new
attribute `async_runner` that is set to `True` if Rally requires runners
to be registered as described above.

With this commit we introduce a (temporary) compatibility layer for all
custom runners that allows older Rally versions to work with the classic
runners and newer Rally versions with the async runners.

Relates elastic/rally#852
danielmitterdorfer added a commit to danielmitterdorfer/rally-eventdata-track that referenced this issue Feb 20, 2020
Due to elastic/rally#852 we will implement a compatibility layer in the
current load generator that will also use the asyncio API and thus
requires custom runners to be registered differently (by specifying
`async_runner=True`). Rally's runner registry will also expose a new
attribute `async_runner` that is set to `True` if Rally requires runners
to be registered as described above.

With this commit we introduce a (temporary) compatibility layer for all
custom runners that allows older Rally versions to work with the classic
runners and newer Rally versions with the async runners.

Relates elastic/rally#852
danielmitterdorfer added a commit to elastic/rally-eventdata-track that referenced this issue Feb 21, 2020
Due to elastic/rally#852 we will implement a compatibility layer in the
current load generator that will also use the asyncio API and thus
requires custom runners to be registered differently (by specifying
`async_runner=True`). Rally's runner registry will also expose a new
attribute `async_runner` that is set to `True` if Rally requires runners
to be registered as described above.

With this commit we introduce a (temporary) compatibility layer for all
custom runners that allows older Rally versions to work with the classic
runners and newer Rally versions with the async runners.

Relates elastic/rally#852
Relates elastic/rally#916
danielmitterdorfer added a commit to elastic/rally-eventdata-track that referenced this issue Feb 21, 2020
Due to elastic/rally#852 we will implement a compatibility layer in the
current load generator that will also use the asyncio API and thus
requires custom runners to be registered differently (by specifying
`async_runner=True`). Rally's runner registry will also expose a new
attribute `async_runner` that is set to `True` if Rally requires runners
to be registered as described above.

With this commit we introduce a (temporary) compatibility layer for all
custom runners that allows older Rally versions to work with the classic
runners and newer Rally versions with the async runners.

Relates elastic/rally#852
Relates elastic/rally#916
danielmitterdorfer added a commit to elastic/rally-tracks that referenced this issue Feb 21, 2020
Due to elastic/rally#852 we will implement a compatibility layer in the
current load generator that will also use the asyncio API and thus
requires custom runners to be registered differently (by specifying
`async_runner=True`). Rally's runner registry will also expose a new
attribute `async_runner` that is set to `True` if Rally requires runners
to be registered as described above.

With this commit we introduce a (temporary) compatibility layer for all
custom runners that allows older Rally versions to work with the classic
runners and newer Rally versions with the async runners.

Relates elastic/rally#852
Relates elastic/rally#916
danielmitterdorfer added a commit to elastic/rally-tracks that referenced this issue Feb 21, 2020
Due to elastic/rally#852 we will implement a compatibility layer in the
current load generator that will also use the asyncio API and thus
requires custom runners to be registered differently (by specifying
`async_runner=True`). Rally's runner registry will also expose a new
attribute `async_runner` that is set to `True` if Rally requires runners
to be registered as described above.

With this commit we introduce a (temporary) compatibility layer for all
custom runners that allows older Rally versions to work with the classic
runners and newer Rally versions with the async runners.

Relates elastic/rally#852
Relates elastic/rally#916
danielmitterdorfer added a commit to elastic/rally-tracks that referenced this issue Feb 21, 2020
Due to elastic/rally#852 we will implement a compatibility layer in the
current load generator that will also use the asyncio API and thus
requires custom runners to be registered differently (by specifying
`async_runner=True`). Rally's runner registry will also expose a new
attribute `async_runner` that is set to `True` if Rally requires runners
to be registered as described above.

With this commit we introduce a (temporary) compatibility layer for all
custom runners that allows older Rally versions to work with the classic
runners and newer Rally versions with the async runners.

Relates elastic/rally#852
Relates elastic/rally#916
danielmitterdorfer added a commit to elastic/rally-tracks that referenced this issue Feb 21, 2020
Due to elastic/rally#852 we will implement a compatibility layer in the
current load generator that will also use the asyncio API and thus
requires custom runners to be registered differently (by specifying
`async_runner=True`). Rally's runner registry will also expose a new
attribute `async_runner` that is set to `True` if Rally requires runners
to be registered as described above.

With this commit we introduce a (temporary) compatibility layer for all
custom runners that allows older Rally versions to work with the classic
runners and newer Rally versions with the async runners.

Relates elastic/rally#852
Relates elastic/rally#916
danielmitterdorfer added a commit to elastic/rally-tracks that referenced this issue Feb 21, 2020
Due to elastic/rally#852 we will implement a compatibility layer in the
current load generator that will also use the asyncio API and thus
requires custom runners to be registered differently (by specifying
`async_runner=True`). Rally's runner registry will also expose a new
attribute `async_runner` that is set to `True` if Rally requires runners
to be registered as described above.

With this commit we introduce a (temporary) compatibility layer for all
custom runners that allows older Rally versions to work with the classic
runners and newer Rally versions with the async runners.

Relates elastic/rally#852
Relates elastic/rally#916
danielmitterdorfer added a commit to elastic/rally-tracks that referenced this issue Feb 21, 2020
Due to elastic/rally#852 we will implement a compatibility layer in the
current load generator that will also use the asyncio API and thus
requires custom runners to be registered differently (by specifying
`async_runner=True`). Rally's runner registry will also expose a new
attribute `async_runner` that is set to `True` if Rally requires runners
to be registered as described above.

With this commit we introduce a (temporary) compatibility layer for all
custom runners that allows older Rally versions to work with the classic
runners and newer Rally versions with the async runners.

Relates elastic/rally#852
Relates elastic/rally#916
danielmitterdorfer added a commit that referenced this issue Mar 8, 2020
With this commit we add a new experimental subcommand `race-aync` to Rally. It
allows to specify significantly more clients than the current `race` subcommand.
The reason for this is that under the hood, `race-async` uses `asyncio` and runs
all clients in a single event loop. Contrary to that, `race` uses an actor
system under the hood and maps each client to one process.

As the new subcommand is very experimental and not yet meant to be used broadly,
there is no accompanying user documentation in this PR. Instead, we plan to
build on top of this PR and expand the load generator to take advantage of
multiple cores before we consider this usable in production (it will likely keep
its experimental status though).

In this PR we also implement a compatibility layer into the current load
generator so both work internally now with `asyncio`. Consequently, we have
already adapted all Rally tracks with a backwards-compatibility layer (see
elastic/rally-tracks#97 and rally-eventdata-track#80).

Closes #852
danielmitterdorfer added a commit that referenced this issue Mar 29, 2020
With this commit we add a new experimental subcommand `race-aync` to Rally. It
allows to specify significantly more clients than the current `race` subcommand.
The reason for this is that under the hood, `race-async` uses `asyncio` and runs
all clients in a single event loop. Contrary to that, `race` uses an actor
system under the hood and maps each client to one process.

As the new subcommand is very experimental and not yet meant to be used broadly,
there is no accompanying user documentation in this PR. Instead, we plan to
build on top of this PR and expand the load generator to take advantage of
multiple cores before we consider this usable in production (it will likely keep
its experimental status though).

In this PR we also implement a compatibility layer into the current load
generator so both work internally now with `asyncio`. Consequently, we have
already adapted all Rally tracks with a backwards-compatibility layer (see
elastic/rally-tracks#97 and elastic/rally-eventdata-track#80).

Closes #852
Relates #916
@danielmitterdorfer
Copy link
Member Author

Reopening as our current multi-core implementation in #944 still uses the actor system.

@danielmitterdorfer danielmitterdorfer removed their assignment Apr 29, 2020
@danielmitterdorfer
Copy link
Member Author

Closing as we have no intention of changing this in the foreseeable future (this may change in the far future though).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improves the status quo :Load Driver Changes that affect the core of the load driver such as scheduling, the measurement approach etc. meta A high-level issue of a larger topic which requires more fine-grained issues / PRs
Projects
None yet
1 participant