[rabbitmq-discuss] Very slow basic_publish

Ian Adams ian.forrest.adams at gmail.com
Tue Nov 19 18:12:19 GMT 2013


Hi All,

Im pretty new to RMQ, been messing about with it and noticed that 
publishing messages via pika seems quite slow.

Im using a default configuration of the broker, all produces and consumers 
running on the same machine as the broker.

What I'm noticing is that its (relatively) extremely slow to publish 
messages to the broker, but the once the broker has them, it goes blazingly 
fast in getting them to various consumers.

For example, the below code (ripped off from then RMQ tutorials) can 
publish messages at around 250-300 messages per second, this is both in an 
ubuntu vm and on a 'bare metal' Mac running OS X 10.8 ( I can provide more 
detailed hardware info if needed)

http://pastebin.com/JNXwmYx7

The consumer, on the other hand (which doesn't do anything with them 
really, this is just testing), can receive them at up to 20k messages a 
second if I let the queue build up. 

When I profiled my message producer, it seems to be spending the vast 
majority of its time polling. cProf sees:

ncalls  tottime  percall  cumtime  percall filename:lineno(function)
----
308    3.202    0.010    3.202    0.010 {built-in method poll}
----

Is there some configuration I'm missing? Or am I abusing some 
functionality? Im making sure that there is no acks, and no durability so 
it should be the disk at least.

Thanks guys!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20131119/6061ca13/attachment.htm>


More information about the rabbitmq-discuss mailing list