[rabbitmq-discuss] Producer consumer performance test

Shalin Shekhar Mangar shalinmangar at gmail.com
Thu Apr 21 20:23:37 BST 2011


On Thu, Apr 21, 2011 at 3:07 PM, Matthias Radestock
<matthias at rabbitmq.com>wrote:

> Shalin,
>
> Shalin Shekhar Mangar wrote:
>
>> The rate of consumption keeps dropping. CPU usage of rabbitmq is constant
>> at approx 170%. [...] Am I doing something wrong?
>>
>
> Yes, you are :)
>
> In https://gist.github.com/935196#L85 you are creating a new AMQP consumer
> every time you want to receive a message from the queue. Simply move that
> line out of the loop.
>

Thanks Matthias!

I moved that out of the loop and here are the numbers running the test
again:

Produced: 210443 throughput: 20716.97184485135
Consumed: 119824 throughput: 11796.022839141564
Produced: 444574 throughput: 22054.46968945332
Consumed: 244677 throughput: 12137.960115090782
Produced: 700164 throughput: 23215.756490599822
Consumed: 360837 throughput: 11964.488212473889
Produced: 931030 throughput: 23183.59520904405
Consumed: 476592 throughput: 11867.626185911004
Produced: 1183641 throughput: 23597.779062580994
Consumed: 590305 throughput: 11768.675611555254
Produced: 1427614 throughput: 23730.28590425532
Consumed: 702821 throughput: 11682.529920212766
Produced: 1667459 throughput: 23766.51938426454
Consumed: 803325 throughput: 11449.900228050172
Produced: 1905431 throughput: 23770.346806387228
Consumed: 913091 throughput: 11390.855788423154
Produced: 2154468 throughput: 23896.051464063887
Consumed: 1017438 throughput: 11284.80479148181
Produced: 2359715 throughput: 23559.21965635327
Consumed: 1129760 throughput: 11279.440101436687
Produced: 2587303 throughput: 23486.560579515437
Consumed: 1232315 throughput: 11186.490681820245

The consumption rate holds throughout the test but it still seems low to me.
I'd think that for such a small message payload, a single box should be able
to do much more than these. Is there something else that I should do to get
better performance out of a single box?

-- 
Regards,
Shalin Shekhar Mangar.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110421/2172e757/attachment.htm>


More information about the rabbitmq-discuss mailing list