lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Out of memory errors under load


From: JM
Subject: [lwip-users] Out of memory errors under load
Date: Mon, 26 Mar 2018 00:10:17 +0000 (UTC)

I'm using lwIP 1.4.1, NO_SYS=1, no operating system, and httpserver_raw. An incoming packet is immediately sent to lwIP with ethernet_input() in the interrupt. After initializing lwIP I go into an empty while(1);

The only way into lwIP is through the ethernet Rx interrupt or timer interrupt. The timer interrupt sets the ethernet Rx interrupt flag, so there's truly only one entry point into lwIP. 

I can flood it with thousands of pings with a 1400 byte payload, and reload the webpage it serves many times with no problem. However when I load test it (with a program called engulf) it generates out of memory errors after a few dozen requests. Specifically I first get:

memp_malloc: out of memory in pool TCP_PCB

Then shortly after:

memp_malloc: out of memory in pool PBUF_POOL

If I increase PBUF_POOL_SIZE, it runs longer before failing.

I can't wrap my head around why it works fine with the ping flood and manual web page loads, but runs out of memory and never recovers when hit it with rapid GET requests. If I had a memory leak in the driver, it seems this would act up regardless. Anyone have any ideas?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]