Move all vm args into separate file vm.args
This commit is contained in:
parent
14abbf96db
commit
68a6a88eb9
|
@ -160,47 +160,6 @@ node.name = emqx@127.0.0.1
|
||||||
## Value: String
|
## Value: String
|
||||||
node.cookie = emqxsecretcookie
|
node.cookie = emqxsecretcookie
|
||||||
|
|
||||||
## Sets the maximum number of simultaneously existing processes for this
|
|
||||||
## system if a Number is passed as value.
|
|
||||||
##
|
|
||||||
## See: http://erlang.org/doc/man/erl.html
|
|
||||||
##
|
|
||||||
## Value: Number [1024-134217727]
|
|
||||||
##
|
|
||||||
## vm.args: +P Number
|
|
||||||
node.process_limit = 256000
|
|
||||||
|
|
||||||
## Sets the maximum number of simultaneously existing ports for this system.
|
|
||||||
##
|
|
||||||
## See: http://erlang.org/doc/man/erl.html
|
|
||||||
##
|
|
||||||
## Value: Number [1024-134217727]
|
|
||||||
##
|
|
||||||
## vm.args: +Q Number
|
|
||||||
node.max_ports = 256000
|
|
||||||
|
|
||||||
## Crash dump log file.
|
|
||||||
##
|
|
||||||
## Value: Log file
|
|
||||||
node.crash_dump = {{ platform_log_dir }}/crash.dump
|
|
||||||
|
|
||||||
## Specify the erlang distributed protocol.
|
|
||||||
##
|
|
||||||
## Value: Enum
|
|
||||||
## - inet_tcp: the default; handles TCP streams with IPv4 addressing.
|
|
||||||
## - inet6_tcp: handles TCP with IPv6 addressing.
|
|
||||||
## - inet_tls: using TLS for Erlang Distribution.
|
|
||||||
##
|
|
||||||
## vm.args: -proto_dist inet_tcp
|
|
||||||
node.proto_dist = inet_tcp
|
|
||||||
|
|
||||||
## Specify SSL Options in the file if using SSL for Erlang Distribution.
|
|
||||||
##
|
|
||||||
## Value: File
|
|
||||||
##
|
|
||||||
## vm.args: -ssl_dist_optfile <File>
|
|
||||||
## node.ssl_dist_optfile = {{ platform_etc_dir }}/ssl_dist.conf
|
|
||||||
|
|
||||||
## Sets the port range for the listener socket of a distributed Erlang node.
|
## Sets the port range for the listener socket of a distributed Erlang node.
|
||||||
## Note that if there are firewalls between clustered nodes, this port segment
|
## Note that if there are firewalls between clustered nodes, this port segment
|
||||||
## for nodes’ communication should be allowed.
|
## for nodes’ communication should be allowed.
|
||||||
|
|
|
@ -0,0 +1,93 @@
|
||||||
|
##############################
|
||||||
|
# Erlang VM Args
|
||||||
|
##############################
|
||||||
|
|
||||||
|
## NOTE:
|
||||||
|
## Basic args like '-name' and '-setcookie' should be configured in emqx.conf
|
||||||
|
## If they are configured in both file, the args configured in emqx.conf will
|
||||||
|
## be used.
|
||||||
|
|
||||||
|
## Sets the maximum number of simultaneously existing processes for this system.
|
||||||
|
+P 256000
|
||||||
|
|
||||||
|
## Sets the maximum number of simultaneously existing ports for this system.
|
||||||
|
+Q 262144
|
||||||
|
|
||||||
|
## Sets the maximum number of ETS tables
|
||||||
|
+e 256000
|
||||||
|
|
||||||
|
## Sets the maximum number of atoms the virtual machine can handle.
|
||||||
|
#+t 1048576
|
||||||
|
|
||||||
|
## Set the location of crash dumps
|
||||||
|
-env ERL_CRASH_DUMP {{ platform_log_dir }}/crash.dump
|
||||||
|
|
||||||
|
## Set how many times generational garbages collections can be done without
|
||||||
|
## forcing a fullsweep collection.
|
||||||
|
#-env ERL_FULLSWEEP_AFTER 1000
|
||||||
|
|
||||||
|
## Heartbeat management; auto-restarts VM if it dies or becomes unresponsive
|
||||||
|
## (Disabled by default..use with caution!)
|
||||||
|
#-heart
|
||||||
|
|
||||||
|
## Specify the erlang distributed protocol.
|
||||||
|
## Can be one of: inet_tcp, inet6_tcp, inet_tls
|
||||||
|
#-proto_dist inet_tcp
|
||||||
|
|
||||||
|
## Specify SSL Options in the file if using SSL for Erlang Distribution.
|
||||||
|
## Used only when -proto_dist set to inet_tls
|
||||||
|
#-ssl_dist_optfile {{ platform_etc_dir }}/ssl_dist.conf
|
||||||
|
|
||||||
|
## Specifies the net_kernel tick time in seconds.
|
||||||
|
## This is the approximate time a connected node may be unresponsive until
|
||||||
|
## it is considered down and thereby disconnected.
|
||||||
|
#-kernel net_ticktime 60
|
||||||
|
|
||||||
|
## Sets the distribution buffer busy limit (dist_buf_busy_limit).
|
||||||
|
+zdbbl 8192
|
||||||
|
|
||||||
|
## Sets default scheduler hint for port parallelism.
|
||||||
|
+spp true
|
||||||
|
|
||||||
|
## Sets the number of threads in async thread pool. Valid range is 0-1024.
|
||||||
|
+A 8
|
||||||
|
|
||||||
|
## Sets the default heap size of processes to the size Size.
|
||||||
|
#+hms 233
|
||||||
|
|
||||||
|
## Sets the default binary virtual heap size of processes to the size Size.
|
||||||
|
#+hmbs 46422
|
||||||
|
|
||||||
|
## Sets the number of IO pollsets to use when polling for I/O.
|
||||||
|
#+IOp 1
|
||||||
|
|
||||||
|
## Sets the number of IO poll threads to use when polling for I/O.
|
||||||
|
#+IOt 1
|
||||||
|
|
||||||
|
## Sets the number of scheduler threads to create and scheduler threads to set online.
|
||||||
|
#+S 8:8
|
||||||
|
|
||||||
|
## Sets the number of dirty CPU scheduler threads to create and dirty CPU scheduler threads to set online.
|
||||||
|
#+SDcpu 8:8
|
||||||
|
|
||||||
|
## Sets the number of dirty I/O scheduler threads to create.
|
||||||
|
#+SDio 10
|
||||||
|
|
||||||
|
## Suggested stack size, in kilowords, for scheduler threads.
|
||||||
|
#+sss 32
|
||||||
|
|
||||||
|
## Suggested stack size, in kilowords, for dirty CPU scheduler threads.
|
||||||
|
#+sssdcpu 40
|
||||||
|
|
||||||
|
## Suggested stack size, in kilowords, for dirty IO scheduler threads.
|
||||||
|
#+sssdio 40
|
||||||
|
|
||||||
|
## Sets scheduler bind type.
|
||||||
|
## Can be one of: u, ns, ts, ps, s, nnts, nnps, tnnps, db
|
||||||
|
#+sbt db
|
||||||
|
|
||||||
|
## Sets a user-defined CPU topology.
|
||||||
|
#+sct L0-3c0-3p0N0:L4-7c0-3p1N1
|
||||||
|
|
||||||
|
## Sets the mapping of warning messages for error_logger
|
||||||
|
#+W w
|
|
@ -0,0 +1,93 @@
|
||||||
|
##############################
|
||||||
|
# Erlang VM Args
|
||||||
|
##############################
|
||||||
|
|
||||||
|
## NOTE:
|
||||||
|
## Basic args like '-name' and '-setcookie' should be configured in emqx.conf
|
||||||
|
## If they are configured in both file, the args configured in emqx.conf will
|
||||||
|
## be used.
|
||||||
|
|
||||||
|
## Sets the maximum number of simultaneously existing processes for this system.
|
||||||
|
+P 20480
|
||||||
|
|
||||||
|
## Sets the maximum number of simultaneously existing ports for this system.
|
||||||
|
+Q 4096
|
||||||
|
|
||||||
|
## Sets the maximum number of ETS tables
|
||||||
|
+e 512
|
||||||
|
|
||||||
|
## Sets the maximum number of atoms the virtual machine can handle.
|
||||||
|
+t 65536
|
||||||
|
|
||||||
|
## Set the location of crash dumps
|
||||||
|
-env ERL_CRASH_DUMP {{ platform_log_dir }}/crash.dump
|
||||||
|
|
||||||
|
## Set how many times generational garbages collections can be done without
|
||||||
|
## forcing a fullsweep collection.
|
||||||
|
-env ERL_FULLSWEEP_AFTER 0
|
||||||
|
|
||||||
|
## Heartbeat management; auto-restarts VM if it dies or becomes unresponsive
|
||||||
|
## (Disabled by default..use with caution!)
|
||||||
|
#-heart
|
||||||
|
|
||||||
|
## Specify the erlang distributed protocol.
|
||||||
|
## Can be one of: inet_tcp, inet6_tcp, inet_tls
|
||||||
|
#-proto_dist inet_tcp
|
||||||
|
|
||||||
|
## Specify SSL Options in the file if using SSL for Erlang Distribution.
|
||||||
|
## Used only when -proto_dist set to inet_tls
|
||||||
|
#-ssl_dist_optfile {{ platform_etc_dir }}/ssl_dist.conf
|
||||||
|
|
||||||
|
## Specifies the net_kernel tick time in seconds.
|
||||||
|
## This is the approximate time a connected node may be unresponsive until
|
||||||
|
## it is considered down and thereby disconnected.
|
||||||
|
#-kernel net_ticktime 60
|
||||||
|
|
||||||
|
## Sets the distribution buffer busy limit (dist_buf_busy_limit).
|
||||||
|
+zdbbl 1024
|
||||||
|
|
||||||
|
## Sets default scheduler hint for port parallelism.
|
||||||
|
+spp false
|
||||||
|
|
||||||
|
## Sets the number of threads in async thread pool. Valid range is 0-1024.
|
||||||
|
+A 1
|
||||||
|
|
||||||
|
## Sets the default heap size of processes to the size Size.
|
||||||
|
#+hms 233
|
||||||
|
|
||||||
|
## Sets the default binary virtual heap size of processes to the size Size.
|
||||||
|
#+hmbs 46422
|
||||||
|
|
||||||
|
## Sets the number of IO pollsets to use when polling for I/O.
|
||||||
|
+IOp 1
|
||||||
|
|
||||||
|
## Sets the number of IO poll threads to use when polling for I/O.
|
||||||
|
+IOt 1
|
||||||
|
|
||||||
|
## Sets the number of scheduler threads to create and scheduler threads to set online.
|
||||||
|
+S 1:1
|
||||||
|
|
||||||
|
## Sets the number of dirty CPU scheduler threads to create and dirty CPU scheduler threads to set online.
|
||||||
|
+SDcpu 1:1
|
||||||
|
|
||||||
|
## Sets the number of dirty I/O scheduler threads to create.
|
||||||
|
+SDio 1
|
||||||
|
|
||||||
|
## Suggested stack size, in kilowords, for scheduler threads.
|
||||||
|
#+sss 32
|
||||||
|
|
||||||
|
## Suggested stack size, in kilowords, for dirty CPU scheduler threads.
|
||||||
|
#+sssdcpu 40
|
||||||
|
|
||||||
|
## Suggested stack size, in kilowords, for dirty IO scheduler threads.
|
||||||
|
#+sssdio 40
|
||||||
|
|
||||||
|
## Sets scheduler bind type.
|
||||||
|
## Can be one of: u, ns, ts, ps, s, nnts, nnps, tnnps, db
|
||||||
|
#+sbt db
|
||||||
|
|
||||||
|
## Sets a user-defined CPU topology.
|
||||||
|
#+sct L0-3c0-3p0N0:L4-7c0-3p1N1
|
||||||
|
|
||||||
|
## Sets the mapping of warning messages for error_logger
|
||||||
|
#+W w
|
|
@ -173,51 +173,11 @@ end}.
|
||||||
{default, "emqx@127.0.0.1"}
|
{default, "emqx@127.0.0.1"}
|
||||||
]}.
|
]}.
|
||||||
|
|
||||||
%% @doc The erlang distributed protocol
|
|
||||||
{mapping, "node.proto_dist", "vm_args.-proto_dist", [
|
|
||||||
%{default, "inet_tcp"},
|
|
||||||
{datatype, {enum, [inet_tcp, inet6_tcp, inet_tls]}},
|
|
||||||
hidden
|
|
||||||
]}.
|
|
||||||
|
|
||||||
%% @doc Specify SSL Options in the file if using SSL for erlang distribution
|
|
||||||
{mapping, "node.ssl_dist_optfile", "vm_args.-ssl_dist_optfile", [
|
|
||||||
{datatype, string},
|
|
||||||
hidden
|
|
||||||
]}.
|
|
||||||
|
|
||||||
%% @doc Secret cookie for distributed erlang node
|
%% @doc Secret cookie for distributed erlang node
|
||||||
{mapping, "node.cookie", "vm_args.-setcookie", [
|
{mapping, "node.cookie", "vm_args.-setcookie", [
|
||||||
{default, "emqxsecretcookie"}
|
{default, "emqxsecretcookie"}
|
||||||
]}.
|
]}.
|
||||||
|
|
||||||
%% @doc Erlang Process Limit
|
|
||||||
{mapping, "node.process_limit", "vm_args.+P", [
|
|
||||||
{datatype, integer},
|
|
||||||
{default, 256000},
|
|
||||||
hidden
|
|
||||||
]}.
|
|
||||||
|
|
||||||
%% Note: OTP R15 and earlier uses -env ERL_MAX_PORTS, R16+ uses +Q
|
|
||||||
%% @doc The number of concurrent ports/sockets
|
|
||||||
%% Valid range is 1024-134217727
|
|
||||||
{mapping, "node.max_ports",
|
|
||||||
cuttlefish:otp("R16", "vm_args.+Q", "vm_args.-env ERL_MAX_PORTS"), [
|
|
||||||
{default, 262144},
|
|
||||||
{datatype, integer},
|
|
||||||
{validators, ["range4ports"]}
|
|
||||||
]}.
|
|
||||||
|
|
||||||
{validator, "range4ports", "must be 1024 to 134217727",
|
|
||||||
fun(X) -> X >= 1024 andalso X =< 134217727 end}.
|
|
||||||
|
|
||||||
%% @doc Set the location of crash dumps
|
|
||||||
{mapping, "node.crash_dump", "vm_args.-env ERL_CRASH_DUMP", [
|
|
||||||
{default, "{{crash_dump}}"},
|
|
||||||
{datatype, file},
|
|
||||||
hidden
|
|
||||||
]}.
|
|
||||||
|
|
||||||
%% @doc http://www.erlang.org/doc/man/kernel_app.html
|
%% @doc http://www.erlang.org/doc/man/kernel_app.html
|
||||||
{mapping, "node.dist_listen_min", "kernel.inet_dist_listen_min", [
|
{mapping, "node.dist_listen_min", "kernel.inet_dist_listen_min", [
|
||||||
{commented, 6369},
|
{commented, 6369},
|
||||||
|
|
Loading…
Reference in New Issue