lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] AVR32 Software Framework EVK1100 and LwIP operates too


From: Kieran Mansley
Subject: Re: [lwip-users] AVR32 Software Framework EVK1100 and LwIP operates too slow
Date: Mon, 04 Oct 2010 11:44:47 +0100

On Mon, 2010-10-04 at 12:31 +0200, Delta Control - Bernd Uttich wrote:
> Dear LwIP users,
> 
>  
> 
> I currently work on a project were LwIP is ported to AVR32 control
> panel. I recognized that any time a packet is transmitted from
> 
> web server to host PC, it takes ~200ms until an ack is sent back from
> windows site.

That's the TCP delayed ACK algorithm.  I suspect what you're seeing is
this interacting badly with the Nagle algorithm that delays sending data
until there is a full segment to send.  TF_NODELAY disables Nagle's
algorithm, and so should avoid this problem.  It won't affect the
delayed ACK behaviour of either end.

Reducing the MSS has two affects here: it will increase the number of
packets, and so the number of ACKs, meaning the delayed ACK algorithm
will be delaying ACKs less often; and it will mean that Nagle algorithm
will wait for less data before sending a full-sized segment as the
full-sized segment is now smaller.  I agree though that reducing MSS is
not really a good solution.

I think there have been some improvements to lwIP's implementation of
the Nagle algorithm since 1.3.0, so I would suggest upgrading to a more
recent version.  If you have obtained your lwIP port from some third
party you may need to ask them to port a later version of lwIP for you.

To confirm the problem a packet capture of the behaviour when you have
set TF_NODELAY would be helpful.  

If would also be useful to see how you've configured lwIP's TCP window
size from lwipopts.h.  It could just be that this has been set too small
and so the delayed ACK is preventing you sending anything more.

Kieran




reply via email to

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