[rabbitmq-discuss] RabbitMQ 2.3.1 high CPU usage & disks operations

Raphael Simon raphael at rightscale.com
Thu Apr 21 00:58:14 BST 2011

Hello all,

We recently moved from RabbitMQ 1.8 to 2.3.1 on production and since then we
have noticed that after a few days of operations the brokers will get into a
mode where they use a lot of cpu to the point where it gets impossible to
even use SSH on the machines. This seems to get triggered when many queues
get deleted. Inspecting the broker (OS) processes with etop indicates a lot
of reductions in (Erlang) processes that are currently executing
prim_file:drv_get_response. This is correlated by the collectd daemon
showing > 12,000 reads / sec and > 2000 writes /sec ! These disks access
don't end up hitting the actual disk (are served by the OS cache) hence the
high throughput.

It seems to always be the same processes causing this (around 20). Looking
at the state of one using sys:get_status returns [1]. Looks like a queue
process. There are about 9K queues on the brokers when this happens and ~60K
messages. Up to this happening the brokers hover around 40% cpu usage
peaking at 60% when the message store is combining the messages (about every
5 minutes with our throughput).

It's interesting that this seems to be caused by a small amount of queue
processes, always the same that come up in etop. Also the CPU graph is a
direct reflection of the disk ops graph.

So what are the scenarios that will cause a queue process to access the disk
in what looks like an infinite loop? Anything else that could be causing
this behavior?



                   "/var/lib/rabbitmq/mnesia/rabbit at broker1-2
                   "/var/lib/rabbitmq/mnesia/rabbit at broker1-2
          {{"/var/lib/rabbitmq/mnesia/rabbit at broker1-2

          {{"/var/lib/rabbitmq/mnesia/rabbit at broker1-2
         [{header,"Status for generic server <0.17050.0>"},
                 {"Logged events",[]},
                 {"Queued messages",[]}]},
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110420/cf1915c8/attachment-0001.htm>

More information about the rabbitmq-discuss mailing list