From owner-freebsd-net@FreeBSD.ORG Sun Apr 20 02:50:15 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6EC51065670 for ; Sun, 20 Apr 2008 02:50:15 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail05.syd.optusnet.com.au (mail05.syd.optusnet.com.au [211.29.132.186]) by mx1.freebsd.org (Postfix) with ESMTP id 7CBFE8FC1B for ; Sun, 20 Apr 2008 02:50:15 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from server.vk2pj.dyndns.org (c220-239-20-82.belrs4.nsw.optusnet.com.au [220.239.20.82]) by mail05.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m3K2oCpw014619 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 20 Apr 2008 12:50:13 +1000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.2/8.14.1) with ESMTP id m3K2oB8G013679; Sun, 20 Apr 2008 12:50:11 +1000 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.2/8.14.2/Submit) id m3K2oBNT013678; Sun, 20 Apr 2008 12:50:11 +1000 (EST) (envelope-from peter) Date: Sun, 20 Apr 2008 12:50:11 +1000 From: Peter Jeremy To: Mark Hills Message-ID: <20080420025010.GJ73016@server.vk2pj.dyndns.org> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KM+e2hnYAO+MCJ5e" Content-Disposition: inline In-Reply-To: X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.17 (2007-11-01) Cc: freebsd-net@freebsd.org Subject: Re: read() returns ETIMEDOUT on steady TCP connection X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Apr 2008 02:50:16 -0000 --KM+e2hnYAO+MCJ5e Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Apr 19, 2008 at 03:27:28PM +0100, Mark Hills wrote: >I'm are having a trouble with TCP connections being dropped with "read:=20 >Operation timed out". What is unusual is that this is happening right in= =20 >the middle of sending a steady stream of data with no network congestion. Can you give some more detail about your hardware (speed, CPU, available RAM, UP or SMP) and the application (roughly what does the core of the code look like and is it single-threaded/multi-threaded and/or multi-process). >systat doesn't show problems inbound; all packets received are delivered t= o=20 >the upper layer. But on outbound, there is consistent 'output drops': > > IP Output >7028 total packets sent >7028 - generated locally > 314 - output drops > >As the number of outbound connections increases, the 'output drops'=20 >increases to around 10% of the total packets sent and maintains that ratio= =2E=20 >There's no problems with network capacity. 'output drops' (ips_odropped) means that the kernel is unable to buffer the write (no mbufs or send queue full). Userland should see ENOBUFS unless the error was triggered by a fragmentation request. I can't explain the problem but it definitely looks like a resource starvation issue within the kernel. --=20 Peter Jeremy Please excuse any delays as the result of my ISP's inability to implement an MTA that is either RFC2821-compliant or matches their claimed behaviour. --KM+e2hnYAO+MCJ5e Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.8 (FreeBSD) iEYEARECAAYFAkgKr2IACgkQ/opHv/APuIdX3QCfZSeBTQCmnIgxUFN/tKD+7foS 2cMAoIb02k7r5FD4J6ELBWg7gnURQma3 =jQEl -----END PGP SIGNATURE----- --KM+e2hnYAO+MCJ5e--