lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] With logs ... Re: Delayed Ack causing problems? Where t


From: Simon Goldschmidt
Subject: Re: [lwip-users] With logs ... Re: Delayed Ack causing problems? Where to call tcp_nagle_disable()?
Date: Tue, 13 Sep 2011 15:38:46 +0200

Richard Barry <address@hidden> wrote:
> I had to change lwipopts.h slightly to reduce the RAM footprint

In fact, the lwipopts.h settings are the most interesting here. Would you mind 
sending your file (as attachment)?

There are some things I don't (yet) understand in the traces (e.g. why does the 
client announce an MSS of 1260 only? I would have expected 1460 here...)

The problem could be that you seem to be limited to 2048 byts of snd_buf and 
with nagle enabled, lwIP-tcp waits to fill a 2nd segment (of 1260 bytes), which 
it can't and thus doesn't send (maybe we should enhance the nagle-check here?).

For decent TCP performance, you should ensure that:
- TCP_WND is at least 4 * TCP_MSS (or the remote mss here)
- SND_BUF is as big as the window (4 * mss might also be enough)
- SND_QUEUELEN should not limit the transfer either (i.e. when passing the 
copy-flag to tcp_write, it should be at least 4 and you should call tcp_write 
with the biggest possible chunk size)

Not obeing the rules above will make the connection slow (i.e. you will prevent 
the sliding window algorithm to work smoothly and instead turn your TCP 
connections into a ping-pong style of DATA-ACK-DATA-ACK etc.).

I'll try to reproduce (and maybe fix) this with your lwipopts.h.

Simon
-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de



reply via email to

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