Iperf on ESP32



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. DevBoards


So I tested three scenarios

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

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 menuconfig
The ethernet required setting up some values but luckily it was documented by Olimex. I followed the instructions on Github and set the PHY address to 0. After setting up I flashed the example and entered the monitor with
make flash monitor
Pro-tip: You can exit from this monitor with Ctrl+].

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 -s
and ran the client command on the ESP32.
iperf -c <SERVER_IP>
I ran the test with TCP, 3 second intervals and 30s total time.


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.

Connection Speed
Ethernet 47.78 Mbits/sec
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.