[rabbitmq-discuss] What to do when high watermark reached?

Marek Majkowski majek04 at gmail.com
Tue Sep 27 21:01:28 BST 2011


2011/9/27 François Beausoleil <francois at teksol.info>:
> Le mardi 27 septembre 2011 à 11:08, Marek Majkowski a écrit :
>> The easiest thing to do is to beef up your machine and give Rabbit
>> more RAM (adding a SSD drive may additionally help :P).
> Oops, I can give it more RAM, being on Rackspace, but SSDs are another matter.
>
> I ended up purging my queue, which enabled me to proceed. I'll use more connections in the future.
>
> If I dedicate a machine to RabbitMQ, can/should I change the HWM setting from 40%?

It all depends on your setup!

If you're using one fat queue - most of the memory Rabbit is using
will be consumed,
probably by this queue. Thus, the Erlang VM garbage collector will
need to collect
a lot of data at once.

For such setup, you need to have at least 50% free memory to allow GC to run
without hitting the swap.

That's the pessimistic case, and that's why the default is 40% (one
queue + twice
as much memory to allow the gc to run smoothly + 20% buffer).

On the other hand, if you're using multiple queues (and they have similar
usage pattern), you can probably increase the memory watermark -
Erlang VM is unlikely to reclaim all the memory that rabbit is using at once.
But it gets more risky :)

If the GC will hit the swap, Rabbit will slow down significantly. If the GC
will want to allocate more memory than is available in swap, it may
crash Erlang VM.

Marek


More information about the rabbitmq-discuss mailing list