// JP opened flex table

Click to See Complete Forum and Search --> : Calculating Buff Size based on Bandwidth in 1GBps network


mmpcse
June 11th, 2008, 10:25 AM
Hi,

I am looking for how to calculate the buffer size based on the bandwidth.

Also how to know how much bandwidth is available.

I am using winpcap 4.0 and packet.dll. Ethernet card is D-Link 1GBps.

I am sending traffic from PC to BERT m/c and vice versa.

I would be greatfull for the answer.

Thanks a lot in advance.

MikeAThon
June 11th, 2008, 02:29 PM
In general, for TCP, the size of the buffer should be comparable to the product of the bandwidth multiplied by the round trip time (RTT), i.e., size of the buffer in bits = bandwidth (bits/sec)*RTT (sec).

The bandwidth number should correspond to the bandwidth of the bottleneck neck between the peers. In other words, unless your peers are both on the same gigabit ethernet network, don't use 1Gbps as the bandwidth number. Instead, use the bandwidth number of the slowest network connecting the peers.

As an example, if your peers connect over the Internet, via 1Gbps LANs on each side that connect to respective routers, then the fact that the machines are on separate 1Gbps networks is irrelevant. The bandwidth number used should be that of the connection to the slowest ISP. Say you are using 1500/384 ADSL. A typical RTT over the Internet is 75 milliseconds. The buffer should then be around 384000 * 0.075 = 28800 bits = 3600 bytes.

If you are not using TCP, then other guidelines apply.

Mike

mmpcse
June 12th, 2008, 12:02 AM
Mike,

Great Explanation, Loved it. :)

We are using UDP for traffic sending. So i would glad if you brief a little bit from UDP point of view, OR if you dont have time you can refer to book/link i will follow.

Thanks a lot. Once Again, Short and Sweet Explanation.

MikeAThon
June 12th, 2008, 10:50 AM
We are using UDP for traffic sending. So i would glad if you brief a little bit from UDP point of view, .
TCP is an acknowledged (ACK'd) protocol, so for TCP, the size of the buffer is calculated based on the concept of as-yet-unacknowledged packets in flight. Basically, you want to ensure that the buffer is large enough so that it is always ready to accept and send new information, even though it must maintain old information in memory to guard against the possibility that the old information must be re-sent if an ACK is not received.

UDP on the other hand is not an ACK'd protocol, so none of these guidelines apply. To be candid, I do not know of any guidelines for UDP, and it's probably enough to simply size your buffer so that it can accept the maximum datagram size.

Mike

mmpcse
June 12th, 2008, 12:21 PM
Mike,

Thanks a lot once again for clarifying the things.

//JP added flex table