The
Windows users probably want to use the
As from ERTS 5.9 (Erlang/OTP R15B) the runtime system does by
default not bind schedulers to logical processors.
For more information, see system flag
Starts an Erlang runtime system.
The arguments can be divided into emulator flags, flags, and plain arguments:
Any argument starting with character
As indicated by the name, emulator flags control the behavior of the emulator.
Any argument starting with character
The
A small number of "-" flags exist, which now actually are emulator flags, see the description below.
Plain arguments are not interpreted in any way. They are also
stored by the
Examples:
% erl +W w -sname arnie +R 9 -s my_init -extra +bertie (arnie@host)1> init:get_argument(sname). {ok,[["arnie"]]} (arnie@host)2> init:get_plain_arguments(). ["+bertie"]
Here
% erl -myflag 1 1> init:get_argument(myflag). {ok,[["1"]]} 2> init:get_plain_arguments(). []
Here the user flag
In the following list, init flags are marked "(init flag)".
Unless otherwise specified, all other flags are user flags, for
which the values can be retrieved by calling
Everything following
Sets the application configuration parameter
Command-line arguments are read from the file
The file
The flag
The initial Erlang shell does not read user input until the system boot procedure has been completed (Erlang/OTP 5.4 and later). This flag disables the start synchronization feature and lets the shell start in parallel with the rest of the system.
Specifies the name of the boot file,
Defaults to
If the boot script contains a path variable
Enables the code path cache of the code server; see
Compiles the specified modules and then terminates (with
non-zero exit code if the compilation of some file did not
succeed). Implies
Not recommended; use
Specifies the name of a configuration file,
If this flag is present,
Obsolete flag without any effect and common misspelling for
Starts the Erlang runtime system detached from the system
console. Useful for running daemons and backgrounds processes. Implies
Useful for debugging. Prints the arguments sent to the emulator.
Sets the host OS environment variable
% erl -env DISPLAY gin:0
In this example, an Erlang runtime system is started with
environment variable
Configures the module responsible to communicate to
Makes
Everything following
Starts heartbeat monitoring of the Erlang runtime system;
see
Starts the Erlang runtime system as a hidden node, if it is
run as a distributed node. Hidden nodes always establish
hidden connections to all other nodes except for nodes in the
same global group. Hidden connections are not published on
any of the connected nodes, that is, none of the connected
nodes are part of the result from
Specifies the IP addresses for the hosts on which Erlang boot servers
are running, see
The IP addresses must be specified in the standard form (four
decimal numbers separated by periods, for example,
Specifies the identity of the Erlang runtime system. If it is
run as a distributed node,
Makes
Selects an instrumented Erlang runtime system (virtual
machine) to run, instead of the ordinary one. When running an
instrumented runtime system, some resource usage data can be
obtained and analyzed using the
Specifies the method used by
If
Makes the Erlang runtime system invoke
Displays the manual page for the Erlang module
Indicates if the system is to load code dynamically
(
Makes the Erlang runtime system into a distributed node.
This flag invokes all network servers necessary for a node to
become distributed; see
The node name will be
Ensures that the Erlang runtime system never tries to read
any input. Implies
Starts an Erlang runtime system with no shell. This flag makes it possible to have the Erlang runtime system as a component in a series of Unix pipes.
Disables the sticky directory facility of the Erlang code
server; see
Invokes the old Erlang shell from Erlang/OTP 3.3. The old shell can still be used.
Adds the specified directories to the beginning of the code
path, similar to
As an alternative to
Adds the specified directories to the end of the code path,
similar to
Replaces the path specified in the boot script; see
Specifies a protocol for Erlang distribution:
For example, to start up IPv6 distributed nodes:
% erl -name test@ipv6node.example.com -proto_dist inet6_tcp
Starts Erlang with a remote shell connected to
Specifies an alternative to
Makes
Makes
Sets the magic cookie of the node to
Specifies how long time (in milliseconds) the
Makes the Erlang runtime system into a distributed node, similar to
This is sometimes the only way to run distributed Erlang if
the Domain Name System (DNS) is not running. No communication can
exist between nodes running with flag
Specifies whether Erlang should start
This only applies if Erlang is started as a distributed node,
i.e. if
Note that a distributed node will fail to start if epmd is not running.
The runtime system with SMP support is not available on all
supported platforms. See also flag
Makes the emulator print its version number. The same
as
Suggested stack size, in kilowords, for threads in the
async thread pool. Valid range is 16-8192 kilowords. The
default suggested stack size is 16 kilowords, that is, 64
kilobyte on 32-bit architectures. This small default size
has been chosen because the number of async threads can
be large. The default size is enough for drivers
delivered with Erlang/OTP, but might not be large
enough for other dynamically linked-in drivers that use the
Sets the number of threads in async thread pool. Valid range is 0-1024. Defaults to 10 if thread support is available.
Option
If option
Notice that on Windows, this flag is only applicable for
Enables or disables
For backward compatibility, the boolean value can be omitted.
This is interpreted as
Sets
If the emulator detects an internal error (or runs out of memory), it, by default, generates both a crash dump and a core dump. The core dump is, however, not very useful as the content of process heaps is destroyed by the crash dump generation.
Option
Calling
Sets the maximum number of ETS tables.
Forces option
The virtual machine works with filenames as if they are encoded using the ISO Latin-1 encoding, disallowing Unicode characters with code points > 255.
For more information about Unicode filenames, see section
The virtual machine works with filenames as if they are encoded using UTF-8 (or some other system-specific Unicode encoding). This is the default on operating systems that enforce Unicode encoding, that is, Windows and MacOS X.
The
Notice that
For more information about Unicode filenames, see section
Selection between
The
For more information about Unicode filenames, see section
Sets the default heap size of processes to the size
Sets the default binary virtual heap size of processes to the size
Sets the default maximum heap size of processes to the size
Sets whether to send an error logger message or not for processes
reaching the maximum heap size. Defaults to
Sets whether to kill processes reaching the maximum heap size or not.
Default to
Sets the initial process dictionary size of processes to the size
Sets the default value for process flag
Enables or disables the kernel poll functionality if supported by
the emulator. Defaults to
Enables autoload tracing, displaying information while loading code.
Prevents loading information about source filenames and line numbers. This saves some memory, but exceptions do not contain information about the filenames and line numbers.
Memory allocator-specific flags. For more information, see
Sets the range of characters that the system considers printable in
heuristic detection of strings. This typically affects the shell,
debugger, and
Two values are supported for
See also
Sets the maximum number of simultaneously existing processes for this
system if a
NOTE: The actual maximum chosen may be much larger than
the
The default value is
Sets the maximum number of simultaneously existing ports for this
system if a Number is passed as value. Valid range for
NOTE: The actual maximum chosen may be much larger than
the actual
The default value used is normally
On Windows the default value is set to
Sets the compatibility mode.
The distribution mechanism is not backward compatible by
default. This flag sets the emulator in compatibility mode
with an earlier Erlang/OTP release
Ensure that all nodes (Erlang-, C-, and Java nodes) of a distributed Erlang system is of the same Erlang/OTP release, or from two different Erlang/OTP releases X and Y, where all Y nodes have compatibility mode X.
Forces ETS memory block to be moved on realloc.
Limits the number of reader groups used by read/write locks optimized for read operations in the Erlang runtime system. By default the reader groups limit is 64.
When the number of schedulers is less than or equal to the reader groups limit, each scheduler has its own reader group. When the number of schedulers is larger than the reader groups limit, schedulers share reader groups. Shared reader groups degrade read lock and read unlock performance while many reader groups degrade write lock performance. So, the limit is a tradeoff between performance for read operations and performance for write operations. Each reader group consumes 64 byte in each read/write lock.
Notice that a runtime system using shared reader groups benefits from
Sets the number of scheduler threads to create and scheduler threads
to set online when SMP support has been enabled. The maximum for both
values is 1024. If the Erlang runtime system is able to determine the
number of logical processors configured and logical processors
available,
If
Specifying value
This option is ignored if the emulator does not have SMP support
enabled (see flag
Similar to
This option interacts with
This option is ignored if the emulator does not have SMP support
enabled (see flag
Sets the number of dirty CPU scheduler threads to create and dirty CPU scheduler threads to set online when threading support has been enabled. The maximum for both values is 1024, and each value is further limited by the settings for normal schedulers:
For details, see the
The amount of dirty CPU schedulers is limited by the amount of normal schedulers in order to limit the effect on processes executing on ordinary schedulers. If the amount of dirty CPU schedulers was allowed to be unlimited, dirty CPU bound jobs would potentially starve normal jobs.
This option is ignored if the emulator does not have threading support enabled. This option is experimental and is supported only if the emulator was configured and built with support for dirty schedulers enabled (it is disabled by default).
Similar to
This option interacts with
This option is ignored if the emulator does not have threading support enabled. This option is experimental and is supported only if the emulator was configured and built with support for dirty schedulers enabled (it is disabled by default).
Sets the number of dirty I/O scheduler threads to create when
threading support has been enabled. Valid range is 0-1024. By
default, the number of dirty I/O scheduler threads created is 10,
same as the default number of threads in the
The amount of dirty IO schedulers is not limited by the amount of
normal schedulers
This option is ignored if the emulator does not have threading support enabled. This option is experimental and is supported only if the emulator was configured and built with support for dirty schedulers enabled (it is disabled by default).
Scheduling specific flags.
Sets scheduler bind type.
Schedulers can also be bound using flag
If any of these errors occur when
Valid
Binding of schedulers is only supported on newer Linux, Solaris, FreeBSD, and Windows systems.
If no CPU topology is available when flag
The runtime system does by default not bind schedulers to logical processors.
If the Erlang runtime system is the only operating system process that binds threads to logical processors, this improves the performance of the runtime system. However, if other operating system processes (for example another Erlang runtime system) also bind threads to logical processors, there can be a performance penalty instead. This performance penalty can sometimes be severe. If so, you are advised not to bind the schedulers.
How schedulers are bound matters. For example, in situations when there are fewer running processes than schedulers online, the runtime system tries to migrate processes to schedulers with low scheduler identifiers. The more the schedulers are spread over the hardware, the more resources are available to the runtime system in such situations.
If a scheduler fails to bind, this is
often silently ignored, as it is not always
possible to verify valid logical processor identifiers. If
an error is reported, it is reported to the
Sets scheduler busy wait threshold. Defaults to
This flag can be removed or changed at any time without prior notice.
Enables or disables scheduler compaction of load. By default scheduler compaction of load is enabled. When enabled, load balancing strives for a load distribution, which causes as many scheduler threads as possible to be fully loaded (that is, not run out of work). This is accomplished by migrating load (for example, runnable processes) into a smaller set of schedulers when schedulers frequently run out of work. When disabled, the frequency with which schedulers run out of work is not taken into account by the load balancing logic.
Sets a user-defined CPU topology. The user-defined
CPU topology overrides any automatically detected
CPU topology. The CPU topology is used when
Uppercase letters signify real identifiers and lowercase
letters signify fake identifiers only used for description
of the topology. Identifiers passed as real identifiers can
be used by the runtime system when trying to access specific
hardware; if they are incorrect the behavior is
undefined. Faked logical CPU identifiers are not accepted,
as there is no point in defining the CPU topology without
real logical CPU identifiers. Thread, core, processor, and
node identifiers can be omitted. If omitted, the thread ID
defaults to
Both increasing and decreasing
NUMA node identifiers are system wide. That is, each NUMA node on the system must have a unique identifier. Processor identifiers are also system wide. Core identifiers are processor wide. Thread identifiers are core wide.
The order of the identifier types implies the hierarchy of the CPU topology. The valid orders are as follows:
A CPU topology can consist of both processor external, and
processor internal NUMA nodes as long as each logical processor
belongs to only one NUMA node. If
If a list of identifiers is used in an
A simple example. A single quad core processor can be described as follows:
% erl +sct L0-3c0-3 1> erlang:system_info(cpu_topology). [{processor,[{core,{logical,0}}, {core,{logical,1}}, {core,{logical,2}}, {core,{logical,3}}]}]
A more complicated example with two quad core processors, each processor in its own NUMA node. The ordering of logical processors is a bit weird. This to give a better example of identifier lists:
% erl +sct L0-1,3-2c0-3p0N0:L7,4,6-5c0-3p1N1 1> erlang:system_info(cpu_topology). [{node,[{processor,[{core,{logical,0}}, {core,{logical,1}}, {core,{logical,3}}, {core,{logical,2}}]}]}, {node,[{processor,[{core,{logical,7}}, {core,{logical,4}}, {core,{logical,6}}, {core,{logical,5}}]}]}]
As long as real identifiers are correct, it is OK to pass a CPU topology that is not a correct description of the CPU topology. When used with care this can be very useful. This to trick the emulator to bind its schedulers as you want. For example, if you want to run multiple Erlang runtime systems on the same machine, you want to reduce the number of schedulers used and manipulate the CPU topology so that they bind to different logical CPUs. An example, with two Erlang runtime systems on a quad core machine:
% erl +sct L0-3c0-3 +sbt db +S3:2 -detached -noinput -noshell -sname one % erl +sct L3-0c0-3 +sbt db +S3:2 -detached -noinput -noshell -sname two
In this example, each runtime system have two schedulers each online, and all schedulers online will run on different cores. If we change to one scheduler online on one runtime system, and three schedulers online on the other, all schedulers online will still run on different cores.
Notice that a faked CPU topology that does not reflect how the real CPU topology looks like is likely to decrease the performance of the runtime system.
For more information, see
Enables or disables eager check I/O scheduling. Defaults
to
The flag effects when schedulers will check for I/O
operations possible to execute, and when such I/O operations
will execute. As the parameter name implies,
schedulers are more eager to check for I/O when
Sets scheduler-forced wakeup interval. All run queues are
scanned each
This feature has been introduced as a temporary workaround for long-executing native code, and native code that does not bump reductions properly in OTP. When these bugs have be fixed, this flag will be removed.
Sets default scheduler hint for port parallelism. If set to
Suggested stack size, in kilowords, for scheduler threads. Valid range is 4-8192 kilowords. The default stack size is OS-dependent.
Tries to set the scheduler bind type. The same as flag
Enables or disables
Sets scheduler wake cleanup threshold. Defaults to
This flag can be removed or changed at any time without prior notice.
Sets scheduler wakeup strategy. Default strategy changed in
ERTS 5.10 (Erlang/OTP R16A). This strategy was known as
This flag can be removed or changed at any time without prior notice.
Sets scheduler wakeup threshold. Defaults to
This flag can be removed or changed at any time without prior notice.
Sets the maximum number of atoms the virtual machine can handle. Defaults to 1,048,576.
Enables modified timing and sets the modified timing level. Valid range is 0-9. The timing of the runtime system is changed. A high level usually means a greater change than a low level. Changing the timing can be very useful for finding timing-related bugs.
Modified timing affects the following:
Performance suffers when modified timing is enabled. This flag is only intended for testing and debugging.
This flag can be removed or changed at any time without prior notice.
Verbose.
Makes the emulator print its version number.
Sets the mapping of warning messages for
Miscellaneous flags:
Sets the distribution buffer busy limit
(
A larger buffer limit allows processes to buffer more outgoing messages over the distribution. When the buffer limit has been reached, sending processes will be suspended until the buffer size has shrunk. The buffer limit is per distribution channel. A higher limit gives lower latency and higher throughput at the expense of higher memory use.
Sets the delayed node table garbage collection time
(
Node table entries that are not referred linger in the table for at least the amount of time that this parameter determines. The lingering prevents repeated deletions and insertions in the tables from occurring.
If the emulator needs to write a crash dump, the value of this
variable is the filename of the crash dump file.
If the variable is not set, the name of the crash dump file is
Unix systems: If the emulator needs to write a crash dump, it uses the value of this variable to set the nice value for the process, thus lowering its priority. Valid range is 1-39 (higher values are replaced with 39). The highest value, 39, gives the process the lowest priority.
Unix systems: This variable gives the number of seconds
that the emulator is allowed to spend writing a crash dump. When the
given number of seconds have elapsed, the emulator is terminated by a
If the variable is not set or set to
If the variable is set to negative value, such as
This variable is used with
The content of this variable is added to the beginning of the
command line for
Flag
The content of these variables are added to the end of the command
line for
Flag
Contains a list of additional library directories that the code
server searches for applications and adds to the code path; see
Can be set to a comma-separated list of IP addresses, in which case
the
Can contain the port number to use when communicating with
The standard Erlang/OTP system can be reconfigured to change the default behavior on startup.
When Erlang/OTP is started, the system searches for a file named
If an
A typical
Functions in the shell that are not prefixed by a module name are
assumed to be functional objects (funs), built-in functions (BIFs),
or belong to the module
To include private shell commands, define them in a module
If the contents of