<div dir="ltr">Simon:<br><br>Is it messages or connections that it blocks? �I thought it would block new connections but still allow existing connections to publish messages? �At what point does rabbit start paging to disk on the messages? �Is that at 50% of the vm memory threshold? �<div>
<br></div><div>Jason</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Mar 7, 2014 at 11:45 AM, Simon MacMullen <span dir="ltr"><<a href="mailto:simon@rabbitmq.com" target="_blank">simon@rabbitmq.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 07/03/2014 5:16PM, Dmitry Andrianov wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello.<br>
</blockquote>
<br>
Hi.<div class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
We are trying to load-test RabbitMQ server in different configurations<br>
on Amazon EC2 node.<br>
Most of our tests end with Linux OOM killer intervening and killing Rabbit.<br>
That is something I cannot really understand especially given that it is<br>
reproducible even with vm_memory_high_watermark set to 0.2 and no other<br>
processes running on that box.<br>
So if someone could shed some light onto that issue it would help a lot.<br>
<br>
Below the status response not long before the process was killed:<br>
</blockquote>
<br></div>
<snip><div class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Couple of strange things there are:<br>
<br>
1. {vm_memory_limit,804643635} but still memory {total,1984625336}. How<br>
is that possible? <a href="https://www.rabbitmq.com/memory.html" target="_blank">https://www.rabbitmq.com/<u></u>memory.html</a> says that erlang<br>
process can take twice the configured size so I expected that but it is<br>
definitely more than twice.<br>
</blockquote>
<br></div>
The only ways RabbitMQ has of preventing memory use from increasing are to do with messages - when the memory alarm goes off it will stop accepting new messages, and before that point it will start trying to reduce memory use by paging messages out to disc.<br>

<br>
Normally, messages are the biggest user of memory in RabbitMQ, so this approach works OK.<br>
<br>
However, your test ends up causing RabbitMQ to end up using the majority of its memory in connection processes - you have 11k connections open, at about 120kB each.<br>
<br>
We don't prevent RabbitMQ from accepting new connections when the memory alarm goes off since our main worry is messages - and those connections could be intending to consume messages and thus reduce memory pressure.<br>

<br>
So I guess you might want to reduce the ulimit, so that RabbitMQ runs out of file descriptors before it runs out of memory (when it runs out of FDs it *will* stop accepting network connections gracefully).<div class=""><br>

<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2. {plugins,-44730984} - how this one is possible?<br>
</blockquote>
<br></div>
That's a good question!<br>
<br>
That value is calculated from (memory used by all plugins including management) - (memory used by the management database). So somehow the memory counter managed to determine that "all plugins" used less memory than just the management plugin. I'll look into that.<br>

<br>
Cheers, Simon<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Simon MacMullen<br>
RabbitMQ, Pivotal</font></span><div class="HOEnZb"><div class="h5"><br>
______________________________<u></u>_________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@lists.<u></u>rabbitmq.com</a><br>
<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/<u></u>cgi-bin/mailman/listinfo/<u></u>rabbitmq-discuss</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Jason McIntosh<br><a href="https://github.com/jasonmcintosh/" target="_blank">https://github.com/jasonmcintosh/</a><br>573-424-7612</div>

</div>