From owner-freebsd-current@FreeBSD.ORG Tue Sep 14 16:08:37 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1140E1065673; Tue, 14 Sep 2010 16:08:37 +0000 (UTC) (envelope-from fabien.thomas@netasq.com) Received: from work.netasq.com (mars.netasq.com [91.212.116.3]) by mx1.freebsd.org (Postfix) with ESMTP id 474688FC22; Tue, 14 Sep 2010 16:08:35 +0000 (UTC) Received: from [10.20.1.1] (unknown [10.2.27.254]) by work.netasq.com (Postfix) with ESMTPSA id 32EFF740002; Tue, 14 Sep 2010 18:08:06 +0200 (CEST) Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset=us-ascii From: Fabien Thomas In-Reply-To: <4C8F978F.1030707@networx.ch> Date: Tue, 14 Sep 2010 18:08:34 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <89E74A8F-4FF9-482B-83D0-3D076F0E41E4@netasq.com> References: <4C8E0C1E.2020707@networx.ch> <4C8F978F.1030707@networx.ch> To: Andre Oppermann X-Mailer: Apple Mail (2.1081) Cc: freebsd-net@freebsd.org, freebsd-current@freebsd.org Subject: Re: TCP loopback socket fusing X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 16:08:37 -0000 On 14 sept. 2010, at 17:41, Andre Oppermann wrote: > On 14.09.2010 11:18, Fabien Thomas wrote: >> Great, >>=20 >> This will maybe kill the long time debate about "my loopback is slow = vs linux" >> To have the best of both world what about a socket option to = enable/disable fusing: >> can be useful when you need to see some connection "packetized". >=20 > A sysctl to that effect is already in the patch. yes, i'm just wondering on a per connection setting. >=20 > --=20 > Andre >=20 >> Fabien >>=20 >> On 13 sept. 2010, at 13:33, Andre Oppermann wrote: >>=20 >>> When a TCP connection via loopback back to localhost is made the = whole >>> send, segmentation and receive path (with larger packets though) is = still >>> executed. This has some considerable overhead. >>>=20 >>> To short-circuit the send and receive sockets on localhost TCP = connections >>> I've made a proof-of-concept patch that directly places the data in = the >>> other side's socket buffer without doing any packetization and other = protocol >>> overhead (like UNIX domain sockets). The connections setup (SYN, = SYN-ACK, >>> ACK) and shutdown are still handled by normal TCP segments via = loopback so >>> that firewalling stills works. The actual payload data during the = session >>> won't be seen and the sequence numbers don't move other than for SYN = and FIN. >>> The sequence are remain valid though. Obviously tcpdump won't see = any data >>> transfers either if the connection has fused sockets. >>>=20 >>> Preliminary testing (with WITNESS and INVARIANTS enabled) has shown = stable >>> operation and a rough doubling of the throughput on loopback = connections. >>> I've tested most socket teardown cases and it behaves fine. I'm not = entirely >>> sure I've got all possible path's but the way it is integrated = should properly >>> defuse the sockets in all situations. >>>=20 >>> Testers and feedback wanted: >>>=20 >>> http://people.freebsd.org/~andre/tcp_loopfuse-20100913.diff >>>=20 >>> -- >>> Andre >>>=20 >>> _______________________________________________ >>> freebsd-net@freebsd.org mailing list >>> http://lists.freebsd.org/mailman/listinfo/freebsd-net >>> To unsubscribe, send any mail to = "freebsd-net-unsubscribe@freebsd.org" >>=20 >>=20 >>=20 >=20