[rabbitmq-discuss] [help] [beginner] server stops sending messages; publish (in transaction) hangs on commit

Simon MacMullen simon at rabbitmq.com
Thu Feb 23 17:57:28 GMT 2012


On 23/02/12 16:58, Alistair Bayley wrote:
> Why is it not able to free memory? A rabbitmqctl report on a freshly
> started server shows total memory about 10M, what causes it to grow
> and not shrink back? This server is currently doing literally nothing
> - all queues are empty - so I'd like to know why total memory doesn't
> drop back down to something close to the initial state.

The report you posted showed most memory in the VM being used by Erlang 
processes. You could run something like:

rabbitmqctl eval 
'lists:sublist(lists:reverse(lists:sort([{process_info(Pid,memory), Pid, 
process_info(Pid)} || Pid <- processes()])), 10).'

to list the top 10 processes by memory use, along with some information 
for each one. This may tell us something interesting.

Having said that, 100Mb for an idle server does not seem totally 
unreasonable - RabbitMQ is not optimised for small memory use when idle.

> It is running on a deliberately small VM. As it is the only service on
> the VM (the VM exists solely to host rabbitmq) we can increase the
> vm_memory_high_watermark . I would try 80%, is there a reason to go
> higher (or not)?.

The reason we set 0.4 is that in a worst case scenario memory use can 
double during GC. That's relatively unlikely though and assuming you 
have some swapspace as well it will not be too bad if you do.

Cheers, Simon

-- 
Simon MacMullen
RabbitMQ, VMware


More information about the rabbitmq-discuss mailing list