-
Notifications
You must be signed in to change notification settings - Fork 34
Description
Running both RabbitMQ 3.5.1 and test app on my recent model development MacBookPro (OS X Yosemite), I encountered unexpected, reproducible performance conundrum: with pubacks=False, synchronous publishing is consistently slower than with pubacks=True. This is counterintuitive and differs from all other AMQP clients that I profiled.
I used the apps from https://github.com/vitaly-krugl/amqp-perf to profile basic_publish performance. Below are a few examples of what I am talking about.
puka with pubacks=False
I verified that the channel IS NOT in confirm mode
time python puka_perf.py publish --impl=Client --exg="" --size 1024 --msgs=100000
real 0m22.728s
user 0m12.593s
sys 0m2.129s
puka with pubacks=True
I verified that the channel IS in confirm mode
time python puka_perf.py publish --impl=Client --exg="" --size 1024 --msgs=100000 --delivery-confirmation
real 0m17.368s
user 0m9.054s
sys 0m2.112s
Here, you can see that both real and user execution times are smaller for pubacks=True. This is unexpected, because with pubacks=True the broker needs to check whether the exchange exists before it can Ack, whereas with pubacks=False, the broker can Ack right away.
Below are a couple of comparable tests and corresponding execution times for haigha:
haigha with pubacks=False
time python haigha_perf.py publish --impl=SocketTransport --exg="" --size 1024 --msgs=100000
real 0m10.010s
user 0m7.772s
sys 0m2.231s
haigha with pubacks=True
time python haigha_perf.py publish --impl=SocketTransport --exg="" --size 1024 --msgs=100000 --delivery-confirmation
real 0m21.344s
user 0m13.371s
sys 0m3.531s