クライアントとサーバーの iperf 出力の違い

クライアントとサーバーの iperf 出力の違い

過去 4 時間 iperf を操作していますが、クライアントとサーバーで結果が異なる理由がわかりません。

クライアント上の次の iperf 出力を検討してください。

iperf -c 91.121.112.163 -p 2222
------------------------------------------------------------
Client connecting to 91.121.112.163, TCP port 2222
TCP window size: 1.06 MByte (default)
------------------------------------------------------------
[  3] local 10.0.0.160 port 36726 connected with 91.121.112.163 port 2222
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-11.4 sec  1.88 MBytes  1.38 Mbits/sec

そして、サーバー上の対応する出力は次のとおりです。

iperf -V -s -p 2222
------------------------------------------------------------
Server listening on TCP port 2222
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[  4] local ::ffff:91.121.112.163 port 2222 connected with ::ffff:86.209.154.156 port 36726
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-19.1 sec  1.88 MBytes   823 Kbits/sec

つまり、クライアントは 1.38Mbits/秒でアップロードしていますが、サーバーは 823kbits/秒で受信しているということですか?

これらの紛らわしい結果について説明できる人はいますか?

答え1

問題は、クライアントが送信トラフィックをバッファリングしているデバイスと通信しているため、サーバーが実際に最後のデータブロックを受信する前にクライアントが通信が完了したと認識していることだと思います。iperf でこの現象をよく目にします。サーバーの秒単位のレポートはクライアントのものよりはるかに安定しています。また、初めクライアントの 2 番目は常に最高のスループットであり、パス上のデバイスのバッファがいっぱいになっているものと思われます。以下は、双方向で 7Mbps にシェーピングされたリンクをテストしているクライアントとサーバーです...

------------------------------------------------------------
Client connecting to 204.22.22.104, TCP port 5001
TCP window size: 20.0 KByte (default)
------------------------------------------------------------
[  3] local 10.125.20.100 port 49248 connected with 204.22.22.104 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 1.0 sec  1.12 MBytes  9.44 Mbits/sec
[  3]  1.0- 2.0 sec   768 KBytes  6.29 Mbits/sec
[  3]  2.0- 3.0 sec   768 KBytes  6.29 Mbits/sec
[  3]  3.0- 4.0 sec   896 KBytes  7.34 Mbits/sec
[  3]  4.0- 5.0 sec   768 KBytes  6.29 Mbits/sec
[  3]  5.0- 6.0 sec   896 KBytes  7.34 Mbits/sec
[  3]  6.0- 7.0 sec   768 KBytes  6.29 Mbits/sec
[  3]  7.0- 8.0 sec   896 KBytes  7.34 Mbits/sec
[  3]  8.0- 9.0 sec   768 KBytes  6.29 Mbits/sec
[  3]  9.0-10.0 sec   768 KBytes  6.29 Mbits/sec
[  3]  0.0-10.2 sec  8.38 MBytes  6.91 Mbits/sec
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[  4] local 204.22.22.104 port 5001 connected with 10.125.20.100 port 49248
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0- 1.0 sec   828 KBytes  6.78 Mbits/sec
[  4]  1.0- 2.0 sec   764 KBytes  6.25 Mbits/sec
[  4]  2.0- 3.0 sec   857 KBytes  7.02 Mbits/sec
[  4]  3.0- 4.0 sec   815 KBytes  6.68 Mbits/sec
[  4]  4.0- 5.0 sec   811 KBytes  6.64 Mbits/sec
[  4]  5.0- 6.0 sec   814 KBytes  6.66 Mbits/sec
[  4]  6.0- 7.0 sec   815 KBytes  6.68 Mbits/sec
[  4]  7.0- 8.0 sec   814 KBytes  6.66 Mbits/sec
[  4]  8.0- 9.0 sec   812 KBytes  6.65 Mbits/sec
[  4]  9.0-10.0 sec   806 KBytes  6.60 Mbits/sec
[  4]  0.0-10.6 sec  8.38 MBytes  6.64 Mbits/sec

答え2

クライアントより: (強調は筆者)

[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-**11.4** sec  1.88 MBytes  1.38 Mbits/sec

サーバーから:

[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-**19.1** sec  1.88 MBytes   823 Kbits/sec

何らかの理由で、サーバーはテストにクライアントよりも約 8 秒長くかかっていると認識します。これで、全体の帯域幅が (サーバーの観点から) 823 Kbps に低下することになります。

関連情報