lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] httpd slow response


From: address@hidden
Subject: Re: [lwip-users] httpd slow response
Date: Fri, 24 Apr 2009 17:58:27 +0200
User-agent: Thunderbird 2.0.0.21 (Macintosh/20090302)

Rick Culver wrote:

> At any rate it appears that httpd module can only serve up one chunk of the file about every 200msec.

200msec rings a bell: this is the delay windows waits before sending a (delayed) ACK: normally, it prevents sending an ACK for every packet to keep the total packet count low. It sends an ACK for every 2nd packet or after a timeout of 200ms (lwIP also does this, this is called delayed ACK).

This suggests there is something wrong with the way data is sent, i.e. the stack does not send two packets in a row without waiting for an ACK (the sent-callback is called when an ACK is received). You should try to call tcp_write() with a payload of more than 2 packets, but your lwipopts.h must also be configured to allow this, regarding available memory, mainly.

Bill Auerbach wrote:

Ok. Than as Simon pointed out – the tcp_output avoids Nagle. I followed the contrib/apps httpd example and without tcp_output calls I needed TF_NODELAY.

Which is right? I would hope that an lwIP contrib example would show the* correct* way to implement something.

tcp_output avoids Nagle?

Simon Goldschmidt wrote:

> tcp_output() actually is the place where the nagle algorithm is implemented!

It only avoids nagel if it is told so by the TF_NODELAY flag. And tcp_output is always needed! I'm confused.

Simon




reply via email to

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