Date: Thu, 7 Oct 2004 19:52:34 -0400 (EDT) From: Daniel Eischen <deischen@freebsd.org> To: Pawel Worach <pawel.worach@telia.com> Cc: freebsd-threads@freebsd.org Subject: Re: BIND9 and libpthread performance Message-ID: <Pine.GSO.4.43.0410071946320.3130-100000@sea.ntplx.net> In-Reply-To: <4165C285.9050909@telia.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 8 Oct 2004, Pawel Worach wrote: > 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'. So that's a true dual CPU system with HTT CPUs (the kernel sees 4 CPUs)? Turn HTT off, set kern.threads.virtual_cpu = 1, and try using process scope threads. Then set kern.threads.virtual_cpu = 2 and try again using process scope threads. Then try the same 2 tests with system scope threads. You can set LIBPTHREAD_SYSTEM_SCOPE in your environment to force system scope threads, and set LIBPTHREAD_PROCESS_SCOPE to force process scope threads (you needn't rebuild libpthread or your application). If they are both set, system scope wins out. -- Dan Eischen
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.43.0410071946320.3130-100000>