Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Nov 2000 04:21:29 -0600 (CST)
From:      Mike Meyer <mwm@mired.org>
To:        Zero Sum <count@shalimar.net.au>
Cc:        Jeff Wyman <wysoft@wysoft.tzo.com>, questions@FreeBSD.ORG
Subject:   Re: SMP: FreeBSD vs. Linux
Message-ID:  <14871.43433.441818.597556@guru.mired.org>
In-Reply-To: <00111916420801.13422@shalimar.net.au>
References:  <14870.23240.379989.419970@guru.mired.org> <00111916420801.13422@shalimar.net.au>

next in thread | previous in thread | raw e-mail | index | archive | help
Zero Sum <count@shalimar.net.au> types:
> > All the reports indicate that Linux SMP is better than -stable. SMP in
> > -stable uses one lock for almost everything, which serializes things
> > that don't need to be serialized.
> I was unaware of the above, but I have been running an SMP kernel for over
> a year now, tracking 3 STABLE.  I have now gone 4 STABLE.  I have always
> been satisfied with the SMP performance, I can't see where I'm losing
> anything.
> 
> I run two copies of seti and they sit there at 99.02% cpu utilization,
> each.  Where am I *losing* performance?

The inefficiency in -stable is that it serializes things in the kernel
which don't necessarily need to be serialized. But this happens *in
the kernel*. So long as your program stays in userland, you won't see
a difference.

Seti@home is very cpu-bound, so it pretty much stays in userland. As
such, differences in MP threading implementation will be nearly
invisible to it.

> I'm not trying to argue with you, I just can't find a referent for what you
> are saying/  The performance difference would have to be minor by my
> observation.  Unless I am totally misunderstanding something.

I haven't done any measurements on this case myself (which is why I
refer to the reports of others). However, having a single lock is
similar - but not as bad as - an asymmetric system which has one CPU
handle all kernel calls, and the other nothing but userland. In the
-stable case, the system serializes going through a lock that covers
lots of things. In the second case, the system serializes going
through the kernel (any interrupts, system calls, etc).

I have done measurements on that latter case. I had a two-CPU AMP
system (VAX 8650 cpus) to play with, and ran some simulated multi-user
benchmarks.  Turning the second CPU *off* provided something like a
10% performance improvement on those benchmarks. I've seen reports of
similar things on -stable with postgres.

In real life, people ran multi-hour number crunchers on that AMP
system, and their process landed on the second CPU (the one not doing
syscalls) and pretty much owned it. The end result was that they got
results faster in real time than they did off the Cray XMP-14 in the
next room, which had a much faster CPU - but only one of them. This is
analogous to the behavior you are seeing with seti@home.

	<mike


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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