erts_alloc_config.3erl - Man Page

Configuration tool for erts_alloc



This (experimental) tool no longer produces good configurations and cannot be fixed in a reasonably backwards compatible manner. It has therefore been scheduled for removal in OTP 26.0.

erts_alloc(3) is an Erlang Run-Time System internal memory allocator library. erts_alloc_config is intended to be used to aid creation of an erts_alloc(3) configuration that is suitable for a limited number of runtime scenarios. The configuration that erts_alloc_config produce is intended as a suggestion, and may need to be adjusted manually.

The configuration is created based on information about a number of runtime scenarios. It is obviously impossible to foresee every runtime scenario that can occur. The important scenarios are those that cause maximum or minimum load on specific memory allocators. Load in this context is total size of memory blocks allocated.

The current implementation of erts_alloc_config concentrate on configuration of multi-block carriers. Information gathered when a runtime scenario is saved is mainly current and maximum use of multi-block carriers. If a parameter that change the use of multi-block carriers is changed, a previously generated configuration is invalid and erts_alloc_config needs to be run again. It is mainly the single block carrier threshold that effects the use of multi-block carriers, but other single-block carrier parameters might as well. If another value of a single block carrier parameter than the default is desired, use the desired value when running erts_alloc_config.

A configuration is created in the following way:


The configuration created by erts_alloc_config may perform bad, ever horrible, for runtime scenarios that are very different from the ones saved when creating the configuration. You are, therefore, advised to rerun erts_alloc_config if the applications run when the configuration was made are changed, or if the load on the applications have changed since the configuration was made. You are also advised to rerun erts_alloc_config if the Erlang runtime system used is changed.

erts_alloc_config saves information about runtime scenarios and performs computations in a server that is automatically started. The server register itself under the name '__erts_alloc_config__'.


save_scenario() -> ok | {error, Error}


Error = term()

save_scenario/0 saves information about the current runtime scenario. This information will later be used when make_config/0, or make_config/1 is called.

The first time save_scenario/0 is called a server will be started. This server will save runtime scenarios. All saved scenarios can be removed by calling stop/0.

make_config() -> ok | {error, Error}


Error = term()

This is the same as calling make_config(group_leader()).

make_config(FileNameOrIODev) -> ok | {error, Error}


FileNameOrIODev = string() | io_device()
Error = term()

make_config/1 uses the information previously saved by save_scenario/0 in order to produce an erts_alloc configuration. At least one scenario have had to be saved. All scenarios previously saved will be used when creating the configuration.

If FileNameOrIODev is a string(), make_config/1 will use FileNameOrIODev as a filename. A file named FileNameOrIODev is created and the configuration will be written to that file. If FileNameOrIODev is an io_device() (see the documentation of the module io), the configuration will be written to the io device.

stop() -> ok | {error, Error}


Error = term()

Stops the server that saves runtime scenarios.

See Also

erts_alloc(3), erl(1), io(3)

Referenced By


runtime_tools 1.19 Ericsson AB Erlang Module Definition