From owner-freebsd-threads@FreeBSD.ORG Thu Oct 7 22:26:21 2004 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B3D7016A4CE for ; Thu, 7 Oct 2004 22:26:21 +0000 (GMT) Received: from av1-1-sn1.fre.skanova.net (av1-1-sn1.fre.skanova.net [81.228.11.107]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6C43B43D1D for ; Thu, 7 Oct 2004 22:26:19 +0000 (GMT) (envelope-from pawel.worach@telia.com) Received: by av1-1-sn1.fre.skanova.net (Postfix, from userid 502) id C022938012; Fri, 8 Oct 2004 00:26:18 +0200 (CEST) Received: from smtp3-2-sn1.fre.skanova.net (smtp3-2-sn1.fre.skanova.net [81.228.11.164]) by av1-1-sn1.fre.skanova.net (Postfix) with ESMTP id B37CD37ED6 for ; Fri, 8 Oct 2004 00:26:18 +0200 (CEST) Received: from corona.sajd.net (h47n2fls31o265.telia.com [217.208.189.47]) by smtp3-2-sn1.fre.skanova.net (Postfix) with ESMTP id 9D29037E4A for ; Fri, 8 Oct 2004 00:26:18 +0200 (CEST) Received: from [127.0.0.1] (sajd@localhost [127.0.0.1]) by corona.sajd.net (8.13.1/8.13.1) with ESMTP id i97MQGse005885 for ; Fri, 8 Oct 2004 00:26:16 +0200 (CEST) (envelope-from pawel.worach@telia.com) Message-ID: <4165C285.9050909@telia.com> Date: Fri, 08 Oct 2004 00:26:13 +0200 From: Pawel Worach User-Agent: Mozilla Thunderbird 0.7.3 (X11/20040815) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-threads@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: BIND9 and libpthread performance X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Oct 2004 22:26:21 -0000 Hi, I did some simple benchmarking with libpthread vs. libc_r and BIND. The numbers puzzle me. Are pthreads supposed to this much slower? Tests done using BIND9 with a authoritative root zone. The queryperf tool from bind-9.3.0/contrib/queryperf was used to get the numbers. Queries where done for ". SOA". (queryperf -s 127.0.0.1 -l 30) This is on -CURRENT from Oct 6th, WITNESS, INVARIANTS off and libpthread built without _LOCK_DEBUG and _PTHREADS_INVARIANTS. Hardware is a dual IBM x345 2.8ghz Xeon box with HTT on. SCHED_4BSD, PREEMPTION and ADAPTIVE_GIANT are in the kernel config, malloc.conf symlinked to 'aj'. Results (queries per second according to queryperf): x libpthread-system-scope + libc_r +--------------------------------------------------------------------------+ |x +++ + +| |A |__M__A______| | +--------------------------------------------------------------------------+ N Min Max Median Avg Stddev x 5 2074.3131 2094.7966 2087.3796 2086.4217 7.579802 + 5 8179.1707 9535.1741 8448.1802 8763.1869 619.70126 Difference at 95.0% confidence 6676.77 +/- 639.13 320.01% +/- 30.6328% (Student's t, pooled s = 438.228) Any ideas why the difference is so big, is there anything else to tune? -- Pawel