[rabbitmq-discuss] rabbitmq cpu usage can not be more than 700%

Simon MacMullen simon at rabbitmq.com
Thu Mar 7 12:03:28 GMT 2013


First of all, the biggest machine I have available to test with is 8 
cores, so 24 cores is somewhat unknown territory for me. Is this a NUMA 
machine? However, with that in mind I did some quick tests.

I was able to get 797% CPU usage with only 4 producer / queue / consumer 
sets. So it is possible to get past 700%. Interestingly, I got stuck at 
~700% when using HiPE - do you have HiPE switched on?

If not, there are a few things to test:

* Just to check - you didn't say how many connections you used. If you 
are running all those send / receive threads through one or two 
connections you may find that is limiting you.

* Check you really are CPU-bound - if you are publishing persistent 
messages or your queues are becoming large you are probably disk-bound. 
If you are publishing large messages you may be network-bound. One way 
to test this is with the run queue length, exposed in "rabbitmqctl 
status" or "Overview" > <node name> > "Advanced" in the management 
plugin. If this is non-zero you are CPU-bound.

* You may wish to experiment with adding some the scheduler flags 
documented at http://www.erlang.org/doc/man/erl.html to 
RABBITMQ_SERVER_ERL_ARGS, although this feels rather magical.

* As a last resort, it is possible to run a cluster on a single machine; 
this might hwelp you use more cores. See 

Cheers, Simon

On 07/03/13 08:14, Xie Yunpeng wrote:
> rabbitmq version: 3.0.2
> cpu: 24 cores
> memory: 64G
> i deploy a rabbitmq service on the server above and do a stress testing
> , use 150 threads for send and 300 threads for recv on 150 queues on the
> service, per queue with 1 send/ 2 recv.
> the cpu useage is always below 700%, no matter i increase queues and
> threads or not.
> how to use more than 7 cores in rabbitmq?
> i find smp is set to 24:24
> [rabbitmq]$ erl
> Erlang R15B03 (erts- [source] [64-bit] [smp:24:24]
> [async-threads:0] [hipe] [kernel-poll:false]
> Eshell V5.9.3.1  (abort with ^G)
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss

Simon MacMullen
RabbitMQ, VMware

More information about the rabbitmq-discuss mailing list