Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Mar 2007 12:47:37 +0000 (GMT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        David Gilbert <dgilbert@dclg.ca>
Cc:        Dinesh Nair <dinesh@alphaque.com>, freebsd-performance@freebsd.org
Subject:   Re: UDP performance.
Message-ID:  <20070306124411.H51876@fledge.watson.org>
In-Reply-To: <17900.25505.245946.235433@canoe.dclg.ca>
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> <errjlr$a8p$1@sea.gmane.org> <5a0a9d6f0702260936u3408f8d8rd4cde9234b2f7776@mail.gmail.com> <erv88p$rag$1@sea.gmane.org> <45E54619.7000503@isc.org> <20070228214200.60cc9b7a@prophet.alphaque.com> <17900.25505.245946.235433@canoe.dclg.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 5 Mar 2007, David Gilbert wrote:

>>>>>> "Dinesh" == Dinesh Nair <dinesh@alphaque.com> writes:
>
> Dinesh> On Wed, 28 Feb 2007 01:06:33 -0800, Peter Losher
> Dinesh> <Peter_Losher@isc.org> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070306124411.H51876>