[erlang-questions] Preallocate memory

Gustav Simonsson gustav.simonsson@REDACTED
Sat Jun 1 01:05:14 CEST 2013


Hi,

Afaik there is no flag for the Erlang VM to tell it to preallocate memory.

There is however the +hms flag to increase the default heap size of Erlang
processes.
You may want to look at the +hmbs and +a flags [1] as well depending on how
your Erlang application is constructed.

There is also a ton of flags for the Erlang allocators [2] which could be
useful.

The most efficient way however, if you want to limit the RAM usage of your
Java app, is probably to configure the JVM with the -Xmx flag [3], or use
something like ulimit [4] or cgroups [5] to limit the JVM.

Cheers,
Gustav

[1] http://www.erlang.org/doc/man/erl.html
[2] http://www.erlang.org/doc/man/erts_alloc.html#flags
[3] http://docs.oracle.com/javase/7/docs/technotes/tools/solaris/java.html)
[4] http://ss64.com/bash/ulimit.html
[5] https://www.kernel.org/doc/Documentation/cgroups/memory.txt


On Fri, May 31, 2013 at 4:36 PM, Matthew Evans <mattevans123@REDACTED>wrote:

> Hi Group
>
> What is the best way (if it's possible) to preallocate memory on startup
> for the Erlang VM? On our setup we have a low priority Java app that we
> don't want to consume RAM that is needed for the higher priority Erlang VM.
>
> Thanks
>
> Matt
>
> Sent from my iPhone
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130601/fdb6538f/attachment.htm>


More information about the erlang-questions mailing list