iperf3でNASとmacの転送速度を計測する(5GbE編)
(トラブル1)途中で切れてpingもとおらなくなる
有線直結5G(失敗)$ iperf3 -c 169.254.10.165
Connecting to host 169.254.10.165, port 5201
[ 5] local 169.254.227.125 port 56296 connected to 169.254.10.165 port 5201
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 72.9 MBytes 612 Mbits/sec
[ 5] 1.00-2.00 sec 72.4 MBytes 608 Mbits/sec
[ 5] 2.00-3.00 sec 16.4 MBytes 137 Mbits/sec
[ 5] 3.00-4.00 sec 0.00 Bytes 0.00 bits/sec
// 略
iperf3: error - control socket has closed unexpectedly
USB-C - USB-C で接続してみるが今度は1GBpsでの接続になってしまう(USB3対応のケーブルじゃないのかも)
USB -C - USB-A 変換ケーブルに接したらうまく行った
(トラブル2)何故か1G接続よりも遅い→RAIDの書き込みが遅いから
有線直結5G(成功)$ iperf3 -c 169.254.10.165
Connecting to host 169.254.10.165, port 5201
[ 5] local 169.254.40.28 port 57270 connected to 169.254.10.165 port 5201
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 78.7 MBytes 660 Mbits/sec
[ 5] 1.00-2.00 sec 75.7 MBytes 635 Mbits/sec
[ 5] 2.00-3.00 sec 74.4 MBytes 624 Mbits/sec
[ 5] 3.00-4.00 sec 75.7 MBytes 635 Mbits/sec
[ 5] 4.00-5.00 sec 70.0 MBytes 587 Mbits/sec
[ 5] 5.00-6.00 sec 76.1 MBytes 638 Mbits/sec
[ 5] 6.00-7.00 sec 82.0 MBytes 688 Mbits/sec
[ 5] 7.00-8.00 sec 70.6 MBytes 593 Mbits/sec
[ 5] 8.00-9.00 sec 78.6 MBytes 660 Mbits/sec
[ 5] 9.00-10.00 sec 76.9 MBytes 645 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate
[ 5] 0.00-10.00 sec 759 MBytes 636 Mbits/sec sender
[ 5] 0.00-10.01 sec 758 MBytes 635 Mbits/sec receiver
iperfのドキュメントを読むと、 -R
をつけるとダウンロードになるらしい
> Normally, the test data is sent from the client to the server, and measures the upload speed of the client.
>Measuring the download speed from the server can be done by specifying the -R flag on the client
> This causes data to be sent from the server to the client.
> iperf3 -c iperf3.example.com -p 5202 -R
CDMの結果を見るとMTU1500のQ1T1のシーケンシャルのWRITEは67MB/sで、636/8 = 79.5 MBに近い。ダウンロードはM170MB/sあるわけなのでギガビット超えが期待できるはず
ダウンロードのスピードを計測したら 約179MB/sになった(こちらはmacのNVMeなので書き込みがボトルネックにならない)
zsh$ iperf3 -c 169.254.10.165 -R
Connecting to host 169.254.10.165, port 5201
Reverse mode, remote host 169.254.10.165 is sending
[ 5] local 169.254.40.136 port 52736 connected to 169.254.10.165 port 5201
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 180 MBytes 1.51 Gbits/sec
[ 5] 1.00-2.00 sec 179 MBytes 1.50 Gbits/sec
[ 5] 2.00-3.00 sec 175 MBytes 1.46 Gbits/sec
[ 5] 3.00-4.00 sec 169 MBytes 1.41 Gbits/sec
[ 5] 4.00-5.00 sec 167 MBytes 1.40 Gbits/sec
[ 5] 5.00-6.00 sec 152 MBytes 1.28 Gbits/sec
[ 5] 6.00-7.00 sec 161 MBytes 1.35 Gbits/sec
[ 5] 7.00-8.00 sec 169 MBytes 1.42 Gbits/sec
[ 5] 8.00-9.00 sec 173 MBytes 1.45 Gbits/sec
[ 5] 9.00-10.00 sec 181 MBytes 1.52 Gbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 1.67 GBytes 1.43 Gbits/sec 3784 sender
[ 5] 0.00-10.00 sec 1.67 GBytes 1.43 Gbits/sec receiver
iperf Done.
疑問
トラブル2の混乱した時のメモ
ボトルネックは色々考えられる
CPU?
ディスク?
MTU?
ケーブルがCAT 5eなのがいけない?→CAT6でも同様の結果なので関係なし
1Gの速度より遅いので関係なさそうだもんね
感想
どこがボトルネックになるかは本当に丁寧に見ようとすると、やり方がわからない。たとえばディスクが最高速で書き込まれているというのはどこで判断すればいい?
完全に雰囲気でベンチマークしている
iperf3ではCDMのQ1T1と似たような数値が出る(相対誤差は10%はある)。iperfのスレッドやキューがどうなっているのかは知らない。
Windowsが使えるならCDMがお手軽だし、そうでないならiperfを使うしかない