Re: How to use SMP right?
Jan-Hendrik Palic wrote:
Hi,
I am not really familar with multiprozessors or multicore systems except
installing a smp enabled kernel and see more then one cpu in
/proc/cpuinfo.
How is it running on single desktopsystems, does the smp enabled kernel
do the work for distributing the prozesses to the prozessors or do I
need to compile my software against special libs to use
multiprozessing/multicoring?
On a multi-core (usually bi-core actually) processor, you see 2 CPUs in /proc/cpuinfo and different processes may run on
both core at a time. (Some bi-core hyper-threaded Intel processors show you 4 CPUs in cpuinfo).
As a concrete and daily example, a build with make -j2 (or -j3) is usually going at least twice as fast as a sequential
make.
Of course, individual programs (particularily monothreaded ones) are not accelerated on a bicore processor.
In practice, for common use, you just need to install an SMP kernel (but recent ones ie 2.6.21 are always SMP!) et voilà.
Of course, don't expect any sequential number crunching program to speed up. You'll need to parallelize it.
What precisely do you intend to do with your new bi-core workstation?
Regards.
--
Basile STARYNKEVITCH http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net | mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mine, sont seulement les miennes} ***
Reply to: