lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] pbuf pool size / mss size in low memory environment and rou


From: fepgmbh
Subject: [lwip-users] pbuf pool size / mss size in low memory environment and routing to slow link
Date: Thu, 19 Nov 2009 13:15:35 -0800 (PST)

Good evening all,

i'm on the way to get the best memory adjustments for my LWIP, reading
around this evening but with still some questions left.

I use the LWIP with FreeRTOS on an Atmel AT91SAM7X512, so my RAM with 128k
is relatively limited in my environment. In addition to this, i have to
route packets from a fast connection (Ethernet) to a slow connection (radio
link with PPP at 3.6 kbit/s).

In my first setup i had a windows size of 2500 bytes with a MSS of 1200
bytes, 6 pool-pbufs with a size of 1500 bytes each. With a few 1500 bytes
pbuf, one whole buffer is blocked by a small 100byte packet.

First of all, 6 pbufs seems not to be very much, and as i understood they
can be chained together, i changed this to 36 pbufs with 256 bytes each -
noticing that now the TCP connections won't work with the 1200 byte MSS.

The second thing was, that the PPP link over the radio can loose packets, so
a damages packet will be around 1200 bytes, and when it is damaged it must
be resent.

As the pbuf size may not be lower than the MSS size (???), i changed the MSS
also to 256 bytes, especially for making the retransmits over the radio link
not too big.

But there are still some questions left for me ...

- Why can't the pool pbuf size less then the MSS, if the documentation says
the pbuf can be chained together?

- What will be the ideal pbuf size according to MSS size. Shall it be the
same, or must the pbuf be the MSS+40 bytes (to hold the segment and the
header)?

- Will i be still able to send / receive a (i.e.) 1000 bytes UDP datagram
with my 256bytes pbufs?

When my webserver i.e. sends a 4kbyte-page over the radio link, where will
all the TCP segments be stored until they have been acknowledged? As these
are dynamically generated data (sent with "COPY" option), this should be
happen in the pool pbufs, right?

And at least, will be a memory size (heap size) for LWIP of 8192 bytes be OK
in that case? I really have not to waste memory and get the best compromise
for memory usage and performance.

Sorry for all these questions, but after some hours of reading i still got
no really satisfying answer to them ... maybe one of you experts can give me
the one or other hint :-)

Thank you for your time, and a nice evening (for those who are also in the
european timezone ;)

Marco
-- 
View this message in context: 
http://old.nabble.com/pbuf-pool-size---mss-size-in-low-memory-environment-and-routing-to-slow-link-tp26421483p26421483.html
Sent from the lwip-users mailing list archive at Nabble.com.





reply via email to

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