TCP Slow, then disconnects, UDP Slow
Posted: Fri Nov 24, 2017 7:09 am
I am experiencing very slow TCP and UDP speeds between 2 Sparkfun ESP32 Thing boards. In addition the the TCP being slow, it disconnects very quickly.
The first test was using the iperf example under master https://github.com/espressif/esp-idf/tr ... wifi/iperf
Compiled with master/commit 597ce3b800cc4857e1939bbb937610a9e30c6e72
Testing with TCP, the output shows an initial slow connection then the speed goes to zero
Testing with UDP is just slow (according to https://github.com/espressif/esp-idf/issues/322, is should be 130. I get ~1.4.
I also did further tests using the performance examples: https://github.com/espressif/esp-idf/tr ... erformance
and got similar results.
TCP
UDP
I also did testing using the latest release v2.1.1. Since iperf is not part of v2.1.1, I didn't run it, but I did run the TCP and UDP examples and got similar results.
TCP
I've been researching and battling these slow issues for a few days now and I'm out of options. I'm starting to wonder if I got some bad hardware. I have 5 boards and all of them show the same behavior. Any ideas would be appreciated.
The first test was using the iperf example under master https://github.com/espressif/esp-idf/tr ... wifi/iperf
Compiled with master/commit 597ce3b800cc4857e1939bbb937610a9e30c6e72
Testing with TCP, the output shows an initial slow connection then the speed goes to zero
Code: Select all
I (52003) iperf: mode=tcp-client sip=192.168.4.2:5001, dip=192.168.4.1:5001, interval=3, time=30
esp32>
Interval Bandwidth
0- 3 sec 0.35 Mbits/sec
3- 6 sec 0.00 Mbits/sec
6- 9 sec 0.00 Mbits/sec
9- 12 sec 0.00 Mbits/sec
12- 15 sec 0.00 Mbits/sec
15- 18 sec 0.00 Mbits/sec
18- 21 sec 0.00 Mbits/sec
21- 24 sec 0.00 Mbits/sec
24- 27 sec 0.00 Mbits/sec
27- 30 sec 0.00 Mbits/sec
0- 30 sec 0.03 Mbits/sec
I (82027) iperf: iperf exit
Code: Select all
I (429604) iperf: mode=udp-client sip=192.168.4.2:5001, dip=192.168.4.1:5001, interval=3, time=30
esp32>
Interval Bandwidth
0- 3 sec 1.54 Mbits/sec
3- 6 sec 1.31 Mbits/sec
6- 9 sec 1.45 Mbits/sec
9- 12 sec 1.31 Mbits/sec
12- 15 sec 1.48 Mbits/sec
15- 18 sec 1.34 Mbits/sec
18- 21 sec 1.44 Mbits/sec
21- 24 sec 1.33 Mbits/sec
24- 27 sec 1.44 Mbits/sec
27- 30 sec 1.33 Mbits/sec
0- 30 sec 1.40 Mbits/sec
I (459633) iperf: iperf exit
and got similar results.
TCP
Code: Select all
TCP
I (29568) tcp_perf:: connecting to server...
I (29608) tcp_perf:: connect to server success!
I (32608) tcp_perf:: tcp recv 3829 byte per sec!
W (35608) tcp_perf:: tcp disconnected... stop.
Code: Select all
I (50131) udp_perf:: udp send 88573 byte per sec! total pack: 182
...
I (173131) udp_perf:: udp send 89546 byte per sec! total pack: 7623
TCP
Code: Select all
I (11688) tcp_perf:: sta has connected to ap.
I (11698) tcp_perf:: tcp_server will start after 3s...
I (14708) tcp_perf:: create_tcp_server.
I (14708) tcp_perf:: server socket....port=4567
I (32418) tcp_perf:: tcp connection established!
I (32518) tcp_perf:: start sending...
I (35418) tcp_perf:: tcp send 5840 byte per sec!
W (38418) tcp_perf:: tcp disconnected... stop.