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):
  1. esp32> iperf -s -u -i 1 -t 10
  2. I (847313) cmd_wifi: mode=udp-server sip=192.168.1.105:5001, dip=0.0.0.0:5001, interval=1, time=10
  3. I (847326) iperf: want recv=16384
  4.         Interval Bandwidth
  5.    0-   1 sec       0.62 Mbits/sec
  6.    1-   2 sec       1.05 Mbits/sec
  7.    2-   3 sec       1.05 Mbits/sec
  8.    3-   4 sec       1.06 Mbits/sec
  9.    4-   5 sec       1.05 Mbits/sec
  10.    5-   6 sec       1.05 Mbits/sec
  11.    6-   7 sec       1.05 Mbits/sec
  12.    7-   8 sec       1.02 Mbits/sec
  13.    8-   9 sec       1.07 Mbits/sec
  14.    9-  10 sec       1.06 Mbits/sec
  15.    0-  10 sec       1.01 Mbits/sec
  16. I (857338) iperf: iperf exit
  17. esp32>
*Linux host (iperf client):
  1. $ iperf -c 192.168.1.105 -i 1 -t 10 -u -e
  2. ------------------------------------------------------------
  3. Client connecting to 192.168.1.105, UDP port 5001 with pid 13039
  4. Sending 1470 byte datagrams, IPG target: 11215.21 us (kalman adjust)
  5. UDP buffer size:  208 KByte (default)
  6. ------------------------------------------------------------
  7. [  3] local 192.168.0.101 port 34857 connected with 192.168.1.105 port 5001
  8. [ ID] Interval            Transfer     Bandwidth      Write/Err  PPS
  9. [  3] 0.0000-1.0000 sec   131 KBytes  1.07 Mbits/sec  91/0       90 pps
  10. [  3] 1.0000-2.0000 sec   128 KBytes  1.05 Mbits/sec  89/0       89 pps
  11. [  3] 2.0000-3.0000 sec   128 KBytes  1.05 Mbits/sec  89/0       89 pps
  12. [  3] 3.0000-4.0000 sec   128 KBytes  1.05 Mbits/sec  89/0       89 pps
  13. [  3] 4.0000-5.0000 sec   128 KBytes  1.05 Mbits/sec  89/0       89 pps
  14. [  3] 5.0000-6.0000 sec   128 KBytes  1.05 Mbits/sec  89/0       89 pps
  15. [  3] 6.0000-7.0000 sec   129 KBytes  1.06 Mbits/sec  90/0       89 pps
  16. [  3] 7.0000-8.0000 sec   128 KBytes  1.05 Mbits/sec  89/0       89 pps
  17. [  3] 8.0000-9.0000 sec   128 KBytes  1.05 Mbits/sec  89/0       89 pps
  18. read failed: Connection refused
  19. [  3] WARNING: did not receive ack of last datagram after 2 tries.
  20. [  3] 0.0000-10.0041 sec  1.25 MBytes  1.05 Mbits/sec  892/16       89 pps
  21. [  3] Sent 892 datagrams
  22. $
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

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: Low UDP iperf throughput

Postby ESP_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.
ESP_Angus wrote: 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.
ESP_Angus wrote: Can you give any information about the WiFi signal where you were testing?
Yes. Using ESP32 in AP mode (ssid: esp32test):
  1. $ nmcli device wifi list
  2. IN-USE  SSID                      MODE   CHAN  RATE        SIGNAL  BARS  SECURITY  
  3. *       esp32test                 Infra  2     135 Mbit/s  100     ▂▄▆█  WPA1 WPA2
  4.         FS2.4                     Infra  1     195 Mbit/s  69      ▂▄▆_  WPA1 WPA2
  5.         FiberCorp WiFi742 2.4GHz  Infra  6     195 Mbit/s  59      ▂▄▆_  WPA1 WPA2
  6.         WiFi-3A                   Infra  6     135 Mbit/s  59      ▂▄▆_  WPA1 WPA2
  7.         WNinternet_A3B20          Infra  9     130 Mbit/s  49      ▂▄__  WPA2      
  8.         Bertita1                  Infra  1     130 Mbit/s  40      ▂▄__  WPA1 WPA2
  9.         AndroidAP                 Infra  11    130 Mbit/s  40      ▂▄__  WPA2      
  10.         WIFI-891-Local            Infra  6     54 Mbit/s   35      ▂▄__  WPA2      
  11.         Riccobelli                Infra  6     54 Mbit/s   35      ▂▄__  WPA1 WPA2
  12.         DIRECT-t7M2020 Series     Infra  6     54 Mbit/s   35      ▂▄__  WPA2      
  13.         AnyCast-D977D467          Infra  11    135 Mbit/s  35      ▂▄__  WPA2      
  14.         Diavoli rossi             Infra  11    65 Mbit/s   35      ▂▄__  WPA2      
  15.         FS5.8                     Infra  52    405 Mbit/s  35      ▂▄__  WPA1 WPA2
  16.         FiberCorp WiFi742 5.8GHz  Infra  153   405 Mbit/s  35      ▂▄__  WPA1 WPA2
  17.         Fibertel WiFi228 2.4GHz   Infra  6     195 Mbit/s  34      ▂▄__  WPA1 WPA2
  18.         pepavik                   Infra  1     195 Mbit/s  32      ▂▄__  WPA1 WPA2
  19.         WiFi-Arnet-B7990F         Infra  11    270 Mbit/s  29      ▂___  WPA2      
  20.         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
  1.         ESP32 server:
  2.                 esp32> iperf -s
  3.  
  4.         Linux client:
  5.                 $ iperf -c 192.168.4.1 -i 1 -t 5
  6.                 ------------------------------------------------------------
  7.                 Client connecting to 192.168.4.1, TCP port 5001
  8.                 TCP window size:  178 KByte (default)
  9.                 ------------------------------------------------------------
  10.                 [  3] local 192.168.4.2 port 33534 connected with 192.168.4.1 port 5001
  11.                 [ ID] Interval       Transfer     Bandwidth
  12.                 [  3]  0.0- 1.0 sec  6.12 MBytes  51.4 Mbits/sec
  13.                 [  3]  1.0- 2.0 sec  4.25 MBytes  35.7 Mbits/sec
  14.                 [  3]  2.0- 3.0 sec  6.00 MBytes  50.3 Mbits/sec
  15.                 [  3]  3.0- 4.0 sec  6.12 MBytes  51.4 Mbits/sec
  16.                 [  3]  4.0- 5.0 sec  5.50 MBytes  46.1 Mbits/sec
  17.                 [  3]  0.0- 5.0 sec  28.0 MBytes  47.0 Mbits/sec

Test 1: iperf TCP
Linux server - ESP32 client
  1.         Linux server:
  2.                 $ iperf -s
  3.  
  4.         ESP32 client:
  5.                 esp32> iperf -c 192.168.4.2 -i 1 -t 5
  6.                 I (199664) cmd_wifi: mode=tcp-client sip=192.168.4.1:5001, dip=192.168.4.2:5001, interval=1, time=5
  7.                         Interval Bandwidth
  8.                    0-   1 sec       33.82 Mbits/sec
  9.                    1-   2 sec       42.21 Mbits/sec
  10.                    2-   3 sec       4.98 Mbits/sec
  11.                    3-   4 sec       24.51 Mbits/sec
  12.                    4-   5 sec       50.33 Mbits/sec
  13.                    0-   5 sec       31.17 Mbits/sec
  14.                 I (204790) iperf: iperf exit

Test 2: iperf UDP
ESP32 server - Linux client
  1.         ESP32 server:
  2.                 esp32> iperf -s -u
  3.  
  4.         Linux client:
  5.                 $ iperf -c 192.168.4.1 -i 1 -t 5 -u
  6.                 ------------------------------------------------------------
  7.                 Client connecting to 192.168.4.1, UDP port 5001
  8.                 Sending 1470 byte datagrams, IPG target: 11215.21 us (kalman adjust)
  9.                 UDP buffer size:  208 KByte (default)
  10.                 ------------------------------------------------------------
  11.                 [  3] local 192.168.4.2 port 34986 connected with 192.168.4.1 port 5001
  12.                 [ ID] Interval       Transfer     Bandwidth
  13.                 [  3]  0.0- 1.0 sec   131 KBytes  1.07 Mbits/sec
  14.                 [  3]  1.0- 2.0 sec   128 KBytes  1.05 Mbits/sec
  15.                 [  3]  2.0- 3.0 sec   128 KBytes  1.05 Mbits/sec
  16.                 [  3]  3.0- 4.0 sec   128 KBytes  1.05 Mbits/sec
  17.                 [  3] WARNING: did not receive ack of last datagram after 10 tries.
  18.                 [  3]  0.0- 5.0 sec   640 KBytes  1.05 Mbits/sec
  19.                 [  3] Sent 446 datagrams

Test 3: iperf UDP
Linux server - ESP32 client
  1.         Linux server:
  2.                 $ iperf -s -u
  3.  
  4.         ESP32 client:
  5.                 esp32> iperf -c 192.168.4.2 -i 1 -t 5 -u
  6.                 I (314567) cmd_wifi: mode=udp-client sip=192.168.4.1:5001, dip=192.168.4.2:5001, interval=1, time=5
  7.                         Interval Bandwidth
  8.                    0-   1 sec       30.44 Mbits/sec
  9.                    1-   2 sec       52.96 Mbits/sec
  10.                    2-   3 sec       55.55 Mbits/sec
  11.                    3-   4 sec       57.15 Mbits/sec
  12.                    4-   5 sec       58.94 Mbits/sec
  13.                    0-   5 sec       51.01 Mbits/sec
  14.                 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: ESP_Sprite and 106 guests