I was browsing through the examples of the esp-idf and saw that suda-morris had implemented Iperf for the ESP32. A while back I bought some ESP32 dev-boards from Olimex, so I figured it would be interesting to see what sort of speeds we get. This post is just about running the simple tests, I might do some further testing later.
I got the ESP32-Gateway-EA and the ESP32-POE. Both dev-boards have both ethernet and wifi, so we can compare them. Furthermore, since the former has an external antenna and the latter has the more common PCB antenna it is also interesting to see whether that makes a big difference.
So I tested three scenarios
- Ethernet to iperf-server
- PCB antenna wifi to iperf-server
- External antenna wifi to iperf-server
For comparison, I also tested a RPi2B and a ODROID-HC2 that are connected via ethernet to the router. The iperf-server in this situation is my laptop connected via ethernet to the router (ASUS RT-N66U). In both wifi tests the boards were about 5 m away from the router with no obstacles in the way.
Setting up the esp-idf is fairly straight-forward and the documentation seems quite good these days. The iperf implementation was also nicely done and easy to get going. After installing the idf (which mainly required cloning the repo and setting up the paths) I ran
make flash monitor
Once in the monitor you can just type in help and you can get all the necessary instructions. I set my laptop to server mode with
iperf -c <SERVER_IP>
As expected the gigabit ethernet was the fastest with 923 Mbits/sec for ODROID-HC2. The throughput of the RPi2B was only 94.2 Mbits/sec. While the new Pi (3B+) still doesn’t have gigabit, they should be notably faster compared to the 2B.
The ethernet on the ESP32 was around 45 % faster compared to WiFi. There was no notable difference between the external and the PCB antenna at this short distance.
|External antenna||32.80 Mbits/sec|
|PCB antenna||32.88 Mbits/sec|
It would be interesting to run some more benchmarks with UDP. Maybe something closer to the OpenBenchmarking test profile.