From e1456c1c0434413cbc5276d2eaaee217122e4ea8 Mon Sep 17 00:00:00 2001 From: Serge Tupchii Date: Tue, 12 Sep 2023 22:28:46 +0300 Subject: [PATCH] feat(emqx_conf_schema): add node.default_bootstrap_batch_size config parameter --- apps/emqx_conf/src/emqx_conf_schema.erl | 10 ++++++++++ rel/i18n/emqx_conf_schema.hocon | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/apps/emqx_conf/src/emqx_conf_schema.erl b/apps/emqx_conf/src/emqx_conf_schema.erl index 94cdd2ecd..c5ae33f1d 100644 --- a/apps/emqx_conf/src/emqx_conf_schema.erl +++ b/apps/emqx_conf/src/emqx_conf_schema.erl @@ -674,6 +674,16 @@ fields("node") -> default => #{} } )}, + {"default_bootstrap_batch_size", + sc( + pos_integer(), + #{ + mapping => "mria.bootstrap_batch_size", + importance => ?IMPORTANCE_HIDDEN, + default => 500, + desc => ?DESC(db_default_bootstrap_batch_size) + } + )}, {"broker_pool_size", sc( pos_integer(), diff --git a/rel/i18n/emqx_conf_schema.hocon b/rel/i18n/emqx_conf_schema.hocon index 442df1fa8..547acd607 100644 --- a/rel/i18n/emqx_conf_schema.hocon +++ b/rel/i18n/emqx_conf_schema.hocon @@ -776,6 +776,16 @@ the default is to use the value set in db.default_shard_transport." db_shard_transports.label: """Shard Transports""" +db_default_bootstrap_batch_size.desc: +"""The number of built-in database table records to be pushed in one chunk from a core node to a replicant node during bootstrap. +The bootstrapping occurs when a new replicant node is added to the cluster or an existing replicant node reconnects to a core one. +Increasing this value may greatly reduce a replicant node startup time, especially when EMQX cluster interconnect network latency is high +and EMQX built-in database holds large amount of data, e.g. when the number of subscriptions is high. +Defaults to 500.""" + +db_default_bootstrap_batch_size.label: +"""Default Bootstrap Batch Size""" + node_broker_pool_size.desc: """The number of workers in emqx_broker pool. Increasing this value may improve performance by enhancing parallelism, especially when EMQX cluster interconnect network latency is high.