This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: TCP/IP write() buffering question
- To: grante at visi dot com (Grant Edwards)
- Subject: Re: [ECOS] TCP/IP write() buffering question
- From: andrew dot lunn at ascom dot ch (Andrew Lunn)
- Date: Thu, 21 Sep 2000 15:42:14 +0200 (MET DST)
- Cc: andrew dot lunn at ascom dot ch, ecos-discuss at sources dot redhat dot com
> It looks like the delays between successive write() calls (a
> few tens of milliseconds) is long enough that the stack is
> shoving data out in small chunks. I need to spend some more
> time trying to profile the server and figuring out where the
> delays are coming from.
Whats on the other end? Linux? NT? IE, Netscape, Lynx?
If you are not using TCP_NODELAY, the Nagle algorithm should be
enabled. If TCP trys to send a packet which is smaller than the MSS,
normal about 1Kbytes, it will delay the packet and try to clump it
together. It will send the small packet when it gets an ACK from the
other end. Now the other end should be doing delayed ACKs. It should
not send the ACK for between 50-200ms. So if your server is taking
tens of milliseconds it should be able to generate a number of writes
before the ACK comes back. This is strange.
Andrew