我有一個大約 160MB 的目錄,其中包含 742 個檔案。使用cp
oversshfs
和 with複製它scp
大約需要 50 秒(無論哪種方式)。
但是,iperf 報告如下:
Accepted connection from 83.10.32.103, port 55218
[ 5] local 161.35.220.161 port 5201 connected to 83.10.32.103 port 55220
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 22.8 MBytes 192 Mbits/sec
[ 5] 1.00-2.00 sec 27.4 MBytes 230 Mbits/sec
[ 5] 2.00-3.00 sec 28.9 MBytes 242 Mbits/sec
[ 5] 3.00-4.00 sec 26.4 MBytes 221 Mbits/sec
[ 5] 4.00-5.00 sec 26.6 MBytes 223 Mbits/sec
[ 5] 5.00-6.00 sec 28.2 MBytes 237 Mbits/sec
[ 5] 6.00-7.00 sec 27.2 MBytes 228 Mbits/sec
[ 5] 7.00-8.00 sec 29.1 MBytes 244 Mbits/sec
[ 5] 8.00-9.00 sec 30.0 MBytes 252 Mbits/sec
[ 5] 9.00-10.00 sec 30.0 MBytes 252 Mbits/sec
[ 5] 10.00-10.03 sec 790 KBytes 237 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate
[ 5] 0.00-10.03 sec 278 MBytes 232 Mbits/sec receiver
據我了解,網路是這裡最慢的組件,但它仍然以約 25MB/s 的速度運行。因此,複製目錄大約需要 6-7 秒。實際上,大約需要 50 秒。
這種差異的根源是什麼?