Erlang consumes memory suddenly

Evgeniy Khramtsov <>
Mon Jul 26 16:49:15 CEST 2010


This is a cross-posting from erl-q@, sorry for annoying, but perhaps 
someone can help me in this list ;)

Recently we played with emulator '+Musbct 5' flag in ejabberd to reduce 
memory consumption. All was fine in stress testing, so we tried it in 
production. Several hours everything was good but then suddenly Erlang 
started to consume RSS memory and finally we stopped it (due to out of 
RAM available). We monitor memory, so you can see the spike here: 
http://kuku.jabber.ru/~xram/ejabberd_memory-day.png
As you can see, no processes/system memory was consumed.

So my questions are:
1) Is this a bug or a feature? If this is a feature, is it possible to 
know what consumed memory?
2) If +Musbct option works incorrectly, then what option should we use 
to decrease the difference between erlang:memory(total) and RSS? 
Sometimes this difference reaches up to 2Gb of RSS.

We are running R13B04, all linked-in drivers use 
driver_alloc/driver_free/driver_realloc (either directly or through 
provided memory callbacks).
Currently we are trying +Musbct 20 :)

-- 
Regards,
Evgeniy Khramtsov, ProcessOne.
xmpp:



More information about the erlang-bugs mailing list