Subject: Re: Thread benchmarks, round 2
To: Christos Zoulas <christos@astron.com>
From: Andrew Doran <ad@netbsd.org>
List: tech-kern
Date: 10/05/2007 19:05:21
On Fri, Oct 05, 2007 at 05:53:45PM +0000, Christos Zoulas wrote:
> In article <20071005172402.GA2716@panix.com>,
> Thor Lancelot Simon  <tls@rek.tjls.com> wrote:
> >On Fri, Oct 05, 2007 at 11:18:24AM +0200, Kris Kennaway wrote:
> >> 
> >> Here is the initial run with CVS HEAD sources (I took out the obvious 
> >> things from GENERIC.MP like I386_CPU support, etc, and removed the 
> >> default datasize and stack size limits).  Same benchmark config that 
> >> Andrew is using, etc.
> >> 
> >>   http://people.freebsd.org/~kris/scaling/netbsd.png
> >
> >Is this system running an amd64 kernel, or an i386 kernel?  One thing I
> >noticed when comparing NetBSD and FreeBSD performance for a very diferent
> >workload recently was that NetBSD/amd64 is missing even the most recent
> >optimized i386 versions of some fairly basic stuff like memset, memcpy,
> >copyin/copyout, much less versions tuned for modern processors (e.g. for
> >set and copy SSE2 instructions can be used if you know they're present, as
> >we do know on amd64).  I suspect FreeBSD/amd64 is better about this.
> 
> NetBSD's amd64 performance sucks right now. My DELL WS 470, runs a *lot*
> slower with NetBSD/amd64 than running NetBSD/i386...

From what I have seen a lot of this is to do with the pmap. It's missing a
lot of optimizations that have been made to i386, particularly deferred
address space switching. Threaded programs in particular are much slower on
amd64 for that reason. Once the two pmaps are finally merged then things
should be a lot better.

Andrew