From owner-freebsd-threads@FreeBSD.ORG Wed Aug 27 16:20:37 2003 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 3AC9E16A4BF; Wed, 27 Aug 2003 16:20:37 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 98CFE43FDF; Wed, 27 Aug 2003 16:20:36 -0700 (PDT) (envelope-from davidxu@FreeBSD.org) Received: from localhost (davidxu@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h7RNKXUp034104; Wed, 27 Aug 2003 16:20:34 -0700 (PDT) (envelope-from davidxu@FreeBSD.org) From: David Xu To: deischen@FreeBSD.org, Daniel Eischen , threads@FreeBSD.org Date: Thu, 28 Aug 2003 07:23:35 +0800 User-Agent: KMail/1.5.2 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200308280723.35697.davidxu@FreeBSD.org> cc: Scott Long Subject: Re: Call for thread testers X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: davidxu@FreeBSD.org List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Aug 2003 23:20:37 -0000 On Thursday 28 August 2003 06:07, Daniel Eischen wrote: > [ redirected to @threads ] > > David and I have a couple of other tests which we use to > > measure performance of our threads libraries. > > One of these tests is crew, which is part of Dave Butenhof's > threads tests (http://people.freebsd.org/~davidxu/crew/programs.tar.z) > > Usage: crew > > crew searches recursively for the given string in the directory. > David and I use it as follows: > > $ crew node /usr/src/sys > > By default, it creates 4 worker threads to seach for the string. > Here are the results for all thread libraries; they are somewhat > surprising. The test was run a couple of times to fill up cache > and those timing results were omitted. > > Run 1 Run 2 Run 3 > ------------------------------------------------------ > libc_r real 0m48.451s 0m48.835s 0m50.905s > user 0m2.694s 0m2.745s 0m2.818s > sys 0m8.996s 0m8.931s 0m8.863s > ------------------------------------------------------ > libthr real 1m2.553s 1m52.579s 1m50.306s > user 0m3.423s 0m4.561s 0m4.397s > sys 0m11.842s 0m27.099s 0m27.300s > ------------------------------------------------------ > libkse(M:N) real 0m49.175s 0m49.910s 0m51.033s > user 0m2.840s 0m2.836s 0m2.880s > sys 0m8.857s 0m8.857s 0m8.792s > ------------------------------------------------------ > libkse(1:1) real 0m20.240s 0m19.969s 0m19.981s > user 0m2.741s 0m2.783s 0m2.858s > sys 0m8.877s 0m8.832s 0m8.768s > ------------------------------------------------------ > > All the above tests were run on a single CPU 850MHz PIII > with 256MB RAM (Dell Lattitude C400). > > There seems to be something wrong with libthr; the times > vary too much (by almost 100%). libkse in M:N mode seems > to be on par with libc_r. But the real surprise is libkse > built in 1:1 mode (add -DSYSTEM_SCOPE_ONLY to CFLAGS when > building libpthread). Er, strange result, libkse M:N and libkse 1:1 should be identical in this test, I had always run this test, and their performance are always close enough, but 1:1 was always a bit slow than M:N, all tests are done under 4BSD scheduler, under ULE scheduler, SA process has performance problem, M:N is slower under ULE than 1:1. David Xu