Subject: Re: write() in nonblocking mode can be slow.
To: NetBSD-network <tech-net@netbsd.org>
From: Matt Thomas <matt@3am-software.com>
List: netbsd-users
Date: 03/11/2005 08:54:22
On Mar 11, 2005, at 7:57 AM, Thor Lancelot Simon wrote:
> 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.
The socket page loaning has some very ugly sleeps, even in the
non-blocking cases.
--
Matt Thomas email: matt@3am-software.com
3am Software Foundry www: http://3am-software.com/bio/matt/
Cupertino, CA disclaimer: I avow all knowledge of this
message.