[rabbitmq-discuss] EXT :Re: Memory not flushing to disk

Emile Joubert emile at rabbitmq.com
Wed Apr 24 14:23:51 BST 2013


On 24/04/13 13:50, Rodrian, Logan P (IS) wrote:
> You mentioned batching messages.  Is this something that is done by
> the producer when sending to the broker or a setting within
> RabbitMQ?

Batching and unbatching is not performed by the broker, so this is
something that would need to be done by producers and consumers.

> What does RabbitMQ do with the RAM indexes when it is shutdown?  I
> assume it writes to disk somehow and then reads the indexes back into
> RAM upon startup.  Does this process only happen upon shutdown and
> never during execution?  i.e. it never pages the RAM index to disk
> when out of space?

The rabbit_msg_store_index behaviour contains recover and terminate
callbacks. The default implementation included with the broker makes use
of Erlang Term Storage (ETS) tables that are read from and saved to disk
upon boot and shutdown respectively, but not during execution.

Alternatives (e.g. rabbit_toke) with different RAM requirements do
exist, or you can provide your own. The behaviour to implement is here:

http://hg.rabbitmq.com/rabbitmq-server/file/default/src/rabbit_msg_store_index.erl

The default implementation:
http://hg.rabbitmq.com/rabbitmq-server/file/default/src/rabbit_msg_store_ets_index.erl





-Emile





More information about the rabbitmq-discuss mailing list