If your HTTP server is only sending every 200ms,
it is probably because your client browser is waiting
for at least 4380 bytes before ACKnowledging
(this value is based on your 1500 bytes MSS).
Since your send buffer is only 3000 bytes long,
you will never send those 4380 byte at once,
hence always waiting for the delayed ACK,
coming only after 200ms.
Like I said in a previous post:
Rejean Groleau wrote:
I had the same problem on my platform (a Luminary Stellaris
microcontroller with 64KB of RAM).
To speed things up (from a typical 200ms to a less-than-10ms delay), I
had
to do the following:
1. Use a TCP_SND_BUF value four times greater than the TCP_MSS (according
to RFC 3390).
2. Always fill completely the TCP_SND_BUF (unless no more data is to be
sent).
3. Set a callback through tcp_poll() to attempt resending data (after an
arbitrary amount of time).
4. In my case (an HTTP server), use the HTTP 1.1 specification (to reuse
connections).
I did this according to RFC 3390 (available at
http://tools.ietf.org/html/rfc3390), which states:
If (MSS <= 1095 bytes)
then win <= 4 * MSS;
If (1095 bytes < MSS < 2190 bytes)
then win <= 4380;
If (2190 bytes <= MSS)
then win <= 2 * MSS;
I interpreted (read between the lines) that when this "upper-bound" limit
is reached, an ACK is sent back.
Note that although my MSS is 1472 bytes, I still had to go under the
first
condition
(4 * MSS instead or 4380 bytes). It seems the web browsers (or windows
XP)
do not exactly follow this scheme.
--
View this message in context:
http://www.nabble.com/httpd-slow-response-tp23204551p23220815.html
Sent from the lwip-users mailing list archive at Nabble.com.
_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users