Erlang - Question on memory usage reported

Rajesh Bhat <>
Wed Jun 16 14:55:00 CEST 2010

Hi All,

Apologies for the long email...

I am running an application that starts up with a memory footprint of around ~725MB when started (Approx 9000 processes on startup).. Application spawns processes as new requests are processed and grows to about 50K processes and memory usage of 5.1GB during the day. Output of memory(). is as follows -


At the end of the day, a cleanup job reviews the process state and kills the pids that are not required and cleans up the ets table. Essentially returning it to start up stage of around 9K processes. Running the memory command in erlang shell reports -


Which is pretty consistent with what I am expecting, however running 'htop' on the system still indicates Erlang beam process with a resident memory usage of around 5.1GB. Any pointers that explains this behavior is greatly appreciated. Is there a way to release the memory? There was a suggestion in one of the Erlang forums that bouncing the Supervisor process as part of the clean up could be one of the options? Anyone with similar experience?

I am running the version - Erlang R13B02 (erts-5.7.3)

Thanks much
-- Rajesh Bhat.


for terms and conditions related to this email

More information about the erlang-questions mailing list