Subject: Re: write() in nonblocking mode can be slow.
To: Martin Husemann <martin@duskware.de>
From: Thor Lancelot Simon <tls@rek.tjls.com>
List: tech-net
Date: 03/11/2005 10:57:47
On Fri, Mar 11, 2005 at 08:13:03AM +0100, Martin Husemann wrote:
> On Fri, Mar 11, 2005 at 11:57:50AM +0900, Jorgen Lundman wrote:
> > I have a socket (TCP) connected where their end is very slow. (~3k/s).
>
> Have you checked with tcpdump that ACKs are coming in fast enough? You may
> have a full tcp window outstanding, so new data can only be sent once
> more data is acknowledge by the peer.
Yes, but he is seeing nonblocking writes block in the kernel for multiple
seconds before returning. That should never happen.
--
Thor Lancelot Simon tls@rek.tjls.com
"The inconsistency is startling, though admittedly, if consistency is to be
abandoned or transcended, there is no problem." - Noam Chomsky