1erts_alloc_config(3)       Erlang Module Definition       erts_alloc_config(3)
2
3
4

NAME

6       erts_alloc_config - Configuration tool for erts_alloc
7

DESCRIPTION

9   Warning:
10       This  (experimental)  tool  no  longer produces good configurations and
11       cannot be fixed in a reasonably backwards  compatible  manner.  It  has
12       therefore been scheduled for removal in OTP 26.0.
13
14
15       erts_alloc(3)  is  an  Erlang Run-Time System internal memory allocator
16       library. erts_alloc_config is intended to be used to aid creation of an
17       erts_alloc(3)  configuration  that  is suitable for a limited number of
18       runtime scenarios. The configuration that erts_alloc_config produce  is
19       intended as a suggestion, and may need to be adjusted manually.
20
21       The  configuration  is  created  based on information about a number of
22       runtime scenarios. It is obviously impossible to foresee every  runtime
23       scenario  that  can occur. The important scenarios are those that cause
24       maximum or minimum load on specific memory  allocators.  Load  in  this
25       context is total size of memory blocks allocated.
26
27       The current implementation of erts_alloc_config concentrate on configu‐
28       ration of multi-block carriers. Information  gathered  when  a  runtime
29       scenario is saved is mainly current and maximum use of multi-block car‐
30       riers. If a parameter that change the use of  multi-block  carriers  is
31       changed,  a  previously generated configuration is invalid and erts_al‐
32       loc_config needs to be run again. It is mainly the single block carrier
33       threshold  that effects the use of multi-block carriers, but other sin‐
34       gle-block carrier parameters might as well. If another value of a  sin‐
35       gle  block  carrier  parameter than the default is desired, use the de‐
36       sired value when running erts_alloc_config.
37
38       A configuration is created in the following way:
39
40         * Pass the +Mea config command-line flag to the Erlang runtime system
41           you  are  going to use for creation of the allocator configuration.
42           It will disable features that prevent erts_alloc_config from  doing
43           its  job. Note, you should not use this flag when using the created
44           configuration. Also note that it is important that you use the same
45           amount of schedulers when creating the configuration as you are go‐
46           ing the use on the system using the configuration.
47
48         * Run your applications with different scenarios (the more  the  bet‐
49           ter)  and save information about each scenario by calling save_sce‐
50           nario/0. It may be hard to know when the  applications  are  at  an
51           (for erts_alloc_config) important runtime scenario. A good approach
52           may therefore be to call save_scenario/0 repeatedly, e.g. once  ev‐
53           ery  tenth second. Note that it is important that your applications
54           reach the runtime scenarios that are important for  erts_alloc_con‐
55           fig when you are saving scenarios; otherwise, the configuration may
56           perform bad.
57
58         * When you have covered all scenarios, call make_config/1 in order to
59           create a configuration. The configuration is written to a file that
60           you have chosen. This configuration file can later be  read  by  an
61           Erlang  runtime-system  at  startup. Pass the command line argument
62           -args_file FileName to the erl(1) command.
63
64         * The configuration produced by erts_alloc_config may need to be man‐
65           ually  adjusted  as already stated. Do not modify the file produced
66           by erts_alloc_config; instead, put your  modifications  in  another
67           file  and load this file after the file produced by erts_alloc_con‐
68           fig. That is, put the -args_file FileName argument that reads  your
69           modification  file  later  on  the command-line than the -args_file
70           FileName argument that reads the  configuration  file  produced  by
71           erts_alloc_config. If a memory allocation parameter appear multiple
72           times, the last version of will be used, i.e., you can override pa‐
73           rameters  in  the configuration file produced by erts_alloc_config.
74           Doing it this way simplifies things when you want to rerun erts_al‐
75           loc_config.
76
77   Note:
78       The  configuration  created  by erts_alloc_config may perform bad, ever
79       horrible, for runtime scenarios that are very different from  the  ones
80       saved  when  creating the configuration. You are, therefore, advised to
81       rerun erts_alloc_config if the applications run when the  configuration
82       was  made  are changed, or if the load on the applications have changed
83       since the configuration  was  made.  You  are  also  advised  to  rerun
84       erts_alloc_config if the Erlang runtime system used is changed.
85
86
87       erts_alloc_config  saves  information  about runtime scenarios and per‐
88       forms computations in a  server  that  is  automatically  started.  The
89       server register itself under the name '__erts_alloc_config__'.
90

EXPORTS

92       save_scenario() -> ok | {error, Error}
93
94              Types:
95
96                 Error = term()
97
98              save_scenario/0 saves information about the current runtime sce‐
99              nario. This information will later be used  when  make_config/0,
100              or make_config/1 is called.
101
102              The  first  time  save_scenario/0  is  called  a  server will be
103              started. This server will save runtime scenarios. All saved sce‐
104              narios can be removed by calling stop/0.
105
106       make_config() -> ok | {error, Error}
107
108              Types:
109
110                 Error = term()
111
112              This is the same as calling make_config(group_leader()).
113
114       make_config(FileNameOrIODev) -> ok | {error, Error}
115
116              Types:
117
118                 FileNameOrIODev = string() | io_device()
119                 Error = term()
120
121              make_config/1 uses the information previously saved by save_sce‐
122              nario/0 in order to  produce  an  erts_alloc  configuration.  At
123              least  one  scenario  have had to be saved. All scenarios previ‐
124              ously saved will be used when creating the configuration.
125
126              If FileNameOrIODev is a string(), make_config/1 will  use  File‐
127              NameOrIODev  as a filename. A file named FileNameOrIODev is cre‐
128              ated and the configuration will be  written  to  that  file.  If
129              FileNameOrIODev  is an io_device() (see the documentation of the
130              module io), the configuration will be written to the io device.
131
132       stop() -> ok | {error, Error}
133
134              Types:
135
136                 Error = term()
137
138              Stops the server that saves runtime scenarios.
139

SEE ALSO

141       erts_alloc(3), erl(1), io(3)
142
143
144
145Ericsson AB                   runtime_tools 1.19          erts_alloc_config(3)
Impressum