ESP32 ethernet UPD server speed issue

Started by NielsO, January 17, 2023, 11:44:21 PM

Previous topic - Next topic

NielsO

ESP32 ethernet UPD server speed issue:
When running iperf speed test with ESP32 in server mode the network speed is 0 Mbits/s
As a reference the same test with ESP32 in client mode the network speed is 68 Mbits/s

HW setup:
Olimex gateway board with PHYLAN8710. 
IDE:
Visual Studio code with extension Espressif IDF V1.51
Code.
Espressif IDF iperf example

Sdkconfig:
Configured and working with basic ethernet example. Ping is also working.
Iperf example working in client mode. 


Steps to reproduce:
Client side CMD (PC WIN10):
iperf3 -c 192.168.0.2 -p 5001
ESP32 server side CMD:
iperf -s

COM output:
iperf> I (188437) iperf: Socket created
I (192597) iperf: accept: 192.168.0.3,31194


        Interval Bandwidth
  0-  3 sec      0.00 Mbits/sec
  3-  6 sec      0.00 Mbits/sec
  6-  9 sec      0.00 Mbits/sec
W (202607) iperf: tcp server recv error, error code: 11, reason: No more processes
I (202607) iperf: TCP Socket server is closed.
I (202607) iperf: iperf exit
  9-  12 sec      0.00 Mbits/sec

If we run the server with recommended parameters from example code.
iperf -u -s -i 3

The server closes socket after 7 seconds.
COM output:
iperf> I (73747) iperf: Socket created
I (73747) iperf: Socket bound, port 35091
W (83757) iperf: udp server recv error, error code: 11, reason: No more processes
I (83757) iperf: Udp socket server is closed.
I (83757) iperf: iperf exit

As a reference, here is the prompt with the ESP32 in client mode where the speed is 68 Mbits/s

ESP32 client side CMD:
iperf -u -c 192.168.0.3
PC server side CMD:
iperf3 -s

LubOlimex

Which revision is the ESP32-GATEWAY board?

Probably related to either the configuration or the "Visual Studio code with extension Espressif IDF V1.51" in general. Maybe report to people that maintain "Visual Studio code with extension Espressif IDF V1.51".

Try with our server for either Arduino IDE or ESP-IDF examples:

https://github.com/OLIMEX/ESP32-POE/tree/master/SOFTWARE
Technical support and documentation manager at Olimex

NielsO

#2
Hi LubOlimex

The version is ESP32-GATEWAY-IND rev. G.

Could you please provide your iperf ethernet test results for ESP32 gateway in server mode. What is the bandwidth? Which framework did you use?

The ESP-IDF iperf test is working in client mode, also the ESP-IDF basic ethernet example is working - the device is getting IP in DHCP mode AND it is possible to ping the device. 

We have also performed an ethernet speed test with Arduino where the bandwidth was measured to 700 Kbit/s.

We have experienced this ethernet speed problem with 2 different frameworks, that is why we reach out to you.

BR Niels

NielsO

--------- FIXED --------------
The issue was that ESP32 IPERF code example is only compatible with IPERF V2.x for Windows.

Managed to test the UDP server speed on ESP32-GATEWAY and also ESP32-EVB

Results:
ESP32 ETHERNET SPEED TEST
Dev env: Espressif IDF v1.5.1
Visual Studio Code
-----------------------------------------
IPERF Code Example
-----------------------------------------
ESP32-EVB:

COM CMD:
iperf -u -c 192.168.0.2 -b 80M -t 30 -i 3
ESP32 CMD:
iperf -u -s -t 30 -i 3


Client connecting to 192.168.0.2, UDP port 5001
Sending 1470 byte datagrams, IPG target: 147.00 us (kalman adjust)
UDP buffer size:  208 KByte (default)
------------------------------------------------------------
[  3] local 192.168.0.19 port 59253 connected with 192.168.0.2 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 3.0 sec  28.5 MBytes  79.7 Mbits/sec
[  3]  3.0- 6.0 sec  28.6 MBytes  79.9 Mbits/sec
[  3]  6.0- 9.0 sec  28.6 MBytes  80.1 Mbits/sec
[  3]  9.0-12.0 sec  28.6 MBytes  79.9 Mbits/sec
[  3] 12.0-15.0 sec  28.6 MBytes  80.1 Mbits/sec
[  3] 15.0-18.0 sec  14.0 MBytes  39.2 Mbits/sec


ESP32-GATEWAY:
COM CMD:
iperf -u -c 192.168.0.2 -b 80M -t 30 -i 3
ESP32 CMD:
iperf -u -s -t 30 -i 3

Client connecting to 192.168.0.2, UDP port 5001
Sending 1470 byte datagrams, IPG target: 147.00 us (kalman adjust)
UDP buffer size:  208 KByte (default)
------------------------------------------------------------
[  3] local 192.168.0.19 port 61290 connected with 192.168.0.2 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 3.0 sec  28.6 MBytes  80.0 Mbits/sec
[  3]  3.0- 6.0 sec  28.5 MBytes  79.7 Mbits/sec
[  3]  6.0- 9.0 sec  28.7 MBytes  80.1 Mbits/sec
[  3]  9.0-12.0 sec  28.7 MBytes  80.1 Mbits/sec