From owner-freebsd-performance@FreeBSD.ORG Tue Mar 6 12:47:39 2007 Return-Path: X-Original-To: freebsd-performance@freebsd.org Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 30BEB16A407 for ; Tue, 6 Mar 2007 12:47:39 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id F3E1613C442 for ; Tue, 6 Mar 2007 12:47:38 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 6C50C47025; Tue, 6 Mar 2007 07:47:38 -0500 (EST) Date: Tue, 6 Mar 2007 12:47:37 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: David Gilbert In-Reply-To: <17900.25505.245946.235433@canoe.dclg.ca> Message-ID: <20070306124411.H51876@fledge.watson.org> References: <20070224215508.GA41968@xor.obsecurity.org> <45E13410.7020505@he.iki.fi> <20070225071946.GA48242@xor.obsecurity.org> <45E14BAD.80909@he.iki.fi> <20070225084737.GA49231@xor.obsecurity.org> <5a0a9d6f0702260936u3408f8d8rd4cde9234b2f7776@mail.gmail.com> <45E54619.7000503@isc.org> <20070228214200.60cc9b7a@prophet.alphaque.com> <17900.25505.245946.235433@canoe.dclg.ca> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Dinesh Nair , freebsd-performance@freebsd.org Subject: Re: UDP performance. X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2007 12:47:39 -0000 On Mon, 5 Mar 2007, David Gilbert wrote: >>>>>> "Dinesh" == Dinesh Nair writes: > > Dinesh> On Wed, 28 Feb 2007 01:06:33 -0800, Peter Losher > Dinesh> wrote: > >>> Ivan Voras wrote: >>> >>>> I agree in general, but MySQL performance is very exposed as an advocacy >>>> issue - it has traditionally been the source of statements like >>>> "FreeBSD's threading implementation is weak/bad/broken". >>> >>> And these days ISC can't consciously recommend FreeBSD for use on >>> high-traffic DNS servers because UDP performance has (frankly) gone >>> downhill since 5.x. [..snipped..] >>> http://lists.freebsd.org/pipermail/freebsd-net/2006-September/011748.html > > Dinesh> if UDP performance in 6.x and 7.x has dropped, this could even > Dinesh> affect voip applications/servers such as asterisk when run on > Dinesh> FreeBSD. most all use RTP for media traffic and RTP is nearly > Dinesh> always UDP generating up to 50 packets per second per call per > Dinesh> direction. > > Dinesh> 14,000+ packets per second is only about 140 calls. > > Well... again, BIND is not a good indicator of UDP performance. A > non-trivial application can send and receive about 250k pps on moderate > hardware. One of the problems ISC diagnosed had to do with the highly unusual workload pattern of UDP: many different threads simultaneously sending using a single socket leading to unnecessary socket buffer contention. The previously posted patches may help with this problem. So far I've not had any feedback on the RELENG_6 patches, which I'm happy to commit once I've had reports of both good stability and a performance improvement. This patch won't help more traditional UDP workloads, in which aplications use different sockets to serve different instances of the service, so access each socket from only one thread. Portions of the patch would also support future MFC's of other socket-related performance optimizations and cleanups going on in FreeBSD 7.x, such as Andre's recent work on optimized TCP send. Robert N M Watson Computer Laboratory University of Cambridge