[zeromq-dev] multiple bind with one socket
Martin Sustrik
sustrik at 250bpm.com
Sat Oct 2 17:26:17 CEST 2010
Hi Kelly,
Interesting discussion! :)
There are many topics involved so let's go through them one by one to
keep it simple.
>> 1. If the packets are full (reach MTU size) the bandwidth overhead is
>> same irrespective of how many TCP connections there are (it's IP traffic
>> after all).
>
> Correct only in that you can't waste more in terms of "per-second"
> once you've maxed out the pipe at full MTU. It still doesn't come for free
> though as you have to send the additional header data for the new connection
> thus reducing your actual throughput potential. Using nice easy numbers,
> say you send 10k bytes of data and it costs 100 bytes of header data to
> transmit that, so it is a total of 10100 bytes you actually transmit. Split
> the data in half and send over 2 connections, you have to send 10200 bytes
> of data for the same 10k bytes because of the tcp overhead. For each new
> connection, add another 100 bytes of data to be sent. So, no the data sent
> per second doesn't change; you just have to send more data over time.
I still don't follow.
Say the MTU size is 1100 and header size is 100.
Thus, each IP packet can transfer 1000 bytes of payload plus 100 bytes
of header.
One connection sending 10000 bytes splits it into 10 packets, so we'll
end up with 1100x10 = 11000 bytes transferred.
If you split the load between two connections, each has 5000 bytes to
transfer. If splits it into 5 packets, i.e. 1100x5 = 5500 bytes. Two
connections, each transferring 5500 bytes, gives 11000 bytes.
So we have 11000 bytes transferred in both cases.
What's the flow in the above reasoning?
Martin
More information about the zeromq-dev
mailing list