rabbitmq / rabbitmq-common

Common library used by rabbitmq-server and rabbitmq-erlang-client
Other
66 stars 112 forks source link

To alarm when the Erlang process memory is greater than the free memory #350

Closed tomyouyou closed 4 years ago

tomyouyou commented 4 years ago

%% In practice Erlang shouldn't be allowed to grow to more than a half %% of available memory. The pessimistic scenario is when the Erlang VM %% has a single process that's consuming all memory. In such a case, %% during garbage collection, Erlang tries to allocate a huge chunk of %% continuous memory, which can result in a crash or heavy swapping. Copied from vm_memory_monitor.erl

So if memory the Erlang process consumed is greater than the free memory of the OS, the Erlang GC might not work.

The PR only deals with the Linux OS at present.