Although the ESP32-S3 is a powerful MCU with built-in Wi-Fi and BLE capabilities, its software-based TCP/IP stack (LWIP) can cause performance degradation in high-speed Ethernet environments.In this experiment, LWIP was removed and WIZnet’s TCP Offload Engine (TOE) was integrated to verify the impact of hardware-based TCP/IP processing on the ESP32-S3’s communication performance.The test was conducted by modifying the iperf example provided in ESP-IDF to compare the LWIP and TOE environments under identical conditions.
Test Environment ConfigurationMCU: ESP32-S3TOE Chip: WIZnet W5500 (SPI Interface)Tool: iperf2Test scenarios
- Standard iperf test
- iperf test under Ping flood attack
- iperf Performance under CPU Load
Average Bandwidth (iperf test results)
ESP32 + TOE : 34.8 MbpsESP32 + LWIP: 9.22 Mbps
A continuous Ping flood of approximately 1500 ICMP echo requests per second was applied to generate network load.
Average Bandwidth (iperf test results)
ESP32 + TOE : 34.3 MbpsESP32 + LWIP: 1.52 Mbps
The ESP32-S3 with TOE maintained stable throughput under both normal and Ping flood conditions.While the LWIP-based setup showed severe performance degradation under heavy ICMP load,the TOE-based system demonstrated almost no drop in bandwidth — clearly proving the benefit of hardware TCP/IP offloading.
Test Result - iperf Performance under CPU LoadExperiment ObjectiveTo evaluate how much network performance degrades when a high-priority CPU load task runs on the ESP32-S3,and to verify the effectiveness of WIZnet TOE’s hardware TCP/IP offloading in maintaining performance under CPU stress.
Test ConditionsSource code of the cpu_load_task function used to generate artificial CPU load.It runs with a higher priority than the network task to intentionally increase CPU utilization.
Output of the FreeRTOS tasks command.The load0 task operates with a higher priority than the iperf_traffic task, confirming the intended CPU load condition.
Comparison of average throughput between TOE and LWIP under CPU load.While TOE showed only about a 25% reduction, LWIP performance dropped by approximately 49%.
Although the absolute drop in throughput appears larger for TOE,the reduction rate of LWIP (approximately 49%) is nearly twice that of TOE (25%).This indicates that TOE not only delivers higher overall throughput but also maintains much more stable performance under CPU stress.
In the TOE configuration, even when the CPU is heavily loaded,TCP session management, retransmission control, and checksum calculations are handled by the hardware,minimizing the performance impact.In contrast, with LWIP, all TCP/IP processing is performed by the CPU itself; therefore,when a high-priority computation task (load task) consumes CPU time, network task scheduling is delayed, leading to a sharp decline in throughput.
EvaluationThrough this series of experiments, the practical benefits of combining the ESP32-S3 with WIZnet’s TOE were clearly verified.Three types of tests were conducted — standard iperf performance, stability under Ping flood conditions, and network performance under CPU load.
Standard iperf TestThe TOE configuration achieved an average throughput of 34.8 Mbps, compared to 9.22 Mbps with LWIP — approximately 3.8 times higher performance.This confirms that hardware TCP/IP offloading significantly improves transmission efficiency.
Ping Flood TestThe TOE-based system maintained 34.3 Mbps, showing almost no degradation,while the LWIP setup dropped drastically to 1.52 Mbps.This demonstrates the superior stability and resilience of TOE against heavy ICMP traffic.
CPU Load TestUnder CPU stress, TOE maintained 26.1 Mbps (about 25% drop),whereas LWIP decreased to 4.66 Mbps (about 49% drop).These results experimentally confirm that TOE is highly resistant to CPU scheduling interference thanks to hardware TCP/IP offloading.
Practical ApplicationWith TOE integration, the ESP32-S3 achieves a stable wired network performance of approximately 25–35 Mbps (3–4 MB/s).This improvement enables the development of real-time network processing applications that were previously impractical under the LWIP environment (~9 Mbps).The table below summarizes potential application areas that can fully utilize this enhanced throughput.
![[ESP32-S3] WIZnet W5500 TOE VS LWIP Iperf Performance Test](https://prod.hackster-cdn.online/assets/transparent-a0c1e3063bcabc548a5f3fa7328f3c1c97f747e6e764da4c14439567baa79ae1.gif)






Comments