通过以太网的带宽(ethernet_bandwidth)的值是否正确计算了TCP(TCP / IP)的带宽?
部分生产带宽(标头除外):
part_of_productive_bandwidth = (MTU - 40)/MTU
一秒内回复所需时间:
time_took_for_reply = (ethernet_bandwidth/TCP_receive_window)*ping
部分生产时间(期望回复除外):
part_of_productive_time = (1 - time_took_for_reply) / 1
真实带宽:
real_bandwitdh = ethernet_bandwidth * part_of_productive_bandwidth * part_of_productive_time
或者:
real_bandwitdh = ethernet_bandwidth * (MTU - 40)/MTU *
(1 - (ethernet_bandwidth/TCP_receive_window)*ping)
例如:
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
这是真的吗?