This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: TCP/IP write() buffering question


> 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]