[rabbitmq-discuss] Throughput observation with RabbitMQ-3.1.3 and Erlang R16B01 - Single Node and Cluster Node

Simon MacMullen simon at rabbitmq.com
Fri Aug 16 17:10:15 BST 2013


I'm not completely sure where this discussion is going :-) but I'll 
pitch in anyway...

On 16/08/13 10:33, Priyanki Vashi wrote:
> In my wireshark traces, I see following frames for every message I send.
> I have publisher confirm and consumer ack enabled with prefetch_count
> not set.

Of course publisher confirm is optional. Also if the broker is busy 
enough it can start to issue acks with multiple=true. So you don't have 
to pay the cost of an ack for every message published.

> content header = 88 bytes ( does not show any direct info so not sure)
> basic.publish frame = 85 bytes ( shows details of queue, exchange,
> routing key etc)
> content body = 137 bytes ( in this my payload is 100 bytes of string +
> 37 bytes might be checksum etc.)

I don't see this much. Publishing with:

$ runjava.sh com.rabbitmq.examples.MulticastMain -C 1 -y0 -s 100

(i.e. publish 1 message of 100 bytes, don't consume anything, then stop)

I get a 255 byte (Ethernet) frame sent for the publish:

14 bytes Ethernet II header
20 bytes IPv4 header
32 bytes TCP header
59 bytes AMQP basic.publish method (variable size, including exchange 
name and routing key)
22 bytes content header (i.e. minimal basic.properties)
108 bytes content (100 bytes payload)

So I suspect there's something different with your client and / or test 
app. Note that things like whether you set anything in basic.properties 
can make quite a difference here, the AMQP encoding is designed to be 
shorter in the common case.

For most people the framing costs per message are not excessive. I don't 
think there is any particular waste there. If the costs are excessive 
for you, then MQTT would offer lower (but still present) per-message 
framing costs.

But you can't expect to send tiny messages and fill your network 
bandwidth anyway. Each message's framing has a fixed cost to decode, and 
then each message has a fixed cost for routing logic as well. (Even with 
fanout exchanges we still have to look up bindings after all.)

tl;dr: you'll notice much higher bandwidth utilisation if you start 
sending longer messages.

Cheers, Simon

-- 
Simon MacMullen
RabbitMQ, Pivotal


More information about the rabbitmq-discuss mailing list