Тесты iperf2 UDP на петлевом интерфейсе и в ЛВС 1Гбит/с
Целью описанного ниже тестирования является оценка производительности сетевых компонент ядра Linux на платформе RISC-V HiFive Unleashed при использовании протокола UDP.
Измерения проводились с использованием трёх разных аппаратных платформ (по отдельности и во взаимодействии между парой платформ). Каждая из платформ имеет сетевой интерфейс GigabitEthernet, подключенный к ЛВС на основе коммутатора CSR-109-8G.
-
Плата HiFive Unleashed, Linux с ядром 5.2.9 (4 ядра U-540);
-
2-процессорный сервер Intel (2 E5-2630 v4, 2,20 ГГц, 40 ядер);
-
Ноутбук Lenovo (Intel(R) Core(TM)2 Duo T6570, 2,10 ГГц, 2 ядра).
Управление тестами и контроль результатов выполнялись из консоли SSH на сервере.
В качестве тестового инструмента была выбрана программа iperf, которая, в отличие от iperf3, поддерживает многопотоковый (multithread) режим работы, позволяя загрузить все процессорные ядра в тестируемой системе. Все тесты выполнялись с использованием пакета iperf версии 2.0.14a, собранной из свежей версии SourceForge.
Измерения при каждом наборе параметров выполнялись многократно с выбором среднего значения при наличии разброса, который в большинстве случаев был незначительным.
Тесты на петлевом интерфейсе
Freedom-u540
root@freedom-u540:/usr/src/code# lscpu Architecture: riscv64 Byte Order: Little Endian CPU(s): 4 On-line CPU(s) list: 0-3 Thread(s) per core: 1 Core(s) per socket: 1 Socket(s): 4 CPU max MHz: 1400.0000 CPU min MHz: 350.0000 L1d cache: 128 KiB L1i cache: 128 KiB root@freedom-u540:~# iperf -c 0 -u -e -P 1 ------------------------------------------------------------ Client connecting to 0, UDP port 5001 Sending 1470 byte datagrams, IPG target: 11215.21 us UDP buffer size: 208 KByte (default) ------------------------------------------------------------ [ 3] local 127.0.0.1 port 56209 connected with 127.0.0.1 port 5001 [ ID] Interval Transfer Bandwidth Write/Err PPS [ 3] 0.00-10.02 sec 1.25 MBytes 1.05 Mbits/sec 893/0 89 pps [ 3] Sent 893 datagrams [ 3] Server Report: [ 3] 0.00-10.02 sec 1.25 MBytes 1.05 Mbits/sec 0.000 ms 0/ 893 (0%) 0.029/ 0.027/ 0.049/ 0.002 ms 89 pps 0 pkts 4490.80 root@freedom-u540:~# iperf -c 0 -u -e -P 2 ... [ 3] 0.00-10.02 sec 1.25 MBytes 1.05 Mbits/sec 893/0 89 pps [ 3] Sent 893 datagrams [SUM] 0.00-10.00 sec 2.51 MBytes 2.10 Mbits/sec 1786/0 179 pps [ 3] Server Report: [ 3] 0.00-10.02 sec 1.25 MBytes 1.05 Mbits/sec 0.001 ms 0/ 893 (0%) 0.028/ 0.027/ 0.053/ 0.002 ms 89 pps 0 pkts 4654.00 root@freedom-u540:~# iperf -c 0 -u -e -P 4 ... [ 4] 0.00-10.02 sec 1.25 MBytes 1.05 Mbits/sec 893/0 89 pps [ 4] Sent 893 datagrams [SUM] 0.00-10.00 sec 5.01 MBytes 4.20 Mbits/sec 3572/0 357 pps [ 4] Server Report: [ 4] 0.00-10.02 sec 1.25 MBytes 1.05 Mbits/sec 0.000 ms 0/ 893 (0%) 0.029/ 0.027/ 0.071/ 0.004 ms 89 pps 0 pkts 4533.59 root@freedom-u540:~# iperf -c 0 -u -e -P 8 ... [ 9] Server Report: [ 9] 0.00-10.02 sec 1.25 MBytes 1.05 Mbits/sec 0.000 ms 0/ 893 (0%) 0.028/ 0.027/ 0.041/ 0.002 ms 89 pps 0 pkts 4614.31 [ 9] 0.00-10.02 sec 1.25 MBytes 1.05 Mbits/sec 893/0 89 pps [ 9] Sent 893 datagrams [SUM] 0.00-10.00 sec 10.0 MBytes 8.41 Mbits/sec 7144/0 714 pps root@freedom-u540:~# iperf -c 0 -u -e -P 16 ... [ 10] 0.00-10.02 sec 1.25 MBytes 1.05 Mbits/sec 893/0 89 pps [ 10] Sent 893 datagrams [SUM] 0.00-10.00 sec 20.1 MBytes 16.8 Mbits/sec 14288/0 1427 pps [ 10] Server Report: [ 10] 0.00-9.98 sec 1.25 MBytes 1.05 Mbits/sec 0.004 ms 2/ 893 (0.22%) 0.031/ 0.027/ 0.088/ 0.007 ms 89 pps 0 pkts 4252.09 root@freedom-u540:~# iperf -c 0 -u -e -P 32 ... [ 33] 0.00-10.02 sec 1.25 MBytes 1.05 Mbits/sec 893/0 89 pps [ 33] Sent 893 datagrams [ 33] Server Report: [ 33] 0.00-9.95 sec 1.25 MBytes 1.05 Mbits/sec 0.003 ms 1/ 893 (0.11%) 0.033/ 0.027/ 0.369/ 0.014 ms 89 pps 0 pkts 4036.93 [ 33] 0.00-9.95 sec 4 datagrams received out-of-order [SUM] 0.00-10.00 sec 40.1 MBytes 33.6 Mbits/sec 28576/0 2853 pps root@freedom-u540:~# iperf -c 0 -u -e -P 64 ... [ 15] Server Report: [ 15] 0.00-9.91 sec 1.27 MBytes 1.08 Mbits/sec 0.032 ms -14/ 893 (-1.6%) 0.039/ 0.029/ 0.618/ 0.030 ms 90 pps 0 pkts 3412.60 [ 15] 0.00-9.91 sec 21 datagrams received out-of-order [ 15] 0.00-10.02 sec 1.25 MBytes 1.05 Mbits/sec 893/0 89 pps [ 15] Sent 893 datagrams [SUM] 0.00-10.01 sec 80.2 MBytes 67.2 Mbits/sec 57152/0 5696 pps root@freedom-u540:~# iperf -c 0 -u -e -P 128 ... [ 56] 0.00-10.02 sec 1.25 MBytes 1.05 Mbits/sec 893/0 89 pps [ 56] Sent 893 datagrams [ 56] Server Report: [ 56] 0.00-10.02 sec 1.25 MBytes 1.05 Mbits/sec 0.001 ms 0/ 893 (0%) 0.038/ 0.031/ 0.144/ 0.008 ms 89 pps 0 pkts 3449.57 [SUM] 0.00-10.01 sec 160 MBytes 134 Mbits/sec 114304/0 11368 pps root@freedom-u540:~# iperf -c 0 -u -e -P 256 ... [ 47] 0.00-10.02 sec 1.25 MBytes 1.05 Mbits/sec 893/0 88 pps [ 47] Sent 893 datagrams [ 47] Server Report: [ 47] 0.00-9.96 sec 1.24 MBytes 1.05 Mbits/sec 0.010 ms 5/ 893 (0.56%) 0.049/ 0.031/ 1.644/ 0.061 ms 89 pps 0 pkts 2647.73 [SUM] 0.00-10.01 sec 321 MBytes 269 Mbits/sec 228577/0 22605 pps root@freedom-u540:~# iperf -c 0 -u -e -P 512 ... [207] 0.00-10.02 sec 1.25 MBytes 1.05 Mbits/sec 890/0 88 pps [207] Sent 890 datagrams [207] Server Report: [207] 0.00-0.25 sec 1.44 KBytes 47.1 Kbits/sec 0.000 ms 898/ 899 (1e+02%) 1315.652/1315.652/1315.652/ 0.000 ms 3600 pps 4736 pkts 0.00 [SUM] 0.00-10.01 sec 640 MBytes 536 Mbits/sec 456285/0 42023 pps root@freedom-u540:~# iperf -c 0 -u -e -P 1024 ... [120] 0.00-10.17 sec 1.07 MBytes 884 Kbits/sec 764/0 73 pps [120] Sent 764 datagrams [120] Server Report: [120] 0.00-0.25 sec 1.44 KBytes 47.0 Kbits/sec 0.000 ms 772/ 773 (1e+02%) 1289.439/1289.439/1289.439/ 0.000 ms 3091 pps 3986 pkts 0.00 [SUM] 0.00-10.03 sec 1.01 GBytes 862 Mbits/sec 733728/0 68602 pps root@freedom-u540:~# iperf -c 0 -u -e -P 2048 ... [449] 0.00-10.02 sec 1.25 MBytes 1.05 Mbits/sec 890/0 86 pps [449] Sent 890 datagrams [449] Server Report: [449] 0.00-0.25 sec 1.44 KBytes 47.0 Kbits/sec 0.000 ms 898/ 899 (1e+02%) 1318.279/1318.279/1318.279/ 0.000 ms 3593 pps 4737 pkts 0.00 [SUM] 0.00-9.93 sec 1.24 GBytes 1.07 Gbits/sec 904649/0 84159 pps
При значении -b 1024 уже начали возникать ошибки, связанные с перегрузкой, поэтому были проведены дополнительные измерения в диапазоне 800 — 2000 Мбит/с с линейным приращением скорости генерации.
root@freedom-u540:/usr/src/code# lscpu Architecture: riscv64 Byte Order: Little Endian CPU(s): 4 On-line CPU(s) list: 0-3 Thread(s) per core: 1 Core(s) per socket: 1 Socket(s): 4 CPU max MHz: 1400.0000 CPU min MHz: 350.0000 L1d cache: 128 KiB L1i cache: 128 KiB root@freedom-u540:~# iperf -c 0 -u -e -P 1 ------------------------------------------------------------ Client connecting to 0, UDP port 5001 Sending 1470 byte datagrams, IPG target: 11215.21 us UDP buffer size: 208 KByte (default) ------------------------------------------------------------ [ 3] local 127.0.0.1 port 56209 connected with 127.0.0.1 port 5001 [ ID] Interval Transfer Bandwidth Write/Err PPS [ 3] 0.00-10.02 sec 1.25 MBytes 1.05 Mbits/sec 893/0 89 pps [ 3] Sent 893 datagrams [ 3] Server Report: [ 3] 0.00-10.02 sec 1.25 MBytes 1.05 Mbits/sec 0.000 ms 0/ 893 (0%) 0.029/ 0.027/ 0.049/ 0.002 ms 89 pps 0 pkts 4490.80 root@freedom-u540:~# iperf -c 0 -u -e -P 2 ... [ 3] 0.00-10.02 sec 1.25 MBytes 1.05 Mbits/sec 893/0 89 pps [ 3] Sent 893 datagrams [SUM] 0.00-10.00 sec 2.51 MBytes 2.10 Mbits/sec 1786/0 179 pps [ 3] Server Report: [ 3] 0.00-10.02 sec 1.25 MBytes 1.05 Mbits/sec 0.001 ms 0/ 893 (0%) 0.028/ 0.027/ 0.053/ 0.002 ms 89 pps 0 pkts 4654.00 root@freedom-u540:~# iperf -c 0 -u -e -P 4 ... [ 4] 0.00-10.02 sec 1.25 MBytes 1.05 Mbits/sec 893/0 89 pps [ 4] Sent 893 datagrams [SUM] 0.00-10.00 sec 5.01 MBytes 4.20 Mbits/sec 3572/0 357 pps [ 4] Server Report: [ 4] 0.00-10.02 sec 1.25 MBytes 1.05 Mbits/sec 0.000 ms 0/ 893 (0%) 0.029/ 0.027/ 0.071/ 0.004 ms 89 pps 0 pkts 4533.59 root@freedom-u540:~# iperf -c 0 -u -e -P 8 ... [ 9] Server Report: [ 9] 0.00-10.02 sec 1.25 MBytes 1.05 Mbits/sec 0.000 ms 0/ 893 (0%) 0.028/ 0.027/ 0.041/ 0.002 ms 89 pps 0 pkts 4614.31 [ 9] 0.00-10.02 sec 1.25 MBytes 1.05 Mbits/sec 893/0 89 pps [ 9] Sent 893 datagrams [SUM] 0.00-10.00 sec 10.0 MBytes 8.41 Mbits/sec 7144/0 714 pps root@freedom-u540:~# iperf -c 0 -u -e -P 16 ... [ 10] 0.00-10.02 sec 1.25 MBytes 1.05 Mbits/sec 893/0 89 pps [ 10] Sent 893 datagrams [SUM] 0.00-10.00 sec 20.1 MBytes 16.8 Mbits/sec 14288/0 1427 pps [ 10] Server Report: [ 10] 0.00-9.98 sec 1.25 MBytes 1.05 Mbits/sec 0.004 ms 2/ 893 (0.22%) 0.031/ 0.027/ 0.088/ 0.007 ms 89 pps 0 pkts 4252.09 root@freedom-u540:~# iperf -c 0 -u -e -P 32 ... [ 33] 0.00-10.02 sec 1.25 MBytes 1.05 Mbits/sec 893/0 89 pps [ 33] Sent 893 datagrams [ 33] Server Report: [ 33] 0.00-9.95 sec 1.25 MBytes 1.05 Mbits/sec 0.003 ms 1/ 893 (0.11%) 0.033/ 0.027/ 0.369/ 0.014 ms 89 pps 0 pkts 4036.93 [ 33] 0.00-9.95 sec 4 datagrams received out-of-order [SUM] 0.00-10.00 sec 40.1 MBytes 33.6 Mbits/sec 28576/0 2853 pps root@freedom-u540:~# iperf -c 0 -u -e -P 64 ... [ 15] Server Report: [ 15] 0.00-9.91 sec 1.27 MBytes 1.08 Mbits/sec 0.032 ms -14/ 893 (-1.6%) 0.039/ 0.029/ 0.618/ 0.030 ms 90 pps 0 pkts 3412.60 [ 15] 0.00-9.91 sec 21 datagrams received out-of-order [ 15] 0.00-10.02 sec 1.25 MBytes 1.05 Mbits/sec 893/0 89 pps [ 15] Sent 893 datagrams [SUM] 0.00-10.01 sec 80.2 MBytes 67.2 Mbits/sec 57152/0 5696 pps root@freedom-u540:~# iperf -c 0 -u -e -P 128 ... [ 56] 0.00-10.02 sec 1.25 MBytes 1.05 Mbits/sec 893/0 89 pps [ 56] Sent 893 datagrams [ 56] Server Report: [ 56] 0.00-10.02 sec 1.25 MBytes 1.05 Mbits/sec 0.001 ms 0/ 893 (0%) 0.038/ 0.031/ 0.144/ 0.008 ms 89 pps 0 pkts 3449.57 [SUM] 0.00-10.01 sec 160 MBytes 134 Mbits/sec 114304/0 11368 pps root@freedom-u540:~# iperf -c 0 -u -e -P 256 ... [ 47] 0.00-10.02 sec 1.25 MBytes 1.05 Mbits/sec 893/0 88 pps [ 47] Sent 893 datagrams [ 47] Server Report: [ 47] 0.00-9.96 sec 1.24 MBytes 1.05 Mbits/sec 0.010 ms 5/ 893 (0.56%) 0.049/ 0.031/ 1.644/ 0.061 ms 89 pps 0 pkts 2647.73 [SUM] 0.00-10.01 sec 321 MBytes 269 Mbits/sec 228577/0 22605 pps root@freedom-u540:~# iperf -c 0 -u -e -P 512 ... [207] 0.00-10.02 sec 1.25 MBytes 1.05 Mbits/sec 890/0 88 pps [207] Sent 890 datagrams [207] Server Report: [207] 0.00-0.25 sec 1.44 KBytes 47.1 Kbits/sec 0.000 ms 898/ 899 (1e+02%) 1315.652/1315.652/1315.652/ 0.000 ms 3600 pps 4736 pkts 0.00 [SUM] 0.00-10.01 sec 640 MBytes 536 Mbits/sec 456285/0 42023 pps root@freedom-u540:~# iperf -c 0 -u -e -P 1024 ... [120] 0.00-10.17 sec 1.07 MBytes 884 Kbits/sec 764/0 73 pps [120] Sent 764 datagrams [120] Server Report: [120] 0.00-0.25 sec 1.44 KBytes 47.0 Kbits/sec 0.000 ms 772/ 773 (1e+02%) 1289.439/1289.439/1289.439/ 0.000 ms 3091 pps 3986 pkts 0.00 [SUM] 0.00-10.03 sec 1.01 GBytes 862 Mbits/sec 733728/0 68602 pps root@freedom-u540:~# iperf -c 0 -u -e -P 2048 ... [449] 0.00-10.02 sec 1.25 MBytes 1.05 Mbits/sec 890/0 86 pps [449] Sent 890 datagrams [449] Server Report: [449] 0.00-0.25 sec 1.44 KBytes 47.0 Kbits/sec 0.000 ms 898/ 899 (1e+02%) 1318.279/1318.279/1318.279/ 0.000 ms 3593 pps 4737 pkts 0.00 [SUM] 0.00-9.93 sec 1.24 GBytes 1.07 Gbits/sec 904649/0 84159 pps
Николай Малых