Правильное измерение скорости

How can we help?

Навигация

Для измерения скорости используем iperf3, версию 3.1.3 для Windows 64 можно взять здесь.

Распаковываем в текущую папку пользователя, в данном случае это C:\Users\1>

Серверная часть

На стороне, которая будет сервером, набираем в консоли .\iperf3.exe -s, и жмем разрешить доступ в брандмауере Windows:

Ключом -p можно указать конкретный порт, который будет слушать сервер iperf3:

PS C:\Users\1> .\iperf3.exe -s -p 5001
-----------------------------------------------------------
Server listening on 5001
-----------------------------------------------------------

Клиентская часть

Со стороны клиента также распаковываем соответствующие файлы в папку текущего пользователя. Для подключения к серверу указываем его адрес, ключ определяющий клиента -с, и ключ указывающий порт -p. Клиент в это случае скачивает с сервера произвольные данные, для большинства случаев этого достаточно:

PS C:\Users\1> .\iperf3.exe -c 192.168.88.214 -p 5001
Connecting to host 192.168.88.214, port 5001
[  4] local 192.168.88.250 port 1134 connected to 192.168.88.214 port 5001
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.01   sec   110 MBytes   911 Mbits/sec
[  4]   1.01-2.00   sec   108 MBytes   916 Mbits/sec
[  4]   2.00-3.00   sec   112 MBytes   943 Mbits/sec
[  4]   3.00-4.00   sec   102 MBytes   851 Mbits/sec
[  4]   4.00-5.00   sec  91.6 MBytes   769 Mbits/sec
[  4]   5.00-6.00   sec  61.1 MBytes   513 Mbits/sec
[  4]   6.00-7.00   sec  94.5 MBytes   792 Mbits/sec
[  4]   7.00-8.00   sec   104 MBytes   871 Mbits/sec
[  4]   8.00-9.00   sec   100 MBytes   844 Mbits/sec
[  4]   9.00-10.00  sec  92.1 MBytes   773 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec   975 MBytes   818 Mbits/sec                  sender
[  4]   0.00-10.00  sec   975 MBytes   818 Mbits/sec                  receiver

iperf Done.

Для тестирования обратного направления используем ключ -R или —reverse, при этом клиент закачивает произвольные данные на сервер:

PS C:\Users\1> .\iperf3.exe -c 192.168.88.214 -R -p 5001
Connecting to host 192.168.88.214, port 5001
Reverse mode, remote host 192.168.88.214 is sending
[  4] local 192.168.88.250 port 1153 connected to 192.168.88.214 port 5001
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec   112 MBytes   937 Mbits/sec
[  4]   1.00-2.00   sec   112 MBytes   935 Mbits/sec
[  4]   2.00-3.00   sec   113 MBytes   949 Mbits/sec
[  4]   3.00-4.00   sec   104 MBytes   875 Mbits/sec
[  4]   4.00-5.00   sec   113 MBytes   945 Mbits/sec
[  4]   5.00-6.00   sec   111 MBytes   931 Mbits/sec
[  4]   6.00-7.00   sec   113 MBytes   947 Mbits/sec
[  4]   7.00-8.00   sec   112 MBytes   938 Mbits/sec
[  4]   8.00-9.00   sec   110 MBytes   927 Mbits/sec
[  4]   9.00-10.00  sec   111 MBytes   931 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec  1.08 GBytes   932 Mbits/sec                  sender
[  4]   0.00-10.00  sec  1.08 GBytes   932 Mbits/sec                  receiver

iperf Done.

Ключом -t можно задать длительность теста, например 5 секунд:

PS C:\Users\1> .\iperf3.exe -c 192.168.88.214 -t 5 -p 5001
Connecting to host 192.168.88.214, port 5001
[  4] local 192.168.88.250 port 1246 connected to 192.168.88.214 port 5001
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec   111 MBytes   932 Mbits/sec
[  4]   1.00-2.00   sec   112 MBytes   943 Mbits/sec
[  4]   2.00-3.00   sec   104 MBytes   874 Mbits/sec
[  4]   3.00-4.00   sec   110 MBytes   919 Mbits/sec
[  4]   4.00-5.00   sec   113 MBytes   945 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-5.00   sec   550 MBytes   923 Mbits/sec                  sender
[  4]   0.00-5.00   sec   550 MBytes   923 Mbits/sec                  receiver

iperf Done.

Ключом -P задаем количество генерируемых потоков, например 5 потоков позволяет сгенерировать больший трафик в канале:

PS C:\Users\1> .\iperf3.exe -c 192.168.88.214 -t 5 -P 5 -p 5001
Connecting to host 192.168.88.214, port 5001
[  4] local 192.168.88.250 port 1263 connected to 192.168.88.214 port 5001
[  6] local 192.168.88.250 port 1264 connected to 192.168.88.214 port 5001
[  8] local 192.168.88.250 port 1265 connected to 192.168.88.214 port 5001
[ 10] local 192.168.88.250 port 1266 connected to 192.168.88.214 port 5001
[ 12] local 192.168.88.250 port 1267 connected to 192.168.88.214 port 5001
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  23.5 MBytes   197 Mbits/sec
[  6]   0.00-1.00   sec  22.5 MBytes   189 Mbits/sec
[  8]   0.00-1.00   sec  22.0 MBytes   184 Mbits/sec
[ 10]   0.00-1.00   sec  22.5 MBytes   189 Mbits/sec
[ 12]   0.00-1.00   sec  23.0 MBytes   193 Mbits/sec
[SUM]   0.00-1.00   sec   114 MBytes   951 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[  4]   1.00-2.00   sec  23.4 MBytes   196 Mbits/sec
[  6]   1.00-2.00   sec  22.1 MBytes   186 Mbits/sec
[  8]   1.00-2.00   sec  22.5 MBytes   189 Mbits/sec
[ 10]   1.00-2.00   sec  22.4 MBytes   188 Mbits/sec
[ 12]   1.00-2.00   sec  22.6 MBytes   190 Mbits/sec
[SUM]   1.00-2.00   sec   113 MBytes   948 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[  4]   2.00-3.00   sec  23.4 MBytes   196 Mbits/sec
[  6]   2.00-3.00   sec  22.2 MBytes   187 Mbits/sec
[  8]   2.00-3.00   sec  22.2 MBytes   187 Mbits/sec
[ 10]   2.00-3.00   sec  22.5 MBytes   189 Mbits/sec
[ 12]   2.00-3.00   sec  22.8 MBytes   191 Mbits/sec
[SUM]   2.00-3.00   sec   113 MBytes   949 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[  4]   3.00-4.00   sec  23.0 MBytes   193 Mbits/sec
[  6]   3.00-4.00   sec  20.8 MBytes   174 Mbits/sec
[  8]   3.00-4.00   sec  21.9 MBytes   183 Mbits/sec
[ 10]   3.00-4.00   sec  21.8 MBytes   182 Mbits/sec
[ 12]   3.00-4.00   sec  22.9 MBytes   192 Mbits/sec
[SUM]   3.00-4.00   sec   110 MBytes   925 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[  4]   4.00-5.00   sec  23.8 MBytes   199 Mbits/sec
[  6]   4.00-5.00   sec  22.1 MBytes   186 Mbits/sec
[  8]   4.00-5.00   sec  22.6 MBytes   190 Mbits/sec
[ 10]   4.00-5.00   sec  21.9 MBytes   183 Mbits/sec
[ 12]   4.00-5.00   sec  23.0 MBytes   193 Mbits/sec
[SUM]   4.00-5.00   sec   113 MBytes   951 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-5.00   sec   117 MBytes   196 Mbits/sec                  sender
[  4]   0.00-5.00   sec   117 MBytes   196 Mbits/sec                  receiver
[  6]   0.00-5.00   sec   110 MBytes   184 Mbits/sec                  sender
[  6]   0.00-5.00   sec   110 MBytes   184 Mbits/sec                  receiver
[  8]   0.00-5.00   sec   111 MBytes   187 Mbits/sec                  sender
[  8]   0.00-5.00   sec   111 MBytes   187 Mbits/sec                  receiver
[ 10]   0.00-5.00   sec   111 MBytes   186 Mbits/sec                  sender
[ 10]   0.00-5.00   sec   111 MBytes   186 Mbits/sec                  receiver
[ 12]   0.00-5.00   sec   114 MBytes   192 Mbits/sec                  sender
[ 12]   0.00-5.00   sec   114 MBytes   192 Mbits/sec                  receiver
[SUM]   0.00-5.00   sec   563 MBytes   945 Mbits/sec                  sender
[SUM]   0.00-5.00   sec   563 MBytes   945 Mbits/sec                  receiver

iperf Done.