Low UDP iperf throughput

ariel.dalessandro
Posts: 4
Joined: Thu Nov 22, 2018 4:02 pm

Low UDP iperf throughput

Postby ariel.dalessandro » Mon May 13, 2019 7:47 pm

Hi all,

I'm running the esp-idf iperf example [0] and the maximum UDP throughput is ~1.05Mbits/sec, but according to the docs [1] it should be ~30Mbits/sec.

Is really 30Mbits/sec the expected throughput on this scenario?

Target hardware:

* ESP32 Core Board V2.

Test setup:

* testing on esp-idf tag v3.2 [2] and commit 05838641 [3], as suggested in [1]. Same results on both versions.
* using config examples/wifi/iperf/sdkconfig.defaults.99 [4] as suggested here [1].
* testing using ESP32 in AP and STA modes. Same results on both versions.

Test log:

* ESP32 (iperf server):

Code: Untitled.bsh Select all


esp32> iperf -s -u -i 1 -t 10
I (847313) cmd_wifi: mode=udp-server sip=192.168.1.105:5001, dip=0.0.0.0:5001, interval=1, time=10
I (847326) iperf: want recv=16384
Interval Bandwidth
0- 1 sec 0.62 Mbits/sec
1- 2 sec 1.05 Mbits/sec
2- 3 sec 1.05 Mbits/sec
3- 4 sec 1.06 Mbits/sec
4- 5 sec 1.05 Mbits/sec
5- 6 sec 1.05 Mbits/sec
6- 7 sec 1.05 Mbits/sec
7- 8 sec 1.02 Mbits/sec
8- 9 sec 1.07 Mbits/sec
9- 10 sec 1.06 Mbits/sec
0- 10 sec 1.01 Mbits/sec
I (857338) iperf: iperf exit
esp32>
*Linux host (iperf client):

Code: Untitled.bsh Select all


$ iperf -c 192.168.1.105 -i 1 -t 10 -u -e 
------------------------------------------------------------
Client connecting to 192.168.1.105, UDP port 5001 with pid 13039
Sending 1470 byte datagrams, IPG target: 11215.21 us (kalman adjust)
UDP buffer size: 208 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.0.101 port 34857 connected with 192.168.1.105 port 5001
[ ID] Interval Transfer Bandwidth Write/Err PPS
[ 3] 0.0000-1.0000 sec 131 KBytes 1.07 Mbits/sec 91/0 90 pps
[ 3] 1.0000-2.0000 sec 128 KBytes 1.05 Mbits/sec 89/0 89 pps
[ 3] 2.0000-3.0000 sec 128 KBytes 1.05 Mbits/sec 89/0 89 pps
[ 3] 3.0000-4.0000 sec 128 KBytes 1.05 Mbits/sec 89/0 89 pps
[ 3] 4.0000-5.0000 sec 128 KBytes 1.05 Mbits/sec 89/0 89 pps
[ 3] 5.0000-6.0000 sec 128 KBytes 1.05 Mbits/sec 89/0 89 pps
[ 3] 6.0000-7.0000 sec 129 KBytes 1.06 Mbits/sec 90/0 89 pps
[ 3] 7.0000-8.0000 sec 128 KBytes 1.05 Mbits/sec 89/0 89 pps
[ 3] 8.0000-9.0000 sec 128 KBytes 1.05 Mbits/sec 89/0 89 pps
read failed: Connection refused
[ 3] WARNING: did not receive ack of last datagram after 2 tries.
[ 3] 0.0000-10.0041 sec 1.25 MBytes 1.05 Mbits/sec 892/16 89 pps
[ 3] Sent 892 datagrams
$
Thanks in advance,
Ariel

[0]: https://github.com/espressif/esp-idf/tr ... wifi/iperf
[1]: https://docs.espressif.com/projects/esp ... throughput
[2]: https://github.com/espressif/esp-idf/releases/tag/v3.2
[3]: https://github.com/espressif/esp-idf/commit/05838641
[4]: https://github.com/espressif/esp-idf/bl ... efaults.99

Angus
Espressif staff
Espressif staff
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: Low UDP iperf throughput

Postby Angus » Tue May 14, 2019 2:10 am

Hi Ariel,

The main difference is that the 30Mbit/sec is measured in a shielded box - so strong WiFi signal and no interference.

Can you give any information about the WiFi signal where you were testing?

ariel.dalessandro
Posts: 4
Joined: Thu Nov 22, 2018 4:02 pm

Re: Low UDP iperf throughput

Postby ariel.dalessandro » Tue May 14, 2019 2:31 am

Hi ESP_Angus,
Thanks for the quick reply.
The main difference is that the 30Mbit/sec is measured in a shielded box - so strong WiFi signal and no interference.
Is it? According to https://docs.espressif.com/projects/esp ... throughput:
* Espressif’s lab Rx/Tx = 30/30Mbit/sec.
* Shield box Rx/Tx = 90/60Mbit/sec.
Can you give any information about the WiFi signal where you were testing?
Yes. Using ESP32 in AP mode (ssid: esp32test):

Code: Untitled.bsh Select all


$ nmcli device wifi list 
IN-USE SSID MODE CHAN RATE SIGNAL BARS SECURITY
* esp32test Infra 2 135 Mbit/s 100 ▂▄▆█ WPA1 WPA2
FS2.4 Infra 1 195 Mbit/s 69 ▂▄▆_ WPA1 WPA2
FiberCorp WiFi742 2.4GHz Infra 6 195 Mbit/s 59 ▂▄▆_ WPA1 WPA2
WiFi-3A Infra 6 135 Mbit/s 59 ▂▄▆_ WPA1 WPA2
WNinternet_A3B20 Infra 9 130 Mbit/s 49 ▂▄__ WPA2
Bertita1 Infra 1 130 Mbit/s 40 ▂▄__ WPA1 WPA2
AndroidAP Infra 11 130 Mbit/s 40 ▂▄__ WPA2
WIFI-891-Local Infra 6 54 Mbit/s 35 ▂▄__ WPA2
Riccobelli Infra 6 54 Mbit/s 35 ▂▄__ WPA1 WPA2
DIRECT-t7M2020 Series Infra 6 54 Mbit/s 35 ▂▄__ WPA2
AnyCast-D977D467 Infra 11 135 Mbit/s 35 ▂▄__ WPA2
Diavoli rossi Infra 11 65 Mbit/s 35 ▂▄__ WPA2
FS5.8 Infra 52 405 Mbit/s 35 ▂▄__ WPA1 WPA2
FiberCorp WiFi742 5.8GHz Infra 153 405 Mbit/s 35 ▂▄__ WPA1 WPA2
Fibertel WiFi228 2.4GHz Infra 6 195 Mbit/s 34 ▂▄__ WPA1 WPA2
pepavik Infra 1 195 Mbit/s 32 ▂▄__ WPA1 WPA2
WiFi-Arnet-B7990F Infra 11 270 Mbit/s 29 ▂___ WPA2
Fibertel WiFi885 2.4GHz Infra 11 130 Mbit/s 29 ▂___ WPA1 WPA2

ariel.dalessandro
Posts: 4
Joined: Thu Nov 22, 2018 4:02 pm

Re: Low UDP iperf throughput

Postby ariel.dalessandro » Thu May 30, 2019 5:27 pm

Hi all,

Any further thoughts on this?

I'd like to extend the initial post as I don't think this is WiFi signal or interference problem.
I'm getting 30Mbps -matching the "lab" results- for all possible configurations, except for ESP32 in UDP server mode (see Test 2 below).

The following tests were performed using the same test setup as in the original post.

Test 0: iperf TCP
ESP32 server - Linux client

Code: Untitled.bsh Select all


        ESP32 server:
esp32> iperf -s

Linux client:
$ iperf -c 192.168.4.1 -i 1 -t 5
------------------------------------------------------------
Client connecting to 192.168.4.1, TCP port 5001
TCP window size: 178 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.4.2 port 33534 connected with 192.168.4.1 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0- 1.0 sec 6.12 MBytes 51.4 Mbits/sec
[ 3] 1.0- 2.0 sec 4.25 MBytes 35.7 Mbits/sec
[ 3] 2.0- 3.0 sec 6.00 MBytes 50.3 Mbits/sec
[ 3] 3.0- 4.0 sec 6.12 MBytes 51.4 Mbits/sec
[ 3] 4.0- 5.0 sec 5.50 MBytes 46.1 Mbits/sec
[ 3] 0.0- 5.0 sec 28.0 MBytes 47.0 Mbits/sec

Test 1: iperf TCP
Linux server - ESP32 client

Code: Untitled.bsh Select all


        Linux server:
$ iperf -s

ESP32 client:
esp32> iperf -c 192.168.4.2 -i 1 -t 5
I (199664) cmd_wifi: mode=tcp-client sip=192.168.4.1:5001, dip=192.168.4.2:5001, interval=1, time=5
Interval Bandwidth
0- 1 sec 33.82 Mbits/sec
1- 2 sec 42.21 Mbits/sec
2- 3 sec 4.98 Mbits/sec
3- 4 sec 24.51 Mbits/sec
4- 5 sec 50.33 Mbits/sec
0- 5 sec 31.17 Mbits/sec
I (204790) iperf: iperf exit

Test 2: iperf UDP
ESP32 server - Linux client

Code: Untitled.bsh Select all


        ESP32 server:
esp32> iperf -s -u

Linux client:
$ iperf -c 192.168.4.1 -i 1 -t 5 -u
------------------------------------------------------------
Client connecting to 192.168.4.1, UDP port 5001
Sending 1470 byte datagrams, IPG target: 11215.21 us (kalman adjust)
UDP buffer size: 208 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.4.2 port 34986 connected with 192.168.4.1 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0- 1.0 sec 131 KBytes 1.07 Mbits/sec
[ 3] 1.0- 2.0 sec 128 KBytes 1.05 Mbits/sec
[ 3] 2.0- 3.0 sec 128 KBytes 1.05 Mbits/sec
[ 3] 3.0- 4.0 sec 128 KBytes 1.05 Mbits/sec
[ 3] WARNING: did not receive ack of last datagram after 10 tries.
[ 3] 0.0- 5.0 sec 640 KBytes 1.05 Mbits/sec
[ 3] Sent 446 datagrams

Test 3: iperf UDP
Linux server - ESP32 client

Code: Untitled.bsh Select all


        Linux server:
$ iperf -s -u

ESP32 client:
esp32> iperf -c 192.168.4.2 -i 1 -t 5 -u
I (314567) cmd_wifi: mode=udp-client sip=192.168.4.1:5001, dip=192.168.4.2:5001, interval=1, time=5
Interval Bandwidth
0- 1 sec 30.44 Mbits/sec
1- 2 sec 52.96 Mbits/sec
2- 3 sec 55.55 Mbits/sec
3- 4 sec 57.15 Mbits/sec
4- 5 sec 58.94 Mbits/sec
0- 5 sec 51.01 Mbits/sec
I (319581) iperf: iperf exit

Thanks,
Ariel

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Low UDP iperf throughput

Postby WiFive » Thu May 30, 2019 7:27 pm

Try

Code: Select all

iperf -b 30M -u -c 192.168.4.1

Who is online

Users browsing this forum: Bytespider, mikemelga, Qwantbot and 13 guests