From owner-cvs-src-old@FreeBSD.ORG Sat Nov 6 10:32:12 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86BA310657D2 for ; Sat, 6 Nov 2010 10:32:12 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 597B18FC1E for ; Sat, 6 Nov 2010 10:32:12 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id oA6AWCVZ024218 for ; Sat, 6 Nov 2010 10:32:12 GMT (envelope-from lstewart@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id oA6AWCGb024217 for cvs-src-old@freebsd.org; Sat, 6 Nov 2010 10:32:12 GMT (envelope-from lstewart@repoman.freebsd.org) Message-Id: <201011061032.oA6AWCGb024217@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to lstewart@repoman.freebsd.org using -f From: Lawrence Stewart Date: Sat, 6 Nov 2010 10:31:52 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: RELENG_8 Subject: cvs commit: src/sys/netinet tcp_reass.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Nov 2010 10:32:12 -0000 lstewart 2010-11-06 10:31:52 UTC FreeBSD src repository Modified files: (Branch: RELENG_8) sys/netinet tcp_reass.c Log: SVN rev 214866 on 2010-11-06 10:31:52Z by lstewart MFC r213913: Retire the system-wide, per-reassembly queue segment limit. The mechanism is far too coarse grained to be useful and the default value significantly degrades TCP performance on moderate to high bandwidth-delay product paths with non-zero loss (e.g. 5+Mbps connections across the public Internet often suffer). Replace the outgoing mechanism with an individual per-queue limit based on the number of MSS segments that fit into the socket's receive buffer. This should strike a good balance between performance and the potential for resource exhaustion when FreeBSD is acting as a TCP receiver. With socket buffer autotuning (which is enabled by default), the reassembly queue tracks the socket buffer and benefits too. As the XXX comment suggests, my testing uncovered some unexpected behaviour which requires further investigation. By using so->so_rcv.sb_hiwat instead of sbspace(&so->so_rcv), we allow more segments to be held across both the socket receive buffer and reassembly queue than we probably should. The tradeoff is better performance in at least one common scenario, versus a devious sender's ability to consume more resources on a FreeBSD receiver. Sponsored by: FreeBSD Foundation Reviewed by: andre, gnn, rpaulo Revision Changes Path 1.364.2.6 +15 -11 src/sys/netinet/tcp_reass.c