Re: Linux Multi-CPU performance



On Mon, 30 Jan 2006 14:29:03 +0200, Scott Hazelhurst wrote:

> We've developed an SMP version of a program we had previously
> successfully parallelised on a cluster. The results were very
> disappointing with no obvious reasons for such poor performance.

An SMP-aware application? Exactly what have you done to make the
application an SMP version?

Unless you are setting the CPU affinity for a process, I don't understand
this at all.

> After some experimentation we have started to wonder if it's not on OS
> bug. I wrote small programs that use almost no memory, no I/O and are
> completely compute bound.

Newer process schedulers in the kernel take great pains with CPU hogs,
such as granting them longer and longer time slices at lesser and lesser
priority.

The kernel also is reluctant to migrate a process from CPU to CPU because
of the cache reload penalties. This is tunable, YMMV.

But, there may be more appropriate process schedulers from which to
choose. Please look into these. Process priorities can make differences,
too.

> Experiment 2: On a 4-CPU machine

Are you really sure you have a 4 CPU machine? Four separate CPU's and not
two hyperthreaded chips? Hyperthreading does not two CPU's make. Two
hyperthreaded chips are more like 2.5-3 CPU's, not four.

> Is it worth pushing to upgrade the kernel?

Nah, not until you know what you are measuring. By default, you get
interactive-friendly behavior but you are not interested in that and it
seems as if you haven't explored how to customize Linux's default
policies. Google is your friend.

HTH
.



Relevant Pages

  • Re: SMP detection
    ... I have the SMP-GENERIC kernel ... I've decided to disable SMP from BIOS. ... way to install one already precompiled? ... cpu and the system monitor only features one ...
    (freebsd-questions)
  • different oops on xeon with smp kernel
    ... then SMP kernels oops very early at boot at different places. ... CPU: Trace cache: 12K uops, ... Unable to handle kernel paging request at virtual address 8528244c ...
    (Linux-Kernel)
  • Re: 2 x quad-core system is slower that 2 x dual core on FreeBSD
    ... Can you try a generic SMP kernel (called "SMP" in 6.x; ... relationship between how many CPUs are running and what the sys load is. ... Now I'm running yesterday's FreeBSD 7.0-BETA3 amd64 with GENERIC kernel. ... I.e. it seems to work good as a simple server with not so powerfull CPU. ...
    (freebsd-stable)
  • Re: SMP detection
    ... I have the SMP-GENERIC kernel and it ... only launches one cpu. ... I've decided to disable SMP from BIOS. ... way to install one already precompiled? ...
    (freebsd-questions)
  • Re: SMP detection
    ... Smp enabled kernel? ... cpu and the system monitor only features one cpu ... now that multi-cored chips exist I do not know. ...
    (freebsd-questions)