Is the correct calculation of the bandwidth of TCP by having the value of the bandwidth of Ethernet?

StackOverflow https://stackoverflow.com/questions/18578906

  •  27-06-2022
  •  | 
  •  

Question

Is the correct calculation of the bandwidth of TCP (TCP / IP) by having the value of the bandwidth of Ethernet (ethernet_bandwidth)?

Part of productive bandwidth (except for headers):

part_of_productive_bandwidth = (MTU - 40)/MTU

The time required to reply within one second:

time_took_for_reply = (ethernet_bandwidth/TCP_receive_window)*ping

Part of the productive time (except for expectations replies):

part_of_productive_time = (1 - time_took_for_reply) / 1

Real bandwitdh:

real_bandwitdh = ethernet_bandwidth * part_of_productive_bandwidth * part_of_productive_time

Or:

real_bandwitdh = ethernet_bandwidth * (MTU - 40)/MTU * 
    (1 - (ethernet_bandwidth/TCP_receive_window)*ping)

For example for:

ethernet_bandwidth = 1 Gbit/s = 125 000 000 B/s
MTU = 1500 B
TCP_receive_window = 128 KB = 131072 B
ping = 0.001 sec

real_bandwitdh  = 125 000 000 * (1500-40)/1500 * (1 - (125 000 000/131072)*0.001) = 
    125 MB/s * 0.973 * 0.046 = 5.59 MB/s

Is it true?

Was it helpful?

Solution

Why not stick with TCP layer stats? Number of packets sent * MTU divided by the time taken. Basically, TCP layer does explicitly not take into account any bandwidth. The whole send-rate estimation (aka window-size variation) is based on how many packets (in what stage - slow-start, congestion-avoidance) go through without hitting retransmission.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top