From owner-freebsd-questions Sun Nov 19 2:21:35 2000 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-65-26-235-186.mmcable.com [65.26.235.186]) by hub.freebsd.org (Postfix) with SMTP id BDC2C37B479 for ; Sun, 19 Nov 2000 02:21:30 -0800 (PST) Received: (qmail 56448 invoked by uid 100); 19 Nov 2000 10:21:29 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14871.43433.441818.597556@guru.mired.org> Date: Sun, 19 Nov 2000 04:21:29 -0600 (CST) To: Zero Sum Cc: Jeff Wyman , questions@FreeBSD.ORG Subject: Re: SMP: FreeBSD vs. Linux In-Reply-To: <00111916420801.13422@shalimar.net.au> References: <14870.23240.379989.419970@guru.mired.org> <00111916420801.13422@shalimar.net.au> X-Mailer: VM 6.75 under 21.1 (patch 10) "Capitol Reef" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Zero Sum 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.