lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] TCP tuning


From: Ed Sutter
Subject: Re: [lwip-users] TCP tuning
Date: Tue, 28 Jan 2003 10:20:35 -0500

David,
Thanks for the info.  I implemented the same type of buffering
for my telnet server, and it improved things dramatically.
Having said that, my http server may be suffering from the same
inefficiency.  It sends each line of the html file as a
packet; probably applying the same type of buffering scheme on
it will improve things quite a bit.
Thanks for the tip!  I'll let you know how that works out.

One more general question to all listening....
If the application is not that memory space sensitive, is there
any reason why I should not increase TCP_MSS adn TCP_SND_BUF
a bit?

Ed


David Haas wrote:
> 
> This is my setup, which I think was basically the default.
> 
> #define TCP_MSS                 128
> #define TCP_SND_BUF             256
> #define TCP_SND_QUEUELEN        4 * TCP_SND_BUF/TCP_MSS
> #define TCP_WND                 1024
> 
> I measured approximately 33mb/sec using a 66Mhz MCF5272. I have
> sucessfully run with 3 simultaneous TCP sessions: 2 chargens from a
> linux client to my target and one telnet session from the linux client
> to my target. I am using PBUF_POOL buffers almost everywhere.
> 
> I did a bit of optimization which I think is important though: In my
> pseudo-terminal layer for telnet I added output buffering. I was
> noticing that my application sent out a lot of single characters (puts()
> was implemented as multiple putc() calls). This was generating lots of
> extra packets. I found that the output buffering improved this a lot. I
> use a buffer the same size as the TCP_SND_BUF and flush it when it is
> full or whenever getc() is called.
> 
> Another thing is that you should make sure you have enough input buffer.
> You need to be able to accept enough data at wire speed to fill a tcp
> window for each open tcp connection. That's actually a good reason to
> keep the TCP_WND to a low value.
> 
> If you want to figure out what is slow things down, just monitor your
> ethernet with something like ethereal and look for retransmissions.
> 
> David.
> 
> Ed Sutter wrote:
> 
> >Hi,
> >In my current system I have (among other things)
> >a telnet server and an http server.  I'm finding that
> >if I tune (lwipopts.h) things to work well for HTTP,
> >then telnet is slow and choppy; however if I tune things
> >for telnet, then HTTP is very slow.
> >I'm certainly no TCP/IP wizard, but I'm guessing that it
> >has something to do with TCP_WND, TCP_MSS and TCP_SND_BUF.
> >Does anyone have any suggestions regarding how to tune
> >the stack properly?  I'm more concerned about improving
> >user-response than I am RAM usage.
> >
> >Any thoughts?
> >Ed
> >
> >_______________________________________________
> >lwip-users mailing list
> >address@hidden
> >http://mail.nongnu.org/mailman/listinfo/lwip-users
> >
> >

Attachment: els.vcf
Description: Card for Ed Sutter


reply via email to

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