[rabbitmq-discuss] Simple benchmark and results

Matthias Radestock matthias at lshift.net
Thu Oct 22 15:17:23 BST 2009


David,

David Glaubman wrote:
> You write:
> [...]
>> Note that there is one obvious difference to the .net tests: 
>> By setting the "-a" flag the consumers will operate 
>> in auto-ack mode, whereas in the .net code you posted you do an explicit
>> ack. 
>> The former is quite a bit more efficient and may well account 
>> for the bulk of the difference between the .net and java consumer
>> performance. 
> 
> Bingo! Setting 'noAck' = true on basicConsume increases messages received to
> about 33K per sec.

I have just run some experiments with code very similar to yours - the
only significant changes I made was to set the message to be a byte[24]
array, use DateTime.Now for timing and do 50,000 iterations, i.e.

            var publishStart = DateTime.Now;
            for (int i = 0; i < 50000; i++) {
                channel.BasicPublish(exchange, routingKey, null, message);
            }
            Console.WriteLine("publish: {0}", DateTime.Now - publishStart);

In the local case I get sending rates of ~10kHz on my ancient machine
running mono on debian. That's significantly higher than the ~4kHz you
are reporting.

The consuming rate is half that but increases to ~15kHz with nAck=true.


So something weird is going on in your set up.


Regards,

Matthias.




More information about the rabbitmq-discuss mailing list