[rabbitmq-discuss] [Ann] pylibrabbitmq - Python bindings to rabbitmq-c
Ask Solem
askh at opera.com
Mon Jun 14 14:29:37 BST 2010
On Jun 14, 2010, at 12:38 PM, Marek Majkowski wrote:
>
> Are current python libraries too slow (do you have any benchmarks)?
Just did a simple benchmark, but take it with a shot of salt because I
have quite a lot of other apps running and I could be testing the wrong
things.
basic.publish: (256 byte messages)
amqplib: 13.48 usec/pass
librabbit: 6.81 usec/pass
basic.consume (5000 msg/pass)
amqplib: 10.34 usec/pass
librabbit: 4.49 usec/pass
The benchmark script is here:
But the real interesting benchmark is the celery one:
amqplib: concurrency=4 100 * 100 tasks.add roundtrip: 30.21 usec/pass
librabbit: concurrency=4 100 * 100 tasks.add roundtrip: 8.86 usec/pass
^^^^ !!!!!!!!!!!
That is the time taken to send a task to celery, for celery to execute the task, send the
return value back as a message, and then the benchmark recieves the result again (roundtrip time)
I guess the speed improvement is mainly about threading. Celery is highly dependent of threads, and pylibrabbitmq releases the GIL in strategic places. Just a hunch though.
--
{Ask Solem,
Developer ~ Webteam,
Opera Software,
+47 98435213 | twitter.com/asksol }.
More information about the rabbitmq-discuss
mailing list