RAM consumed by Elixir/Phoenix/Erlang Virt. Machine

My website running on Linux written in Phoenix and which very few visitors visit is consuming this much resources, as shown by “top”

  PID USER      PR  NI    VIRT    RES %CPU %MEM     TIME+ S COMMAND                                                                                            

  21752 my_user   20   0   13.7m   3.4m  0.0  0.3   0:00.00 S  `- my_app
  1. 3.5 Mb or RAM? How can that be? Why so ridiculously small? Even an app, say, in Rust, consumes around 10 Mb. Let alone Ruby. The ruby framework roda consumes around 50 Mb, and Rails - around 200 Mb.

But 3.5 Mb… what’s the catch?

  1. How do I know what the overhead – the RAM consumed – of the Erlang virtual machine?


actually, there’re a few processes there related my website and beam and the one which looks like the one I need is consuming around 60 Mb. Now it makes more sense.

1 Like

I recommend installing htop and turning on tree view, Show custom thread names, and Display threads in different color. That really helps visualise what programs are running, what threads they have, their family tree, how much memory is used, etc.


Please refer to the answer to the question “How do I measuere memory consumption in an Erlang syxstem?” in the erlang FAQ.

It tells you how to retrieve much better information about memory consumption of your application.

1 Like