1erl(1) User Commands erl(1)
2
3
4
6 erl - The Erlang emulator.
7
9 The erl program starts an Erlang runtime system. The exact details (for
10 example, whether erl is a script or a program and which other programs
11 it calls) are system-dependent.
12
13 Windows users probably want to use the werl program instead, which runs
14 in its own window with scrollbars and supports command-line editing.
15 The erl program on Windows provides no line editing in its shell, and
16 on Windows 95 there is no way to scroll back to text that has scrolled
17 off the screen. The erl program must be used, however, in pipelines or
18 if you want to redirect standard input or output.
19
20 Note:
21 As from ERTS 5.9 (Erlang/OTP R15B) the runtime system does by default
22 not bind schedulers to logical processors. For more information, see
23 system flag +sbt.
24
25
27 erl <arguments>
28
29 Starts an Erlang runtime system.
30
31 The arguments can be divided into emulator flags, flags, and
32 plain arguments:
33
34 * Any argument starting with character + is interpreted as an
35 emulator flag.
36
37 As indicated by the name, emulator flags control the behav‐
38 ior of the emulator.
39
40 * Any argument starting with character - (hyphen) is inter‐
41 preted as a flag, which is to be passed to the Erlang part
42 of the runtime system, more specifically to the init system
43 process, see init(3).
44
45 The init process itself interprets some of these flags, the
46 init flags. It also stores any remaining flags, the user
47 flags. The latter can be retrieved by calling init:get_argu‐
48 ment/1.
49
50 A small number of "-" flags exist, which now actually are
51 emulator flags, see the description below.
52
53 * Plain arguments are not interpreted in any way. They are
54 also stored by the init process and can be retrieved by
55 calling init:get_plain_arguments/0. Plain arguments can oc‐
56 cur before the first flag, or after a -- flag. Also, the
57 -extra flag causes everything that follows to become plain
58 arguments.
59
60 Examples:
61
62 % erl +W w -sname arnie +R 9 -s my_init -extra +bertie
63 (arnie@host)1> init:get_argument(sname).
64 {ok,[["arnie"]]}
65 (arnie@host)2> init:get_plain_arguments().
66 ["+bertie"]
67
68 Here +W w and +R 9 are emulator flags. -s my_init is an init
69 flag, interpreted by init. -sname arnie is a user flag, stored
70 by init. It is read by Kernel and causes the Erlang runtime sys‐
71 tem to become distributed. Finally, everything after -extra
72 (that is, +bertie) is considered as plain arguments.
73
74 % erl -myflag 1
75 1> init:get_argument(myflag).
76 {ok,[["1"]]}
77 2> init:get_plain_arguments().
78 []
79
80 Here the user flag -myflag 1 is passed to and stored by the init
81 process. It is a user-defined flag, presumably used by some
82 user-defined application.
83
85 In the following list, init flags are marked "(init flag)". Unless oth‐
86 erwise specified, all other flags are user flags, for which the values
87 can be retrieved by calling init:get_argument/1. Notice that the list
88 of user flags is not exhaustive, there can be more application-specific
89 flags that instead are described in the corresponding application docu‐
90 mentation.
91
92 -- (init flag):
93 Everything following -- up to the next flag (-flag or +flag) is
94 considered plain arguments and can be retrieved using
95 init:get_plain_arguments/0.
96
97 -Application Par Val:
98 Sets the application configuration parameter Par to the value Val
99 for the application Application; see app(4) and application(3).
100
101 -args_file FileName:
102 Command-line arguments are read from the file FileName. The argu‐
103 ments read from the file replace flag '-args_file FileName' on the
104 resulting command line.
105
106 The file FileName is to be a plain text file and can contain com‐
107 ments and command-line arguments. A comment begins with a # charac‐
108 ter and continues until the next end of line character. Backslash
109 (\\) is used as quoting character. All command-line arguments ac‐
110 cepted by erl are allowed, also flag -args_file FileName. Be care‐
111 ful not to cause circular dependencies between files containing
112 flag -args_file, though.
113
114 The flag -extra is treated in special way. Its scope ends at the
115 end of the file. Arguments following an -extra flag are moved on
116 the command line into the -extra section, that is, the end of the
117 command line following after an -extra flag.
118
119 -async_shell_start:
120 The initial Erlang shell does not read user input until the system
121 boot procedure has been completed (Erlang/OTP 5.4 and later). This
122 flag disables the start synchronization feature and lets the shell
123 start in parallel with the rest of the system.
124
125 -boot File:
126 Specifies the name of the boot file, File.boot, which is used to
127 start the system; see init(3). Unless File contains an absolute
128 path, the system searches for File.boot in the current and
129 $ROOT/bin directories.
130
131 Defaults to $ROOT/bin/start.boot.
132
133 -boot_var Var Dir:
134 If the boot script contains a path variable Var other than $ROOT,
135 this variable is expanded to Dir. Used when applications are in‐
136 stalled in another directory than $ROOT/lib; see sys‐
137 tools:make_script/1,2 in SASL.
138
139 -code_path_cache:
140 Enables the code path cache of the code server; see code(3).
141
142 -compile Mod1 Mod2 ...:
143 Compiles the specified modules and then terminates (with non-zero
144 exit code if the compilation of some file did not succeed). Implies
145 -noinput.
146
147 Not recommended; use erlc instead.
148
149 -config Config [Config ...]:
150 Specifies the name of one or more configuration files, Config.con‐
151 fig, which is used to configure applications; see app(4) and appli‐
152 cation(3). See the documentation for the configuration file format
153 for a description of the configuration format and the order in
154 which configuration parameters are read.
155
156 -configfd FD [FD ...]:
157 Specifies the name of one or more file descriptors (called configu‐
158 ration file descriptors from here on) with configuration data for
159 applications; see app(4) and application(3). See the documentation
160 for the configuration file format for a description of the configu‐
161 ration format and the order in which configuration parameters are
162 read.
163
164 A configuration file descriptor will be read until its end and will
165 then be closed.
166
167 The content of a configuration file descriptor is stored so that it
168 can be reused when init:restart/0 or init:restart/1 is called.
169
170 The parameter -configfd 0 implies -noinput.
171
172 Note:
173 It is not recommended to use file descriptors 1 (standard output),
174 and 2 (standard error) together with -configfd as these file descrip‐
175 tors are typically used to print information to the console the pro‐
176 gram is running in.
177
178
179 Examples (Unix shell):
180
181 $ erl \ -noshell \ -configfd 3 \ -eval \ 'io:format("~p~n",[application:get_env(kernel, logger_level)]),erlang:halt()' 3< \ <(echo '[{kernel, [{logger_level, warning}]}].')
182 {ok,warning}
183
184
185 $ echo '[{kernel, [{logger_level, warning}]}].' > test1.config
186 $ echo '[{kernel, [{logger_level, error}]}].' > test2.config
187 $ erl \ -noshell \ -configfd 3 \ -configfd 4 \ -eval \ 'io:format("~p~n",[application:get_env(kernel, logger_level)]),erlang:halt()' \ 3< test1.config 4< test2.config
188 {ok,error}
189
190
191 -connect_all false:
192 If this flag is present, global does not maintain a fully connected
193 network of distributed Erlang nodes, and then global name registra‐
194 tion cannot be used; see global(3).
195
196 -cookie Cookie:
197 Obsolete flag without any effect and common misspelling for -set‐
198 cookie. Use -setcookie instead.
199
200 -detached:
201 Starts the Erlang runtime system detached from the system console.
202 Useful for running daemons and backgrounds processes. Implies
203 -noinput.
204
205 -emu_args:
206 Useful for debugging. Prints the arguments sent to the emulator.
207
208 -emu_flavor emu|jit|smp:
209 Start an emulator of a different flavor. Normally only one flavor
210 is available, more can be added by building specific flavors. The
211 currently available flavors are: emu and jit. The smp flavor is an
212 alias for the current default flavor. You can combine this flag
213 with --emu_type. You can get the current flavor at run-time using
214 erlang:system_info(emu_flavor). (The emulator with this flavor must
215 be built. You can build a specific flavor by doing make FLA‐
216 VOR=$FLAVOR in the Erlang/OTP source repository.)
217
218 -emu_type Type:
219 Start an emulator of a different type. For example, to start the
220 lock-counter emulator, use -emu_type lcnt. You can get the current
221 type at run-time using erlang:system_info(build_type). (The emula‐
222 tor of this type must already be built. Use the configure option
223 --enable-lock-counter to build the lock-counter emulator.)
224
225 -env Variable Value:
226 Sets the host OS environment variable Variable to the value Value
227 for the Erlang runtime system. Example:
228
229 % erl -env DISPLAY gin:0
230
231 In this example, an Erlang runtime system is started with environ‐
232 ment variable DISPLAY set to gin:0.
233
234 -epmd_module Module (init flag):
235 Configures the module responsible to communicate to epmd. Defaults
236 to erl_epmd.
237
238 -erl_epmd_port Port (init flag):
239 Configures the port used by erl_epmd to listen for connection and
240 connect to other nodes. See erl_epmd for more details. Defaults to
241 0.
242
243 -eval Expr (init flag):
244 Makes init evaluate the expression Expr; see init(3).
245
246 -extra (init flag):
247 Everything following -extra is considered plain arguments and can
248 be retrieved using init:get_plain_arguments/0.
249
250 -heart:
251 Starts heartbeat monitoring of the Erlang runtime system; see
252 heart(3).
253
254 -hidden:
255 Starts the Erlang runtime system as a hidden node, if it is run as
256 a distributed node. Hidden nodes always establish hidden connec‐
257 tions to all other nodes except for nodes in the same global group.
258 Hidden connections are not published on any of the connected nodes,
259 that is, none of the connected nodes are part of the result from
260 nodes/0 on the other node. See also hidden global groups;
261 global_group(3).
262
263 -hosts Hosts:
264 Specifies the IP addresses for the hosts on which Erlang boot
265 servers are running, see erl_boot_server(3). This flag is mandatory
266 if flag -loader inet is present.
267
268 The IP addresses must be specified in the standard form (four deci‐
269 mal numbers separated by periods, for example, "150.236.20.74".
270 Hosts names are not acceptable, but a broadcast address (preferably
271 limited to the local network) is.
272
273 -id Id:
274 Specifies the identity of the Erlang runtime system. If it is run
275 as a distributed node, Id must be identical to the name supplied
276 together with flag -sname or -name.
277
278 -init_debug:
279 Makes init write some debug information while interpreting the boot
280 script.
281
282 -instr (emulator flag):
283 Selects an instrumented Erlang runtime system (virtual machine) to
284 run, instead of the ordinary one. When running an instrumented run‐
285 time system, some resource usage data can be obtained and analyzed
286 using the instrument module. Functionally, it behaves exactly like
287 an ordinary Erlang runtime system.
288
289 -loader Loader:
290 Specifies the method used by erl_prim_loader to load Erlang modules
291 into the system; see erl_prim_loader(3). Two Loader methods are
292 supported:
293
294 * efile, which means use the local file system, this is the de‐
295 fault.
296
297 * inet, which means use a boot server on another machine. The flags
298 -id, -hosts and -setcookie must also be specified.
299
300 If Loader is something else, the user-supplied Loader port program
301 is started.
302
303 -make:
304 Makes the Erlang runtime system invoke make:all() in the current
305 working directory and then terminate; see make(3). Implies -noin‐
306 put.
307
308 -man Module:
309 Displays the manual page for the Erlang module Module. Only sup‐
310 ported on Unix.
311
312 -mode interactive | embedded:
313 Modules are auto loaded when they are first referenced if the run‐
314 time system runs in interactive mode, which is the default. In em‐
315 bedded mode modules are not auto loaded. The latter is recommended
316 when the boot script preloads all modules, as conventionally hap‐
317 pens in OTP releases. See code(3).
318
319 -name Name:
320 Makes the Erlang runtime system into a distributed node. This flag
321 invokes all network servers necessary for a node to become distrib‐
322 uted; see net_kernel(3). It is also ensured that epmd runs on the
323 current host before Erlang is started; see epmd(1) and the
324 -start_epmd option.
325
326 The node name will be Name@Host, where Host is the fully qualified
327 host name of the current host. For short names, use flag -sname in‐
328 stead.
329
330 If Name is set to undefined the node will be started in a special
331 mode optimized to be the temporary client of another node. When en‐
332 abled the node will request a dynamic node name from the first node
333 it connects to. In addition these distribution settings will be
334 set:
335
336 -dist_listen false -hidden -dist_auto_connect never
337
338 Because -dist_auto_connect is set to never, the system will have to
339 manually call net_kernel:connect_node/1 in order to start the dis‐
340 tribution. If the distribution channel is closed, when a node uses
341 a dynamic node name, the node will stop the distribution and a new
342 call to net_kernel:connect_node/1 has to be made. Note that the
343 node name may change if the distribution is dropped and then set up
344 again.
345
346 Note:
347 The dynamic node name feature is supported from OTP 23. Both the tem‐
348 porary client node and the first connected peer node (supplying the
349 dynamic node name) must be at least OTP 23 for it to work.
350
351
352 Warning:
353 Starting a distributed node without also specifying -proto_dist
354 inet_tls will expose the node to attacks that may give the attacker
355 complete access to the node and in extension the cluster. When using
356 un-secure distributed nodes, make sure that the network is configured
357 to keep potential attackers out.
358
359
360 -no_epmd:
361 Specifies that the distributed node does not need epmd at all.
362
363 This option ensures that the Erlang runtime system does not start
364 epmd and does not start the erl_epmd process for distribution ei‐
365 ther.
366
367 This option only works if Erlang is started as a distributed node
368 with the -proto_dist option using an alternative protocol for Er‐
369 lang distribution which does not rely on epmd for node registration
370 and discovery. For more information, see How to implement an Alter‐
371 native Carrier for the Erlang Distribution.
372
373 -noinput:
374 Ensures that the Erlang runtime system never tries to read any in‐
375 put. Implies -noshell.
376
377 -noshell:
378 Starts an Erlang runtime system with no shell. This flag makes it
379 possible to have the Erlang runtime system as a component in a se‐
380 ries of Unix pipes.
381
382 -nostick:
383 Disables the sticky directory facility of the Erlang code server;
384 see code(3).
385
386 -oldshell:
387 Invokes the old Erlang shell from Erlang/OTP 3.3. The old shell can
388 still be used.
389
390 -pa Dir1 Dir2 ...:
391 Adds the specified directories to the beginning of the code path,
392 similar to code:add_pathsa/1. Note that the order of the given di‐
393 rectories will be reversed in the resulting path.
394
395 As an alternative to -pa, if several directories are to be
396 prepended to the code path and the directories have a common parent
397 directory, that parent directory can be specified in environment
398 variable ERL_LIBS; see code(3).
399
400 -pz Dir1 Dir2 ...:
401 Adds the specified directories to the end of the code path, similar
402 to code:add_pathsz/1; see code(3).
403
404 -path Dir1 Dir2 ...:
405 Replaces the path specified in the boot script; see script(4).
406
407 -proto_dist Proto:
408
409
410 Specifies a protocol for Erlang distribution:
411
412 inet_tcp:
413 TCP over IPv4 (the default)
414
415 inet_tls:
416 Distribution over TLS/SSL, See the Using SSL for Erlang Distri‐
417 bution User's Guide for details on how to setup a secure distrib‐
418 uted node.
419
420 inet6_tcp:
421 TCP over IPv6
422
423 For example, to start up IPv6 distributed nodes:
424
425 % erl -name test@ipv6node.example.com -proto_dist inet6_tcp
426
427 -remsh Node:
428 Starts Erlang with a remote shell connected to Node.
429
430 If no -name or -sname is given the node will be started using
431 -sname undefined. If Node does not contain a hostname, one is auto‐
432 matically taken from -name or -sname
433
434 Note:
435 Before OTP-23 the user needed to supply a valid -sname or -name for
436 -remsh to work. This is still the case if the target node is not run‐
437 ning OTP-23 or later.
438
439
440 -rsh Program:
441 Specifies an alternative to ssh for starting a slave node on a re‐
442 mote host; see slave(3).
443
444 -run Mod [Func [Arg1, Arg2, ...]] (init flag):
445 Makes init call the specified function. Func defaults to start. If
446 no arguments are provided, the function is assumed to be of arity
447 0. Otherwise it is assumed to be of arity 1, taking the list
448 [Arg1,Arg2,...] as argument. All arguments are passed as strings.
449 See init(3).
450
451 -s Mod [Func [Arg1, Arg2, ...]] (init flag):
452 Makes init call the specified function. Func defaults to start. If
453 no arguments are provided, the function is assumed to be of arity
454 0. Otherwise it is assumed to be of arity 1, taking the list
455 [Arg1,Arg2,...] as argument. All arguments are passed as atoms. See
456 init(3).
457
458 -setcookie Cookie:
459 Sets the magic cookie of the node to Cookie; see er‐
460 lang:set_cookie/2.
461
462 -setcookie Node Cookie:
463 Sets the magic cookie for Node to Cookie; see erlang:set_cookie/2.
464
465 -shutdown_time Time:
466 Specifies how long time (in milliseconds) the init process is al‐
467 lowed to spend shutting down the system. If Time milliseconds have
468 elapsed, all processes still existing are killed. Defaults to in‐
469 finity.
470
471 -sname Name:
472 Makes the Erlang runtime system into a distributed node, similar to
473 -name, but the host name portion of the node name Name@Host will be
474 the short name, not fully qualified.
475
476 This is sometimes the only way to run distributed Erlang if the Do‐
477 main Name System (DNS) is not running. No communication can exist
478 between nodes running with flag -sname and those running with flag
479 -name, as node names must be unique in distributed Erlang systems.
480
481 Warning:
482 Starting a distributed node without also specifying -proto_dist
483 inet_tls will expose the node to attacks that may give the attacker
484 complete access to the node and in extension the cluster. When using
485 un-secure distributed nodes, make sure that the network is configured
486 to keep potential attackers out.
487
488
489 -start_epmd true | false:
490 Specifies whether Erlang should start epmd on startup. By default
491 this is true, but if you prefer to start epmd manually, set this to
492 false.
493
494 This only applies if Erlang is started as a distributed node, i.e.
495 if -name or -sname is specified. Otherwise, epmd is not started
496 even if -start_epmd true is given.
497
498 Note that a distributed node will fail to start if epmd is not run‐
499 ning.
500
501 -version (emulator flag):
502 Makes the emulator print its version number. The same as erl +V.
503
505 erl invokes the code for the Erlang emulator (virtual machine), which
506 supports the following flags:
507
508 +a size:
509 Suggested stack size, in kilowords, for threads in the async thread
510 pool. Valid range is 16-8192 kilowords. The default suggested stack
511 size is 16 kilowords, that is, 64 kilobyte on 32-bit architectures.
512 This small default size has been chosen because the number of async
513 threads can be large. The default size is enough for drivers deliv‐
514 ered with Erlang/OTP, but might not be large enough for other dy‐
515 namically linked-in drivers that use the driver_async() functional‐
516 ity. Notice that the value passed is only a suggestion, and it can
517 even be ignored on some platforms.
518
519 +A size:
520 Sets the number of threads in async thread pool. Valid range is
521 1-1024. The async thread pool is used by linked-in drivers to han‐
522 dle work that may take a very long time. Since OTP 21 there are
523 very few linked-in drivers in the default Erlang/OTP distribution
524 that uses the async thread pool. Most of them have been migrated to
525 dirty IO schedulers. Defaults to 1.
526
527 +B [c | d | i]:
528 Option c makes Ctrl-C interrupt the current shell instead of invok‐
529 ing the emulator break handler. Option d (same as specifying +B
530 without an extra option) disables the break handler. Option i makes
531 the emulator ignore any break signal.
532
533 If option c is used with oldshell on Unix, Ctrl-C will restart the
534 shell process rather than interrupt it.
535
536 Notice that on Windows, this flag is only applicable for werl, not
537 erl (oldshell). Notice also that Ctrl-Break is used instead of
538 Ctrl-C on Windows.
539
540 +c true | false:
541 Enables or disables time correction:
542
543 true:
544 Enables time correction. This is the default if time correction
545 is supported on the specific platform.
546
547 false:
548 Disables time correction.
549
550 For backward compatibility, the boolean value can be omitted. This
551 is interpreted as +c false.
552
553 +C no_time_warp | single_time_warp | multi_time_warp:
554 Sets time warp mode:
555
556 no_time_warp:
557 No time warp mode (the default)
558
559 single_time_warp:
560 Single time warp mode
561
562 multi_time_warp:
563 Multi-time warp mode
564
565 +d:
566 If the emulator detects an internal error (or runs out of memory),
567 it, by default, generates both a crash dump and a core dump. The
568 core dump is, however, not very useful as the content of process
569 heaps is destroyed by the crash dump generation.
570
571 Option +d instructs the emulator to produce only a core dump and no
572 crash dump if an internal error is detected.
573
574 Calling erlang:halt/1 with a string argument still produces a crash
575 dump. On Unix systems, sending an emulator process a SIGUSR1 signal
576 also forces a crash dump.
577
578 +dcg DecentralizedCounterGroupsLimit:
579 Limits the number of decentralized counter groups used by decen‐
580 tralized counters optimized for update operations in the Erlang
581 runtime system. By default, the limit is 256.
582
583 When the number of schedulers is less than or equal to the limit,
584 each scheduler has its own group. When the number of schedulers is
585 larger than the groups limit, schedulers share groups. Shared
586 groups degrade the performance for updating counters while many
587 reader groups degrade the performance for reading counters. So, the
588 limit is a tradeoff between performance for update operations and
589 performance for read operations. Each group consumes 64 bytes in
590 each counter.
591
592 Notice that a runtime system using decentralized counter groups
593 benefits from binding schedulers to logical processors, as the
594 groups are distributed better between schedulers with this option.
595
596 This option only affects decentralized counters used for the coun‐
597 ters that are keeping track of the memory consumption and the num‐
598 ber of terms in ETS tables of type ordered_set with the write_con‐
599 currency option activated.
600
601 +e Number:
602 Sets the maximum number of ETS tables. This limit is partially ob‐
603 solete.
604
605 +ec:
606 Forces option compressed on all ETS tables. Only intended for test
607 and evaluation.
608
609 +fnl:
610 The virtual machine works with filenames as if they are encoded us‐
611 ing the ISO Latin-1 encoding, disallowing Unicode characters with
612 code points > 255.
613
614 For more information about Unicode filenames, see section Unicode
615 Filenames in the STDLIB User's Guide. Notice that this value also
616 applies to command-line parameters and environment variables (see
617 section Unicode in Environment and Parameters in the STDLIB User's
618 Guide).
619
620 +fnu[{w|i|e}]:
621 The virtual machine works with filenames as if they are encoded us‐
622 ing UTF-8 (or some other system-specific Unicode encoding). This is
623 the default on operating systems that enforce Unicode encoding,
624 that is, Windows MacOS X and Android.
625
626 The +fnu switch can be followed by w, i, or e to control how
627 wrongly encoded filenames are to be reported:
628
629 * w means that a warning is sent to the error_logger whenever a
630 wrongly encoded filename is "skipped" in directory listings. This
631 is the default.
632
633 * i means that those wrongly encoded filenames are silently ig‐
634 nored.
635
636 * e means that the API function returns an error whenever a wrongly
637 encoded filename (or directory name) is encountered.
638
639 Notice that file:read_link/1 always returns an error if the link
640 points to an invalid filename.
641
642 For more information about Unicode filenames, see section Unicode
643 Filenames in the STDLIB User's Guide. Notice that this value also
644 applies to command-line parameters and environment variables (see
645 section Unicode in Environment and Parameters in the STDLIB User's
646 Guide).
647
648 +fna[{w|i|e}]:
649 Selection between +fnl and +fnu is done based on the current locale
650 settings in the OS. This means that if you have set your terminal
651 for UTF-8 encoding, the filesystem is expected to use the same en‐
652 coding for filenames. This is the default on all operating systems,
653 except Android, MacOS X and Windows.
654
655 The +fna switch can be followed by w, i, or e. This has effect if
656 the locale settings cause the behavior of +fnu to be selected; see
657 the description of +fnu above. If the locale settings cause the be‐
658 havior of +fnl to be selected, then w, i, or e have no effect.
659
660 For more information about Unicode filenames, see section Unicode
661 Filenames in the STDLIB User's Guide. Notice that this value also
662 applies to command-line parameters and environment variables (see
663 section Unicode in Environment and Parameters in the STDLIB User's
664 Guide).
665
666 +hms Size:
667 Sets the default heap size of processes to the size Size.
668
669 +hmbs Size:
670 Sets the default binary virtual heap size of processes to the size
671 Size.
672
673 +hmax Size:
674 Sets the default maximum heap size of processes to the size Size.
675 Defaults to 0, which means that no maximum heap size is used. For
676 more information, see process_flag(max_heap_size, MaxHeapSize).
677
678 +hmaxel true|false:
679 Sets whether to send an error logger message or not for processes
680 reaching the maximum heap size. Defaults to true. For more informa‐
681 tion, see process_flag(max_heap_size, MaxHeapSize).
682
683 +hmaxk true|false:
684 Sets whether to kill processes reaching the maximum heap size or
685 not. Default to true. For more information, see
686 process_flag(max_heap_size, MaxHeapSize).
687
688 +hpds Size:
689 Sets the initial process dictionary size of processes to the size
690 Size.
691
692 +hmqd off_heap|on_heap:
693 Sets the default value of the message_queue_data process flag. De‐
694 faults to on_heap. If +hmqd is not passed, on_heap will be the de‐
695 fault. For more information, see process_flag(message_queue_data,
696 MQD).
697
698 +IOp PollSets:
699 Sets the number of IO pollsets to use when polling for I/O. This
700 option is only used on platforms that support concurrent updates of
701 a pollset, otherwise the same number of pollsets are used as IO
702 poll threads. The default is 1.
703
704 +IOt PollThreads:
705 Sets the number of IO poll threads to use when polling for I/O. The
706 maximum number of poll threads allowed is 1024. The default is 1.
707
708 A good way to check if more IO poll threads are needed is to use
709 microstate accounting and see what the load of the IO poll thread
710 is. If it is high it could be a good idea to add more threads.
711
712 +IOPp PollSetsPercentage:
713 Similar to +IOp but uses percentages to set the number of IO
714 pollsets to create, based on the number of poll threads configured.
715 If both +IOPp and +IOp are used, +IOPp is ignored.
716
717 +IOPt PollThreadsPercentage:
718 Similar to +IOt but uses percentages to set the number of IO poll
719 threads to create, based on the number of schedulers configured. If
720 both +IOPt and +IOt are used, +IOPt is ignored.
721
722 +JPperf true|false:
723 Enables or disables support for the `perf` profiler when running
724 with the JIT on Linux. Defaults to false.
725
726 For more details about how to run perf see the perf support section
727 in the BeamAsm internal documentation.
728
729 +L:
730 Prevents loading information about source filenames and line num‐
731 bers. This saves some memory, but exceptions do not contain infor‐
732 mation about the filenames and line numbers.
733
734 +MFlag Value:
735 Memory allocator-specific flags. For more information, see erts_al‐
736 loc(3).
737
738 +pc Range:
739 Sets the range of characters that the system considers printable in
740 heuristic detection of strings. This typically affects the shell,
741 debugger, and io:format functions (when ~tp is used in the format
742 string).
743
744 Two values are supported for Range:
745
746 latin1:
747 The default. Only characters in the ISO Latin-1 range can be con‐
748 sidered printable. This means that a character with a code point
749 > 255 is never considered printable and that lists containing
750 such characters are displayed as lists of integers rather than
751 text strings by tools.
752
753 unicode:
754 All printable Unicode characters are considered when determining
755 if a list of integers is to be displayed in string syntax. This
756 can give unexpected results if, for example, your font does not
757 cover all Unicode characters.
758
759 See also io:printable_range/0 in STDLIB.
760
761 +P Number:
762 Sets the maximum number of simultaneously existing processes for
763 this system if a Number is passed as value. Valid range for Number
764 is [1024-134217727]
765
766 NOTE: The actual maximum chosen may be much larger than the Number
767 passed. Currently the runtime system often, but not always, chooses
768 a value that is a power of 2. This might, however, be changed in
769 the future. The actual value chosen can be checked by calling er‐
770 lang:system_info(process_limit).
771
772 The default value is 262144
773
774 +Q Number:
775 Sets the maximum number of simultaneously existing ports for this
776 system if a Number is passed as value. Valid range for Number is
777 [1024-134217727]
778
779 NOTE: The actual maximum chosen may be much larger than the actual
780 Number passed. Currently the runtime system often, but not always,
781 chooses a value that is a power of 2. This might, however, be
782 changed in the future. The actual value chosen can be checked by
783 calling erlang:system_info(port_limit).
784
785 The default value used is normally 65536. However, if the runtime
786 system is able to determine maximum amount of file descriptors that
787 it is allowed to open and this value is larger than 65536, the cho‐
788 sen value will increased to a value larger or equal to the maximum
789 amount of file descriptors that can be opened.
790
791 On Windows the default value is set to 8196 because the normal OS
792 limitations are set higher than most machines can handle.
793
794 +R ReleaseNumber:
795 Sets the compatibility mode.
796
797 The distribution mechanism is not backward compatible by default.
798 This flag sets the emulator in compatibility mode with an earlier
799 Erlang/OTP release ReleaseNumber. The release number must be in the
800 range <current release>-2..<current release>. This limits the emu‐
801 lator, making it possible for it to communicate with Erlang nodes
802 (as well as C- and Java nodes) running that earlier release.
803
804 Note:
805 Ensure that all nodes (Erlang-, C-, and Java nodes) of a distributed
806 Erlang system is of the same Erlang/OTP release, or from two differ‐
807 ent Erlang/OTP releases X and Y, where all Y nodes have compatibility
808 mode X.
809
810
811 +r:
812 Forces ETS memory block to be moved on realloc.
813
814 +rg ReaderGroupsLimit:
815 Limits the number of reader groups used by read/write locks opti‐
816 mized for read operations in the Erlang runtime system. By default
817 the reader groups limit is 64.
818
819 When the number of schedulers is less than or equal to the reader
820 groups limit, each scheduler has its own reader group. When the
821 number of schedulers is larger than the reader groups limit, sched‐
822 ulers share reader groups. Shared reader groups degrade read lock
823 and read unlock performance while many reader groups degrade write
824 lock performance. So, the limit is a tradeoff between performance
825 for read operations and performance for write operations. Each
826 reader group consumes 64 byte in each read/write lock.
827
828 Notice that a runtime system using shared reader groups benefits
829 from binding schedulers to logical processors, as the reader groups
830 are distributed better between schedulers.
831
832 +S Schedulers:SchedulerOnline:
833 Sets the number of scheduler threads to create and scheduler
834 threads to set online. The maximum for both values is 1024. If the
835 Erlang runtime system is able to determine the number of logical
836 processors configured and logical processors available, Schedulers
837 defaults to logical processors configured, and SchedulersOnline de‐
838 faults to logical processors available; otherwise the default val‐
839 ues are 1. If the emulator detects that it is subject to a CPU
840 quota, the default value for SchedulersOnline will be limited ac‐
841 cordingly.
842
843 Schedulers can be omitted if :SchedulerOnline is not and con‐
844 versely. The number of schedulers online can be changed at runtime
845 through erlang:system_flag(schedulers_online, SchedulersOnline).
846
847 If Schedulers or SchedulersOnline is specified as a negative num‐
848 ber, the value is subtracted from the default number of logical
849 processors configured or logical processors available, respec‐
850 tively.
851
852 Specifying value 0 for Schedulers or SchedulersOnline resets the
853 number of scheduler threads or scheduler threads online, respec‐
854 tively, to its default value.
855
856 +SP SchedulersPercentage:SchedulersOnlinePercentage:
857 Similar to +S but uses percentages to set the number of scheduler
858 threads to create, based on logical processors configured, and
859 scheduler threads to set online, based on logical processors avail‐
860 able. Specified values must be > 0. For example, +SP 50:25 sets the
861 number of scheduler threads to 50% of the logical processors con‐
862 figured, and the number of scheduler threads online to 25% of the
863 logical processors available. SchedulersPercentage can be omitted
864 if :SchedulersOnlinePercentage is not and conversely. The number of
865 schedulers online can be changed at runtime through erlang:sys‐
866 tem_flag(schedulers_online, SchedulersOnline).
867
868 This option interacts with +S settings. For example, on a system
869 with 8 logical cores configured and 8 logical cores available, the
870 combination of the options +S 4:4 +SP 50:25 (in either order) re‐
871 sults in 2 scheduler threads (50% of 4) and 1 scheduler thread on‐
872 line (25% of 4).
873
874 +SDcpu DirtyCPUSchedulers:DirtyCPUSchedulersOnline:
875 Sets the number of dirty CPU scheduler threads to create and dirty
876 CPU scheduler threads to set online. The maximum for both values is
877 1024, and each value is further limited by the settings for normal
878 schedulers:
879
880 * The number of dirty CPU scheduler threads created cannot exceed
881 the number of normal scheduler threads created.
882
883 * The number of dirty CPU scheduler threads online cannot exceed
884 the number of normal scheduler threads online.
885
886 For details, see the +S and +SP. By default, the number of dirty
887 CPU scheduler threads created equals the number of normal scheduler
888 threads created, and the number of dirty CPU scheduler threads on‐
889 line equals the number of normal scheduler threads online. DirtyC‐
890 PUSchedulers can be omitted if :DirtyCPUSchedulersOnline is not and
891 conversely. The number of dirty CPU schedulers online can be
892 changed at runtime through erlang:system_flag(dirty_cpu_sched‐
893 ulers_online, DirtyCPUSchedulersOnline).
894
895 The amount of dirty CPU schedulers is limited by the amount of nor‐
896 mal schedulers in order to limit the effect on processes executing
897 on ordinary schedulers. If the amount of dirty CPU schedulers was
898 allowed to be unlimited, dirty CPU bound jobs would potentially
899 starve normal jobs.
900
901 Typical users of the dirty CPU schedulers are large garbage collec‐
902 tions, json protocol encode/decoders written as nifs and matrix ma‐
903 nipulation libraries.
904
905 You can use msacc(3) in order to see the current load of the dirty
906 CPU schedulers threads and adjust the number used accordingly.
907
908 +SDPcpu DirtyCPUSchedulersPercentage:DirtyCPUSchedulersOnlinePercent‐
909 age:
910 Similar to +SDcpu but uses percentages to set the number of dirty
911 CPU scheduler threads to create and the number of dirty CPU sched‐
912 uler threads to set online. Specified values must be > 0. For exam‐
913 ple, +SDPcpu 50:25 sets the number of dirty CPU scheduler threads
914 to 50% of the logical processors configured and the number of dirty
915 CPU scheduler threads online to 25% of the logical processors
916 available. DirtyCPUSchedulersPercentage can be omitted if :DirtyC‐
917 PUSchedulersOnlinePercentage is not and conversely. The number of
918 dirty CPU schedulers online can be changed at runtime through er‐
919 lang:system_flag(dirty_cpu_schedulers_online, DirtyCPUSchedulersOn‐
920 line).
921
922 This option interacts with +SDcpu settings. For example, on a sys‐
923 tem with 8 logical cores configured and 8 logical cores available,
924 the combination of the options +SDcpu 4:4 +SDPcpu 50:25 (in either
925 order) results in 2 dirty CPU scheduler threads (50% of 4) and 1
926 dirty CPU scheduler thread online (25% of 4).
927
928 +SDio DirtyIOSchedulers:
929 Sets the number of dirty I/O scheduler threads to create. Valid
930 range is 1-1024. By default, the number of dirty I/O scheduler
931 threads created is 10.
932
933 The amount of dirty IO schedulers is not limited by the amount of
934 normal schedulers like the amount of dirty CPU schedulers. This
935 since only I/O bound work is expected to execute on dirty I/O
936 schedulers. If the user should schedule CPU bound jobs on dirty I/O
937 schedulers, these jobs might starve ordinary jobs executing on or‐
938 dinary schedulers.
939
940 Typical users of the dirty IO schedulers are reading and writing to
941 files.
942
943 You can use msacc(3) in order to see the current load of the dirty
944 IO schedulers threads and adjust the number used accordingly.
945
946 +sFlag Value:
947 Scheduling specific flags.
948
949 +sbt BindType:
950 Sets scheduler bind type.
951
952 Schedulers can also be bound using flag +stbt. The only differ‐
953 ence between these two flags is how the following errors are han‐
954 dled:
955
956 * Binding of schedulers is not supported on the specific plat‐
957 form.
958
959 * No available CPU topology. That is, the runtime system was not
960 able to detect the CPU topology automatically, and no user-de‐
961 fined CPU topology was set.
962
963 If any of these errors occur when +sbt has been passed, the run‐
964 time system prints an error message, and refuses to start. If any
965 of these errors occur when +stbt has been passed, the runtime
966 system silently ignores the error, and start up using unbound
967 schedulers.
968
969 Valid BindTypes:
970
971 u:
972 unbound - Schedulers are not bound to logical processors, that
973 is, the operating system decides where the scheduler threads
974 execute, and when to migrate them. This is the default.
975
976 ns:
977 no_spread - Schedulers with close scheduler identifiers are
978 bound as close as possible in hardware.
979
980 ts:
981 thread_spread - Thread refers to hardware threads (such as In‐
982 tel's hyper-threads). Schedulers with low scheduler identi‐
983 fiers, are bound to the first hardware thread of each core,
984 then schedulers with higher scheduler identifiers are bound to
985 the second hardware thread of each core,and so on.
986
987 ps:
988 processor_spread - Schedulers are spread like thread_spread,
989 but also over physical processor chips.
990
991 s:
992 spread - Schedulers are spread as much as possible.
993
994 nnts:
995 no_node_thread_spread - Like thread_spread, but if multiple
996 Non-Uniform Memory Access (NUMA) nodes exist, schedulers are
997 spread over one NUMA node at a time, that is, all logical pro‐
998 cessors of one NUMA node are bound to schedulers in sequence.
999
1000 nnps:
1001 no_node_processor_spread - Like processor_spread, but if multi‐
1002 ple NUMA nodes exist, schedulers are spread over one NUMA node
1003 at a time, that is, all logical processors of one NUMA node are
1004 bound to schedulers in sequence.
1005
1006 tnnps:
1007 thread_no_node_processor_spread - A combination of
1008 thread_spread, and no_node_processor_spread. Schedulers are
1009 spread over hardware threads across NUMA nodes, but schedulers
1010 are only spread over processors internally in one NUMA node at
1011 a time.
1012
1013 db:
1014 default_bind - Binds schedulers the default way. Defaults to
1015 thread_no_node_processor_spread (which can change in the fu‐
1016 ture).
1017
1018 Binding of schedulers is only supported on newer Linux, Solaris,
1019 FreeBSD, and Windows systems.
1020
1021 If no CPU topology is available when flag +sbt is processed and
1022 BindType is any other type than u, the runtime system fails to
1023 start. CPU topology can be defined using flag +sct. Notice that
1024 flag +sct can have to be passed before flag +sbt on the command
1025 line (if no CPU topology has been automatically detected).
1026
1027 The runtime system does by default not bind schedulers to logical
1028 processors.
1029
1030 Note:
1031 If the Erlang runtime system is the only operating system process
1032 that binds threads to logical processors, this improves the perfor‐
1033 mance of the runtime system. However, if other operating system
1034 processes (for example another Erlang runtime system) also bind
1035 threads to logical processors, there can be a performance penalty
1036 instead. This performance penalty can sometimes be severe. If so,
1037 you are advised not to bind the schedulers.
1038
1039
1040 How schedulers are bound matters. For example, in situations when
1041 there are fewer running processes than schedulers online, the
1042 runtime system tries to migrate processes to schedulers with low
1043 scheduler identifiers. The more the schedulers are spread over
1044 the hardware, the more resources are available to the runtime
1045 system in such situations.
1046
1047 Note:
1048 If a scheduler fails to bind, this is often silently ignored, as it
1049 is not always possible to verify valid logical processor identi‐
1050 fiers. If an error is reported, it is reported to the error_logger.
1051 If you want to verify that the schedulers have bound as requested,
1052 call erlang:system_info(scheduler_bindings).
1053
1054
1055 +sbwt none|very_short|short|medium|long|very_long:
1056 Sets scheduler busy wait threshold. Defaults to medium. The
1057 threshold determines how long schedulers are to busy wait when
1058 running out of work before going to sleep.
1059
1060 Note:
1061 This flag can be removed or changed at any time without prior no‐
1062 tice.
1063
1064
1065 +sbwtdcpu none|very_short|short|medium|long|very_long:
1066 As +sbwt but affects dirty CPU schedulers. Defaults to short.
1067
1068 Note:
1069 This flag can be removed or changed at any time without prior no‐
1070 tice.
1071
1072
1073 +sbwtdio none|very_short|short|medium|long|very_long:
1074 As +sbwt but affects dirty IO schedulers. Defaults to short.
1075
1076 Note:
1077 This flag can be removed or changed at any time without prior no‐
1078 tice.
1079
1080
1081 +scl true|false:
1082 Enables or disables scheduler compaction of load. By default
1083 scheduler compaction of load is enabled. When enabled, load bal‐
1084 ancing strives for a load distribution, which causes as many
1085 scheduler threads as possible to be fully loaded (that is, not
1086 run out of work). This is accomplished by migrating load (for ex‐
1087 ample, runnable processes) into a smaller set of schedulers when
1088 schedulers frequently run out of work. When disabled, the fre‐
1089 quency with which schedulers run out of work is not taken into
1090 account by the load balancing logic.
1091
1092 +scl false is similar to +sub true, but +sub true also balances
1093 scheduler utilization between schedulers.
1094
1095 +sct CpuTopology:
1096
1097
1098 * <Id> = integer(); when 0 =< <Id> =< 65535
1099
1100 * <IdRange> = <Id>-<Id>
1101
1102 * <IdOrIdRange> = <Id> | <IdRange>
1103
1104 * <IdList> = <IdOrIdRange>,<IdOrIdRange> | <IdOrIdRange>
1105
1106 * <LogicalIds> = L<IdList>
1107
1108 * <ThreadIds> = T<IdList> | t<IdList>
1109
1110 * <CoreIds> = C<IdList> | c<IdList>
1111
1112 * <ProcessorIds> = P<IdList> | p<IdList>
1113
1114 * <NodeIds> = N<IdList> | n<IdList>
1115
1116 * <IdDefs> = <LogicalIds><ThreadIds><CoreIds><Proces‐
1117 sorIds><NodeIds> | <LogicalIds><ThreadIds><Cor‐
1118 eIds><NodeIds><ProcessorIds>
1119
1120 * CpuTopology = <IdDefs>:<IdDefs> | <IdDefs>
1121
1122 Sets a user-defined CPU topology. The user-defined CPU topology
1123 overrides any automatically detected CPU topology. The CPU topol‐
1124 ogy is used when binding schedulers to logical processors.
1125
1126 Uppercase letters signify real identifiers and lowercase letters
1127 signify fake identifiers only used for description of the topol‐
1128 ogy. Identifiers passed as real identifiers can be used by the
1129 runtime system when trying to access specific hardware; if they
1130 are incorrect the behavior is undefined. Faked logical CPU iden‐
1131 tifiers are not accepted, as there is no point in defining the
1132 CPU topology without real logical CPU identifiers. Thread, core,
1133 processor, and node identifiers can be omitted. If omitted, the
1134 thread ID defaults to t0, the core ID defaults to c0, the proces‐
1135 sor ID defaults to p0, and the node ID is left undefined. Either
1136 each logical processor must belong to only one NUMA node, or no
1137 logical processors must belong to any NUMA nodes.
1138
1139 Both increasing and decreasing <IdRange>s are allowed.
1140
1141 NUMA node identifiers are system wide. That is, each NUMA node on
1142 the system must have a unique identifier. Processor identifiers
1143 are also system wide. Core identifiers are processor wide. Thread
1144 identifiers are core wide.
1145
1146 The order of the identifier types implies the hierarchy of the
1147 CPU topology. The valid orders are as follows:
1148
1149 * <LogicalIds><ThreadIds><CoreIds><ProcessorIds><NodeIds>, that
1150 is, thread is part of a core that is part of a processor, which
1151 is part of a NUMA node.
1152
1153 * <LogicalIds><ThreadIds><CoreIds><NodeIds><ProcessorIds>, that
1154 is, thread is part of a core that is part of a NUMA node, which
1155 is part of a processor.
1156
1157 A CPU topology can consist of both processor external, and pro‐
1158 cessor internal NUMA nodes as long as each logical processor be‐
1159 longs to only one NUMA node. If <ProcessorIds> is omitted, its
1160 default position is before <NodeIds>. That is, the default is
1161 processor external NUMA nodes.
1162
1163 If a list of identifiers is used in an <IdDefs>:
1164
1165 * <LogicalIds> must be a list of identifiers.
1166
1167 * At least one other identifier type besides <LogicalIds> must
1168 also have a list of identifiers.
1169
1170 * All lists of identifiers must produce the same number of iden‐
1171 tifiers.
1172
1173 A simple example. A single quad core processor can be described
1174 as follows:
1175
1176 % erl +sct L0-3c0-3
1177 1> erlang:system_info(cpu_topology).
1178 [{processor,[{core,{logical,0}},
1179 {core,{logical,1}},
1180 {core,{logical,2}},
1181 {core,{logical,3}}]}]
1182
1183 A more complicated example with two quad core processors, each
1184 processor in its own NUMA node. The ordering of logical proces‐
1185 sors is a bit weird. This to give a better example of identifier
1186 lists:
1187
1188 % erl +sct L0-1,3-2c0-3p0N0:L7,4,6-5c0-3p1N1
1189 1> erlang:system_info(cpu_topology).
1190 [{node,[{processor,[{core,{logical,0}},
1191 {core,{logical,1}},
1192 {core,{logical,3}},
1193 {core,{logical,2}}]}]},
1194 {node,[{processor,[{core,{logical,7}},
1195 {core,{logical,4}},
1196 {core,{logical,6}},
1197 {core,{logical,5}}]}]}]
1198
1199 As long as real identifiers are correct, it is OK to pass a CPU
1200 topology that is not a correct description of the CPU topology.
1201 When used with care this can be very useful. This to trick the
1202 emulator to bind its schedulers as you want. For example, if you
1203 want to run multiple Erlang runtime systems on the same machine,
1204 you want to reduce the number of schedulers used and manipulate
1205 the CPU topology so that they bind to different logical CPUs. An
1206 example, with two Erlang runtime systems on a quad core machine:
1207
1208 % erl +sct L0-3c0-3 +sbt db +S3:2 -detached -noinput -noshell -sname one
1209 % erl +sct L3-0c0-3 +sbt db +S3:2 -detached -noinput -noshell -sname two
1210
1211 In this example, each runtime system have two schedulers each on‐
1212 line, and all schedulers online will run on different cores. If
1213 we change to one scheduler online on one runtime system, and
1214 three schedulers online on the other, all schedulers online will
1215 still run on different cores.
1216
1217 Notice that a faked CPU topology that does not reflect how the
1218 real CPU topology looks like is likely to decrease the perfor‐
1219 mance of the runtime system.
1220
1221 For more information, see erlang:system_info(cpu_topology).
1222
1223 +sfwi Interval:
1224 Sets scheduler-forced wakeup interval. All run queues are scanned
1225 each Interval milliseconds. While there are sleeping schedulers
1226 in the system, one scheduler is woken for each non-empty run
1227 queue found. Interval default to 0, meaning this feature is dis‐
1228 abled.
1229
1230 Note:
1231 This feature has been introduced as a temporary workaround for
1232 long-executing native code, and native code that does not bump re‐
1233 ductions properly in OTP. When these bugs have been fixed, this
1234 flag will be removed.
1235
1236
1237 +spp Bool:
1238 Sets default scheduler hint for port parallelism. If set to true,
1239 the virtual machine schedules port tasks when it improves paral‐
1240 lelism in the system. If set to false, the virtual machine tries
1241 to perform port tasks immediately, improving latency at the ex‐
1242 pense of parallelism. Default to false. The default used can be
1243 inspected in runtime by calling erlang:system_info(port_parallel‐
1244 ism). The default can be overridden on port creation by passing
1245 option parallelism to erlang:open_port/2.
1246
1247 +sss size:
1248 Suggested stack size, in kilowords, for scheduler threads. Valid
1249 range is 20-8192 kilowords. The default suggested stack size is
1250 128 kilowords.
1251
1252 +sssdcpu size:
1253 Suggested stack size, in kilowords, for dirty CPU scheduler
1254 threads. Valid range is 20-8192 kilowords. The default suggested
1255 stack size is 40 kilowords.
1256
1257 +sssdio size:
1258 Suggested stack size, in kilowords, for dirty IO scheduler
1259 threads. Valid range is 20-8192 kilowords. The default suggested
1260 stack size is 40 kilowords.
1261
1262 +stbt BindType:
1263 Tries to set the scheduler bind type. The same as flag +sbt ex‐
1264 cept how some errors are handled. For more information, see +sbt.
1265
1266 +sub true|false:
1267 Enables or disables scheduler utilization balancing of load. By
1268 default scheduler utilization balancing is disabled and instead
1269 scheduler compaction of load is enabled, which strives for a load
1270 distribution that causes as many scheduler threads as possible to
1271 be fully loaded (that is, not run out of work). When scheduler
1272 utilization balancing is enabled, the system instead tries to
1273 balance scheduler utilization between schedulers. That is, strive
1274 for equal scheduler utilization on all schedulers.
1275
1276 +sub true is only supported on systems where the runtime system
1277 detects and uses a monotonically increasing high-resolution
1278 clock. On other systems, the runtime system fails to start.
1279
1280 +sub true implies +scl false. The difference between +sub true
1281 and +scl false is that +scl false does not try to balance the
1282 scheduler utilization.
1283
1284 +swct very_eager|eager|medium|lazy|very_lazy:
1285 Sets scheduler wake cleanup threshold. Defaults to medium. Con‐
1286 trols how eager schedulers are to be requesting wakeup because of
1287 certain cleanup operations. When a lazy setting is used, more
1288 outstanding cleanup operations can be left undone while a sched‐
1289 uler is idling. When an eager setting is used, schedulers are
1290 more frequently woken, potentially increasing CPU-utilization.
1291
1292 Note:
1293 This flag can be removed or changed at any time without prior no‐
1294 tice.
1295
1296
1297 +sws default|legacy:
1298 Sets scheduler wakeup strategy. Default strategy changed in ERTS
1299 5.10 (Erlang/OTP R16A). This strategy was known as proposal in
1300 Erlang/OTP R15. The legacy strategy was used as default from R13
1301 up to and including R15.
1302
1303 Note:
1304 This flag can be removed or changed at any time without prior no‐
1305 tice.
1306
1307
1308 +swt very_low|low|medium|high|very_high:
1309 Sets scheduler wakeup threshold. Defaults to medium. The thresh‐
1310 old determines when to wake up sleeping schedulers when more work
1311 than can be handled by currently awake schedulers exists. A low
1312 threshold causes earlier wakeups, and a high threshold causes
1313 later wakeups. Early wakeups distribute work over multiple sched‐
1314 ulers faster, but work does more easily bounce between sched‐
1315 ulers.
1316
1317 Note:
1318 This flag can be removed or changed at any time without prior no‐
1319 tice.
1320
1321
1322 +swtdcpu very_low|low|medium|high|very_high:
1323 As +swt but affects dirty CPU schedulers. Defaults to medium.
1324
1325 Note:
1326 This flag can be removed or changed at any time without prior no‐
1327 tice.
1328
1329
1330 +swtdio very_low|low|medium|high|very_high:
1331 As +swt but affects dirty IO schedulers. Defaults to medium.
1332
1333 Note:
1334 This flag can be removed or changed at any time without prior no‐
1335 tice.
1336
1337
1338 +t size:
1339 Sets the maximum number of atoms the virtual machine can handle.
1340 Defaults to 1,048,576.
1341
1342 +T Level:
1343 Enables modified timing and sets the modified timing level. Valid
1344 range is 0-9. The timing of the runtime system is changed. A high
1345 level usually means a greater change than a low level. Changing the
1346 timing can be very useful for finding timing-related bugs.
1347
1348 Modified timing affects the following:
1349
1350 Process spawning:
1351 A process calling spawn, spawn_link, spawn_monitor, or spawn_opt
1352 is scheduled out immediately after completing the call. When
1353 higher modified timing levels are used, the caller also sleeps
1354 for a while after it is scheduled out.
1355
1356 Context reductions:
1357 The number of reductions a process is allowed to use before it is
1358 scheduled out is increased or reduced.
1359
1360 Input reductions:
1361 The number of reductions performed before checking I/O is in‐
1362 creased or reduced.
1363
1364 Note:
1365 Performance suffers when modified timing is enabled. This flag is
1366 only intended for testing and debugging.
1367
1368 return_to and return_from trace messages are lost when tracing on the
1369 spawn BIFs.
1370
1371 This flag can be removed or changed at any time without prior notice.
1372
1373
1374 +v:
1375 Verbose.
1376
1377 +V:
1378 Makes the emulator print its version number.
1379
1380 +W w | i | e:
1381 Sets the mapping of warning messages for error_logger. Messages
1382 sent to the error logger using one of the warning routines can be
1383 mapped to errors (+W e), warnings (+W w), or information reports
1384 (+W i). Defaults to warnings. The current mapping can be retrieved
1385 using error_logger:warning_map/0. For more information, see er‐
1386 ror_logger:warning_map/0 in Kernel.
1387
1388 +zFlag Value:
1389 Miscellaneous flags:
1390
1391 +zdbbl size:
1392 Sets the distribution buffer busy limit (dist_buf_busy_limit) in
1393 kilobytes. Valid range is 1-2097151. Defaults to 1024.
1394
1395 A larger buffer limit allows processes to buffer more outgoing
1396 messages over the distribution. When the buffer limit has been
1397 reached, sending processes will be suspended until the buffer
1398 size has shrunk. The buffer limit is per distribution channel. A
1399 higher limit gives lower latency and higher throughput at the ex‐
1400 pense of higher memory use.
1401
1402 +zdntgc time:
1403 Sets the delayed node table garbage collection time (de‐
1404 layed_node_table_gc) in seconds. Valid values are either infinity
1405 or an integer in the range 0-100000000. Defaults to 60.
1406
1407 Node table entries that are not referred linger in the table for
1408 at least the amount of time that this parameter determines. The
1409 lingering prevents repeated deletions and insertions in the ta‐
1410 bles from occurring.
1411
1413 ERL_CRASH_DUMP:
1414 If the emulator needs to write a crash dump, the value of this
1415 variable is the filename of the crash dump file. If the variable is
1416 not set, the name of the crash dump file is erl_crash.dump in the
1417 current directory.
1418
1419 ERL_CRASH_DUMP_NICE:
1420 Unix systems: If the emulator needs to write a crash dump, it uses
1421 the value of this variable to set the nice value for the process,
1422 thus lowering its priority. Valid range is 1-39 (higher values are
1423 replaced with 39). The highest value, 39, gives the process the
1424 lowest priority.
1425
1426 ERL_CRASH_DUMP_SECONDS:
1427 Unix systems: This variable gives the number of seconds that the
1428 emulator is allowed to spend writing a crash dump. When the given
1429 number of seconds have elapsed, the emulator is terminated.
1430
1431 ERL_CRASH_DUMP_SECONDS=0:
1432 If the variable is set to 0 seconds, the runtime system does not
1433 even attempt to write the crash dump file. It only terminates.
1434 This is the default if option -heart is passed to erl and
1435 ERL_CRASH_DUMP_SECONDS is not set.
1436
1437 ERL_CRASH_DUMP_SECONDS=S:
1438 If the variable is set to a positive value S, wait for S seconds
1439 to complete the crash dump file and then terminates the runtime
1440 system with a SIGALRM signal.
1441
1442 ERL_CRASH_DUMP_SECONDS=-1:
1443 A negative value causes the termination of the runtime system to
1444 wait indefinitely until the crash dump file has been completly
1445 written. This is the default if option -heart is not passed to
1446 erl and ERL_CRASH_DUMP_SECONDS is not set.
1447
1448 See also heart(3).
1449
1450 ERL_CRASH_DUMP_BYTES:
1451 This variable sets the maximum size of a crash dump file in bytes.
1452 The crash dump will be truncated if this limit is exceeded. If the
1453 variable is not set, no size limit is enforced by default. If the
1454 variable is set to 0, the runtime system does not even attempt to
1455 write a crash dump file.
1456
1457 Introduced in ERTS 8.1.2 (Erlang/OTP 19.2).
1458
1459 ERL_AFLAGS:
1460 The content of this variable is added to the beginning of the com‐
1461 mand line for erl.
1462
1463 Flag -extra is treated in a special way. Its scope ends at the end
1464 of the environment variable content. Arguments following an -extra
1465 flag are moved on the command line into section -extra, that is,
1466 the end of the command line following an -extra flag.
1467
1468 ERL_ZFLAGS and ERL_FLAGS:
1469 The content of these variables are added to the end of the command
1470 line for erl.
1471
1472 Flag -extra is treated in a special way. Its scope ends at the end
1473 of the environment variable content. Arguments following an -extra
1474 flag are moved on the command line into section -extra, that is,
1475 the end of the command line following an -extra flag.
1476
1477 ERL_LIBS:
1478 Contains a list of additional library directories that the code
1479 server searches for applications and adds to the code path; see
1480 code(3).
1481
1482 ERL_EPMD_ADDRESS:
1483 Can be set to a comma-separated list of IP addresses, in which case
1484 the epmd daemon listens only on the specified address(es) and on
1485 the loopback address (which is implicitly added to the list if it
1486 has not been specified).
1487
1488 ERL_EPMD_PORT:
1489 Can contain the port number to use when communicating with epmd.
1490 The default port works fine in most cases. A different port can be
1491 specified to allow nodes of independent clusters to co-exist on the
1492 same host. All nodes in a cluster must use the same epmd port num‐
1493 ber.
1494
1496 On Unix systems, the Erlang runtime will interpret two types of sig‐
1497 nals.
1498
1499 SIGUSR1:
1500 A SIGUSR1 signal forces a crash dump.
1501
1502 SIGTERM:
1503 A SIGTERM will produce a stop message to the init process. This is
1504 equivalent to a init:stop/0 call.
1505
1506 Introduced in ERTS 8.3 (Erlang/OTP 19.3)
1507
1508 The signal SIGUSR2 is reserved for internal usage. No other signals are
1509 handled.
1510
1512 The standard Erlang/OTP system can be reconfigured to change the de‐
1513 fault behavior on startup.
1514
1515 The .erlang startup file:
1516 When Erlang/OTP is started, the system searches for a file named
1517 .erlang in the user's home directory.
1518
1519 If an .erlang file is found, it is assumed to contain valid Erlang
1520 expressions. These expressions are evaluated as if they were input
1521 to the shell.
1522
1523 A typical .erlang file contains a set of search paths, for example:
1524
1525 io:format("executing user profile in HOME/.erlang\n",[]).
1526 code:add_path("/home/calvin/test/ebin").
1527 code:add_path("/home/hobbes/bigappl-1.2/ebin").
1528 io:format(".erlang rc finished\n",[]).
1529
1530 user_default and shell_default:
1531 Functions in the shell that are not prefixed by a module name are
1532 assumed to be functional objects (funs), built-in functions (BIFs),
1533 or belong to the module user_default or shell_default.
1534
1535 To include private shell commands, define them in a module user_de‐
1536 fault and add the following argument as the first line in the .er‐
1537 lang file:
1538
1539 code:load_abs("..../user_default").
1540
1541 erl:
1542 If the contents of .erlang are changed and a private version of
1543 user_default is defined, the Erlang/OTP environment can be custom‐
1544 ized. More powerful changes can be made by supplying command-line
1545 arguments in the startup script erl. For more information, see
1546 init(3).
1547
1549 epmd(1), erl_prim_loader(3), erts_alloc(3), init(3), application(3),
1550 auth(3), code(3), erl_boot_server(3), heart(3), net_kernel(3), make(3)
1551
1552
1553
1554Ericsson AB erts 12.1.5 erl(1)