Forráskód Böngészése

chore(config): Add new configs to emqx.conf

Zaiming Shi 4 éve
szülő
commit
4bdcdfb9b9
2 módosított fájl, 30 hozzáadás és 1 törlés
  1. 26 0
      etc/emqx.conf
  2. 4 1
      priv/emqx.schema

+ 26 - 0
etc/emqx.conf

@@ -2268,6 +2268,32 @@ broker.shared_dispatch_ack_enabled = false
 ## Value: Flag
 broker.route_batch_clean = off
 
+## Performance toggle for subscribe/unsubscribe wildcard topic
+## change this toggle only when there are many wildcard topics.
+## Value: Enum
+##  - key:   mnesia translational updates with per-key locks. recommended for single node setup.
+##  - tab:   mnesia translational updates with table lock. recommended for multi-nodes setup.
+##  - global: global lock protected updates. recommended for larger cluster.
+## NOTE: when changing from/to 'global' lock, it requires all nodes in the cluster
+## to be stopped before the change.
+# broker.perf.route_lock_type = key
+
+## Enable trie path compaction.
+## Enabling it significantly improves wildcard topic subscribe rate,
+## if wildcard topics have unique prefixes like: 'sensor/{{id}}/+/',
+## where ID is unique per subscriber.
+##
+## Topic match performance (when publishing) may degrade if messages
+## are mostly published to topics with large number of levels.
+##
+## NOTE: This is a cluster-wide configuration.
+## It rquires all nodes to be stopped before changing it.
+##
+## Value: Enum
+##  - true: enable trie path compaction
+##  - false: disable trie path compaction
+# broker.perf.trie_compaction = true
+
 ## CONFIG_SECTION_BGN=sys_mon ==================================================
 
 ## Enable Long GC monitoring. Disable if the value is 0.

+ 4 - 1
priv/emqx.schema

@@ -2255,7 +2255,7 @@ end}.
 ]}.
 
 %% @doc performance toggle for subscribe/unsubscribe wildcard topic
-%%      change this toggle only if you have many wildcard topics.
+%%      change this toggle only when there are many wildcard topics.
 %% key:   mnesia translational updates with per-key locks. recommended for single node setup.
 %% tab:   mnesia translational updates with table lock. recommended for multi-nodes setup.
 %% global: global lock protected updates. recommended for larger cluster.
@@ -2271,6 +2271,9 @@ end}.
 %%
 %% Topic match performance (when publishing) may degrade if messages
 %% are mostly published to topics with large number of levels.
+%%
+%% NOTE: This is a cluster-wide configuration.
+%% It rquires all nodes to be stopped before changing it.
 {mapping, "broker.perf.trie_compaction", "emqx.trie_compaction", [
   {default, true},
   {datatype, {enum, [true, false]}}