Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Nov 2003 12:44:38 -0500
From:      "Kevin A. Pieckiel" <pieckiel@sdf.lonestar.org>
To:        Jesse Guardiani <jesse@wingnet.net>
Cc:        freebsd-smp@freebsd.org
Subject:   Re: SMPng question
Message-ID:  <20031105174438.GA8014@SDF.LONESTAR.ORG>
In-Reply-To: <boba8u$7f2$1@sea.gmane.org>
References:  <boba8u$7f2$1@sea.gmane.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Nov 05, 2003 at 11:59:02AM -0500, Jesse Guardiani wrote:
> 1.) What, exactly, are SMPng's advantages over the current
>     SMP implementation as related to userland apps?
> 
>     In other words, I know that the network stack and devices
>     and such will benefit by being able to make use of
>     multiple CPUs, but will normal non-multi-threaded apps
>     be able to use multiple CPUs? Or will an app still have
>     to be multi-threaded in order to take full advantage
>     of an SMP box?

I'm sure others can comment more thoroughly on this than I can,
but basically non-threaded processes won't concurrently use
multiple CPUs.  Afterall, they aren't threaded.  But multiple
non-threaded processes can run concurrently.  One of the larger
differences in this type of scenario will be when system calls
are made by userland apps.  With Giant, there is more contention
for kernel resources, but with SMPng, this has been greatly
relieved.  This is where you can see some performance gains.


> 2.) And, perhaps as an extension to question #1: Will I
>     be able to make use of multiple CPUs to compile programs?

Yes, but only if you have multiple sources to compile.  You're
Hello World program won't compile any faster, but I'd imagine
anything susceptible to concurrent compiling (using -j with
make, for example) would see a benefit.  However, this scenario
is just a specific example of #1 above--multiple non-threaded
programs (gcc in this case) running concurrently.


>     Could I buy one of those cheap $300 quad Xeon 500mhz
>     compaq boxes on ebay and use it as a 2 Ghz compiler box?

No, not really; you're going to lose some performance in just
keeping up with multiple processors.  In other words, it's not
a linear increase in performance when you add processors.
However, if you have up to four things to actively do at the
same time, then a quad Xeon computer will probably benefit you.
Running a web and/or mail server, for example, where you have
concurrent processes handling concurrent connections, is a
good example.  Running your favorite word processor while
crunching WAV's to MP3's, probably.  You'll notice less of
a response-time lag over a single processor computer at the
very least.  Checking your E-Mail while browsing the Internet,
you'll probably not notice anything different, and a single
processor 2.0 GHz computer will probably be faster.

Kevin



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