diff options
| author | Michael Klishin <michael@clojurewerkz.org> | 2020-02-18 21:04:14 +0300 |
|---|---|---|
| committer | Michael Klishin <michael@clojurewerkz.org> | 2020-02-18 21:04:14 +0300 |
| commit | 12571627a6089aa7d603e92b3e35745c8d398b3e (patch) | |
| tree | 7a73b216e96741afa49427d9989aa0462696f689 /src/rabbit.erl | |
| parent | a63606045dbf34c082ba3a12cb1f5113db8d6a6f (diff) | |
| download | rabbitmq-server-git-12571627a6089aa7d603e92b3e35745c8d398b3e.tar.gz | |
Import definitions concurrently
…or rather, import some definition categories concurrently,
namely users, virtual hosts, queues, exchanges and bindings.
For some workloads this leads to a 20% to 70% reduction
in definition import time. Note that for virtual hosts,
most of the creation process steps cannot be made concurrent
or significantly optimised without compromising the observed
atomicity of HTTP API and CLI operations, so concurrent
import both makes less of a difference and is the only
realistic way of speeding up the process for virtual hosts.
This introduces a dedicated work pool for import operations
to avoid overloading the default pool, in particular on node
boot when definitions can be imported concurrently with on disk
data recovery steps which use the default pool heavily.
Diffstat (limited to 'src/rabbit.erl')
| -rw-r--r-- | src/rabbit.erl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl index 0f98e50504..b1aee4248c 100644 --- a/src/rabbit.erl +++ b/src/rabbit.erl @@ -88,7 +88,7 @@ {enables, worker_pool}]}). -rabbit_boot_step({worker_pool, - [{description, "worker pool"}, + [{description, "default worker pool"}, {mfa, {rabbit_sup, start_supervisor_child, [worker_pool_sup]}}, {requires, pre_boot}, @@ -229,6 +229,11 @@ [{description, "ready to communicate with peers and clients"}, {requires, [core_initialized, recovery, routing_ready]}]}). +-rabbit_boot_step({definition_import_worker_pool, + [{description, "dedicated worker pool for definition import"}, + {mfa, {rabbit_definitions, boot, []}}, + {requires, pre_flight}]}). + -rabbit_boot_step({cluster_name, [{description, "sets cluster name if configured"}, {mfa, {rabbit_nodes, boot, []}}, |
