From a71486cac7545f8155dab9c1db6f635eb5e41ba9 Mon Sep 17 00:00:00 2001 From: Feng Lee Date: Fri, 17 Jan 2020 09:32:01 +0800 Subject: [PATCH] Tuning the number of threads in async thread pool (#3193) --- etc/emqx.conf | 2 +- etc/vm.args | 15 ++++++++++----- priv/emqx.schema | 1 - 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/etc/emqx.conf b/etc/emqx.conf index 1564ed73d..0c4ea81a5 100644 --- a/etc/emqx.conf +++ b/etc/emqx.conf @@ -211,7 +211,7 @@ node.data_dir = {{ platform_data_dir }} ## Value: 0-1024 ## ## vm.args: +A Number -node.async_threads = 32 +## node.async_threads = 4 ## Sets the maximum number of simultaneously existing processes for this ## system if a Number is passed as value. diff --git a/etc/vm.args b/etc/vm.args index 43e6467d9..a32619be1 100644 --- a/etc/vm.args +++ b/etc/vm.args @@ -1,6 +1,6 @@ -############################## -# Erlang VM Args -############################## +###################################################################### +## Erlang VM Args +###################################################################### ## NOTE: ## @@ -52,7 +52,8 @@ +spp true ## Sets the number of threads in async thread pool. Valid range is 0-1024. -#+A 8 +## Increase the parameter if there are many simultaneous file I/O operations. ++A 4 ## Sets the default heap size of processes to the size Size. #+hms 233 @@ -92,4 +93,8 @@ #+sct L0-3c0-3p0N0:L4-7c0-3p1N1 ## Sets the mapping of warning messages for error_logger -#+W w \ No newline at end of file +#+W w + +## Specifies how long time (in milliseconds) to spend shutting down the system. +## See: http://erlang.org/doc/man/erl.html +#-shutdown_time 15000 diff --git a/priv/emqx.schema b/priv/emqx.schema index 642da69a2..a6966f0a5 100644 --- a/priv/emqx.schema +++ b/priv/emqx.schema @@ -235,7 +235,6 @@ end}. %% @doc More information at: http://erlang.org/doc/man/erl.html {mapping, "node.async_threads", "vm_args.+A", [ - {default, 64}, {datatype, integer}, {validators, ["range:0-1024"]} ]}.