[rabbitmq-discuss] RabbitMQ Performance Tests and max of ~4000 msg/sec

Matthias Radestock matthias at rabbitmq.com
Mon Oct 8 11:20:37 BST 2012


Jason,

On 08/10/12 02:55, McIntosh Jason wrote:
> So an interesting addendum:
>
> I tossed a slight modification of my main method:
>
> List<Thread> threadsStarted = new ArrayList<Thread>();
> for (int i = 0; i < 5; i++) {
> Thread t = new Thread(new RabbitMqTester("TestExchange", "Test", channel));
> threadsStarted.add(t);
> t.start();
> }
> for (Thread t : threadsStarted) {
> t.join();
> }
> And started seeing 16k messages per second.  I'll be doing some more
> testing to see where my block might be.  Could be as simple as how I'm
> handling threads...

Your messages are marked as 'persistent', and I am guessing you declared 
the queues as durable.

As a result every message has to be written to disk, which limits the 
throughput to disk write speed. Additionally, rabbit has to do an fsync 
every now and then in order to bound the number of messages that might 
be lost in a crash. That is an expensive operation but is coalesced 
across concurrent activities. Hence you are seeing a higher overall 
throughput with multiple publishers.

Regards,

Matthias.


More information about the rabbitmq-discuss mailing list