From owner-freebsd-net@FreeBSD.ORG Mon Aug 3 14:04:39 2009 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 3426A106566B for ; Mon, 3 Aug 2009 14:04:39 +0000 (UTC) (envelope-from vova@sw.ru) Received: from relay.sw.ru (mailhub.sw.ru [195.214.232.25]) by mx1.freebsd.org (Postfix) with ESMTP id A86D78FC13 for ; Mon, 3 Aug 2009 14:04:37 +0000 (UTC) (envelope-from vova@sw.ru) Received: from vbook.fbsd.ru ([10.30.1.111]) (authenticated bits=0) by relay.sw.ru (8.13.4/8.13.4) with ESMTP id n73E4Xkn022074 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 3 Aug 2009 18:04:35 +0400 (MSD) Received: from vova by vbook.fbsd.ru with local (Exim 4.69 (FreeBSD)) (envelope-from ) id 1MXy9R-0000jN-S0; Mon, 03 Aug 2009 18:04:33 +0400 From: Vladimir Grebenschikov To: clement@FreeBSD.org Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: Parallels Date: Mon, 03 Aug 2009 18:04:33 +0400 Message-Id: <1249308273.1712.23.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 FreeBSD GNOME Team Port Sender: Vladimir Grebenschikov Cc: freebsd-net Subject: net/haproxy - some ideas X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: vova@parallels.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 14:04:39 -0000 Hi Recently I've looked into net/haproxy port on FreeBSD. Contrary to recent Linux there is no splice() functionality, so all data move between sockets is done through user-space. First idea - to use ksocket netgraph node to accept connections, and send data to both directions, theoretically it may give even better performance then using splice() syscall per every block of data. On first stage (while haproxy read/rewrite http headers) both ksocket nodes to be ended in user-space, initial negotiation finished - these nodes just connected to each other in kernel and no user-space interaction required for further data send through that pair. Second, probably you have tried ongoing splice work Suleiman Souhlal ? (not sure about current status) http://p4db.freebsd.org/branchView.cgi?BRANCH=ssouhlal_splice -- Vladimir B. Grebenschikov Project Manager, Automation Parallels Inc. vgrebenschikov@parallels.com