Re: Help clear up a misconception about SMP systems

Jeff Noxon (jeff@planetfall.com)
Fri, 9 Oct 1998 15:56:22 -0500


On Fri, Oct 09, 1998 at 01:29:09PM -0400, Alex Buell wrote:
> When two or more processors come into play, what is the increase rate of
> processing over a single processor? Is does it works out as 100% increase
> over that of a single processor or is it limited by other factors such as
> caching, disk i/o or whatever?
>
> I'm guessing it's a 100% increase.

The answer, of course, is "it depends."

A 100% increase isn't possible. You may get close to that if you have
a small program that fits entirely in the cache of each CPU. A crypto
cracking program might fall into that category. In real life you may see
a 30-70% improvement. It will make multitasking much better. Memory,
cache, and I/O become more of a bottleneck. Adding even more CPUs gives
rapidly diminishing returns. In some situations, SMP can acutually
cause a performance _decrease_, since the kernel is wasting more time
trying to keep the CPUs from getting in each others way. (Benchmark an
SMP kernel against a single-processor one on a single-processor machine
and you'll see what I mean.)

Think about the I/O case for a moment. Adding CPU's doesn't make your
hard drive deliver data any faster -- it's limited by the speed of the
disc, the bus speed, and the memory bandwidth.

Your memory is already much slower than your CPU, and it has a fixed
bandwidth. Adding a CPU will theoretically double the demand for main
memory bandwidth. Adding two more will double it again. So now you
have processors that spend a lot of time just waiting for the information
they need to continue processing.

For most people, SMP isn't the holy grail they think it is. In some
applications it's great. For heavily-loaded multiuser machines, it's
great... and computer graphics rendering, kernel compiling, etc...

Regards,

Jeff

--
It's time to close windows and open source.
Linux is a trademark of Linus Torvalds.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/