Linux - iperf - тестирование скорости по TCP/UDP


Материал из Wiki - Iphoster - 'the best ever support'

Перейти к: навигация, поиск

Linux - iperf - тестирование скорости по TCP/UDP

На сервере запускаем (тестируем через UDP):

#  iperf -s -p 1111 -u -i1
-s - режим сервера
-p - порт 
-u - использовать UDP (по-умолчанию TCP)
-i1 - обвнолять результаты каждую секунду.

На клиента запускаем (тестируем через UDP):

#  iperf -c server_ip -m -p 1111 -t 60 -u -b 1G -t60
-m - показывать максимальный размер сегмента (MTU - TCP / IP заголовке)
-p - порт 
-u - использовать UDP (по-умолчанию TCP)
-b 1G - пропускная способность для UDP (по-умолчанию, 1Mbit/s)
-t60 - тестируем в течении 60 секунд


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

[  3] local client_ip port 1111 connected with server_ip port 47538
[ ID] Interval       Transfer     Bandwidth        Jitter   Lost/Total Datagrams
[  3]  0.0- 1.0 sec  8.73 MBytes  73.2 Mbits/sec   0.279 ms    0/ 6225 (0%)
[  3]  1.0- 2.0 sec  7.97 MBytes  66.9 Mbits/sec   0.324 ms    0/ 5687 (0%)
[  3]  2.0- 3.0 sec  10.5 MBytes  88.0 Mbits/sec   0.159 ms    0/ 7482 (0%)
 [  3]  3.0- 4.0 sec  10.5 MBytes  88.2 Mbits/sec   0.155 ms    0/ 7499 (0%)
[  3]  4.0- 5.0 sec  10.4 MBytes  87.6 Mbits/sec   0.231 ms    0/ 7450 (0%)
[  3]  5.0- 6.0 sec  10.2 MBytes  85.9 Mbits/sec   0.223 ms    0/ 7307 (0%)
[  3]  6.0- 7.0 sec  9.89 MBytes  83.0 Mbits/sec   0.371 ms    0/ 7054 (0%)
[  3]  7.0- 8.0 sec  9.90 MBytes  83.1 Mbits/sec   0.167 ms    0/ 7065 (0%)
[  3]  8.0- 9.0 sec  10.4 MBytes  87.1 Mbits/sec   0.372 ms    0/ 7409 (0%)
[  3]  9.0-10.0 sec  10.8 MBytes  90.4 Mbits/sec   0.388 ms    0/ 7687 (0%)
[  3] 10.0-11.0 sec  10.7 MBytes  89.9 Mbits/sec   0.227 ms    0/ 7645 (0%)
[  3] 11.0-12.0 sec  10.7 MBytes  90.0 Mbits/sec   0.177 ms    0/ 7650 (0%)
[  3] 12.0-13.0 sec  10.5 MBytes  88.5 Mbits/sec   0.340 ms    0/ 7522 (0%)
[   3] 13.0-14.0 sec  10.5 MBytes  88.3 Mbits/sec   0.214 ms    0/ 7511 (0%)
[  3] 14.0-15.0 sec  10.2 MBytes  85.8 Mbits/sec   0.170 ms    0/ 7297 (0%)
[  3] 15.0-16.0 sec  8.60 MBytes  72.2 Mbits/sec   0.352 ms    0/ 6137 (0%)
[  3] 16.0-17.0 sec  9.69 MBytes  81.3 Mbits/sec   0.153 ms    0/ 6913 (0%)
[  3] 17.0-18.0 sec  11.0 MBytes  92.5 Mbits/sec   0.452 ms    0/ 7864 (0%)
[  3] 18.0-19.0 sec  10.5 MBytes  87.9 Mbits/sec   0.335 ms    0/ 7471 (0%)
[  3] 19.0-20.0 sec  9.97 MBytes  83.6 Mbits/sec   0.331 ms    0/ 7112 (0%)
[  3] 20.0-21.0 sec  10.3 MBytes  86.2 Mbits/sec   0.184 ms    0/ 7328 (0%)
[  3] 21.0-22.0 sec  10.1 MBytes  85.0 Mbits/sec   0.215 ms    0/ 7229 (0%)
[  3] 22.0-23.0 sec  9.92 MBytes  83.2 Mbits/sec   0.404 ms    0/ 7073 (0%)
[  3] 23.0-24.0 sec  10.1 MBytes  84.9 Mbits/sec   0.235 ms    0/ 7222 (0%)
[  3] 24.0-25.0 sec  11.2 MBytes  93.7 Mbits/sec   0.240 ms    0/ 7970 (0%)
[  3] 25.0-26.0 sec  10.5 MBytes  88.0 Mbits/sec   0.195 ms    0/ 7483 (0%)
[  3] 26.0-27.0 sec  11.1 MBytes  93.5 Mbits/sec   0.300 ms    0/ 7947 (0%)
[  3] 27.0-28.0 sec  11.1 MBytes  93.3 Mbits/sec   0.308 ms    0/ 7935 (0%)
[  3] 28.0-29.0 sec  11.2 MBytes  93.9 Mbits/sec   0.216 ms    0/ 7981 (0%)
[  3] 29.0-30.0 sec  11.3 MBytes  94.9 Mbits/sec   0.241 ms    0/ 8069 (0%)
[  3] 30.0-31.0 sec  11.2 MBytes  94.0 Mbits/sec   0.261 ms    0/ 7997 (0%)
[  3] 31.0-32.0 sec  11.0 MBytes  92.5 Mbits/sec   0.292 ms    0/ 7866 (0%)
[  3] 32.0-33.0 sec  10.6 MBytes  88.8 Mbits/sec   0.492 ms    0/ 7547 (0%)
[  3] 33.0-34.0 sec  10.8 MBytes  90.8 Mbits/sec   0.159 ms    0/ 7718 (0%)
[  3] 34.0-35.0 sec  10.6 MBytes  88.7 Mbits/sec   0.189 ms    0/ 7540 (0%)
[  3] 35.0-36.0 sec  10.8 MBytes  90.3 Mbits/sec   0.289 ms    0/ 7677 (0%)
[  3] 36.0-37.0 sec  10.4 MBytes  87.3 Mbits/sec   0.196 ms    0/ 7426 (0%)
[  3] 37.0-38.0 sec  10.7 MBytes  90.2 Mbits/sec   0.203 ms    0/ 7667 (0%)
[   3] 38.0-39.0 sec  11.2 MBytes  94.0 Mbits/sec   0.153 ms    0/ 7993 (0%)
[  3] 39.0-40.0 sec  11.4 MBytes  95.3 Mbits/sec   0.185 ms    0/ 8106 (0%)
[  3] 40.0-41.0 sec  11.2 MBytes  94.4 Mbits/sec   0.215 ms    0/ 8024 (0%)
[  3] 41.0-42.0 sec  11.3 MBytes  94.8 Mbits/sec   0.151 ms    0/ 8064 (0%)
[  3] 42.0-43.0 sec  10.9 MBytes  91.6 Mbits/sec   0.177 ms    0/ 7787 (0%)
[  3] 43.0-44.0 sec  10.8 MBytes  91.0 Mbits/sec   0.271 ms    0/ 7735 (0%)
[  3] 44.0-45.0 sec  11.1 MBytes  93.5 Mbits/sec   0.153 ms    0/ 7951 (0%)
[  3] 45.0-46.0 sec  11.3 MBytes  94.6 Mbits/sec   0.425 ms    0/ 8043 (0%)
[  3] 46.0-47.0 sec  11.3 MBytes  94.4 Mbits/sec   0.222 ms    0/ 8027 (0%)
[  3] 47.0-48.0 sec  11.2 MBytes  93.8 Mbits/sec   0.157 ms    0/ 7979 (0%)
[  3] 48.0-49.0 sec  11.2 MBytes  93.6 Mbits/sec   0.373 ms    0/ 7962 (0%)
[  3] 49.0-50.0 sec  10.8 MBytes  90.8 Mbits/sec   0.257 ms    0/ 7723 (0%)
[  3] 50.0-51.0 sec  10.8 MBytes  90.3 Mbits/sec   0.259 ms    0/ 7679 (0%)
[  3] 51.0-52.0 sec  10.9 MBytes  91.5 Mbits/sec   0.168 ms    0/ 7784 (0%)
[  3] 52.0-53.0 sec  10.8 MBytes  90.7 Mbits/sec   0.159 ms    0/ 7714 (0%)
[  3] 53.0-54.0 sec  11.2 MBytes  94.0 Mbits/sec   0.423 ms    0/ 7994 (0%)
[  3] 54.0-55.0 sec  10.9 MBytes  91.3 Mbits/sec   0.226 ms    0/ 7764 (0%)
[  3] 55.0-56.0 sec  10.8 MBytes  90.4 Mbits/sec   0.182 ms    0/ 7690 (0%)
[  3] 56.0-57.0 sec  10.5 MBytes  88.4 Mbits/sec   0.175 ms    0/ 7515 (0%)
[  3] 57.0-58.0 sec  9.97 MBytes  83.6 Mbits/sec   0.163 ms    0/ 7112 (0%)
[  3] 58.0-59.0 sec  9.81 MBytes  82.3 Mbits/sec   0.281 ms    0/ 6995 (0%)
[  3] 59.0-60.0 sec  8.78 MBytes  73.7 Mbits/sec   0.164 ms    0/ 6264 (0%)
[  3]  0.0-60.0 sec   633 MBytes  88.5 Mbits/sec   0.543 ms    0/451613 (0%) 





Usage: iperf [-s|-c host] [-p port] [-t secs] [-w bytes] ...
      iperf [-h|--help] [-v|--version] 
Client/Server: -f, --format [kmKM] format to report: Kbits, Mbits, KBytes, MBytes -i, --interval # seconds between periodic bandwidth reports -l, --len #[KM] length of buffer to read or write (default 8 KB) -m, --print_mss print TCP maximum segment size (MTU - TCP/IP header) -p, --port # server port to listen on/connect to -u, --udp use UDP rather than TCP -w, --window #[KM] TCP window size (socket buffer size) -B, --bind bind to , an interface or multicast address -M, --mss # set TCP maximum segment size (MTU - 40 bytes) -N, --nodelay set TCP no delay, disabling Nagle's Algorithm -V, --IPv6Version Set the domain to IPv6
Server specific: -s, --server run in server mode -D, --daemon run the server as a daemon
Client specific: -a, --tcp_bandwidth #[KM] for TCP, bandwidth to send at in bits/sec #[KM] (default no bandwidth limit used) -b, --bandwidth #[KM] for UDP, bandwidth to send at in bits/sec (default 1 Mbit/sec, implies -u) -c, --client run in client mode, connecting to -n, --num #[KM] number of bytes to transmit (instead of -t) -t, --time # time in seconds to transmit for (default 10 secs) -F, --fileinput input the data to be transmitted from a file -I, --stdin input the data to be transmitted from stdin -P, --parallel # number of parallel client threads to run -S, --tos # set type-of-service for outgoing packets -T, --ttl # time-to-live, for multicast (default 1) -W, --windowSizeSuggest Run the client so as to suggest a suitable window size (default off)
Miscellaneous: -h, --help print this message and quit -v, --version print version information and quit
[KM] Indicates options that support a K or M suffix for kilo- or mega-
The TCP window size option can be set by the environment variable TCP_WINDOW_SIZE. Most other options can be set by an environment variable IPERF_, such as IPERF_BANDWIDTH.
Индекс цитирования