[erlang-questions] Setting maximum amount of data allocated by an Erlang node.‏

Kannan vasdeveloper@REDACTED
Sat Sep 5 21:27:16 CEST 2015


Akash,

First step of curing this is finding out what is eating the memory. Data on
the sockets, opened files, in-memory database, atom storage, in-memory data
structure, number of Erlang processes spawned with each using considerable
amount of memory... there are plenty more. If you figure out what is eating
the memory, you can put a CAP on that specific thing, than just limiting
the total memory available to the VM/OS process. I would suggest to find
out the root cause and revisit the design.

Theepan















On Sat, Sep 5, 2015 at 5:37 PM, Akash Chowdhury <achowdhury918@REDACTED>
wrote:

> The use case is that the application is using huge memory. In some
> occurrences, one node grew until 100GB and the application as well as the
> box crashed. We would like to setup a limit so that application and box
> doesn't crash.
> Thanks.
>
> On Sat, Sep 5, 2015 at 4:20 AM, Michael Truog <mjtruog@REDACTED> wrote:
>
>> On 09/04/2015 06:44 PM, Zulfiqer Sekender wrote:
>>
>> Thanks for the reply. Can't we do anything from Erlang level?
>> Thanks.
>>
>> Its a bit complex to track the exact amount of memory inside the Erlang
>> VM in Erlang source code to do
>> something useful with the information due to the various memory pools and
>> the garbage collection.
>> However, there is some code at https://github.com/okeuday/erlang_term/
>> which returns the upper limit
>> for some Erlang term's memory consumption.  The result can then be used
>> in Erlang source code for
>> determining how to avoid excessive memory consumption, to avoid a crash.
>> CloudI uses this to limit the
>> incoming queue of a CloudI service with the queue_size service
>> configuration option
>> (http://cloudi.org/api.html#2_services_add_config_opts).
>>
>>
>>
>> ------------------------------
>> Date: Sat, 5 Sep 2015 05:45:01 +0530
>> From: vasdeveloper@REDACTED
>> To: achowdhury918@REDACTED
>> CC: erlang-questions@REDACTED
>> Subject: Re: [erlang-questions] Setting maximum amount of data allocated
>> by an Erlang node.‏
>>
>> Please look at OS level configurations. If you are using Linux or Unix
>> system, check ULIMIT command.
>>
>> Theepan
>>
>> On Sat, Sep 5, 2015 at 5:23 AM, Akash Chowdhury <achowdhury918@REDACTED>
>> wrote:
>>
>> Hi,
>>
>> I would like to set a number for
>>
>> a)      simultaneously alive maximum Erlang processes in an Erlang node
>>  and
>>
>> b)      for maximum amount of data allocated by an Erlang node
>>
>> I know that for process, I have to use the *+P
>> <http://www.erlang.org/doc/man/erl.html#max_processes>* command-line
>> flag. But what I have to do for setting maximum amount of data allocated by
>> an Erlang node.
>>
>> I looked at the following documentation:
>>
>> http://www.erlang.org/doc/efficiency_guide/advanced.html
>>
>> It says setting maximum amount of data allocated by an Erlang node is
>> possible, but it doesn’t say how.
>>
>> Any help will be highly appreciated.
>>
>> Thanks.
>>
>> -
>>
>> Akash
>>
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions
>>
>>
>>
>> _______________________________________________ erlang-questions mailing
>> list erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions
>>
>>
>> _______________________________________________
>> erlang-questions mailing listerlang-questions@REDACTED://erlang.org/mailman/listinfo/erlang-questions
>>
>>
>>
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions
>>
>>
>
> _______________________________________________
> 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/20150906/1754e1ea/attachment.htm>


More information about the erlang-questions mailing list