Thread: Re: Process balancing on smp db server/apache web serve

Re: Process balancing on smp db server/apache web serve

From
Ron Snyder
Date:
> 7. Does Linux SMP support processor affinity?
> Standard kernel
>     No and Yes. There is no way to force a process onto
> specific CPU's but the
> linux scheduler has a processor bias for each process, which
> tends to keep
> processes tied to a specific CPU.
>
>     This seems to be saying that what I was told was wrong,
> so, I apologize for
> wasting the lists time.

It definitely didn't waste my time, as I was previously unaware of the
scheduling bias. :)

Thanks!

-ron



Re: Process balancing on smp db server/apache web serve

From
"Nigel J. Andrews"
Date:
On Thu, 23 May 2002, Ron Snyder wrote:
> > 7. Does Linux SMP support processor affinity?
> > Standard kernel
> >     No and Yes. There is no way to force a process onto
> > specific CPU's but the
> > linux scheduler has a processor bias for each process, which
> > tends to keep
> > processes tied to a specific CPU.
> >
> >     This seems to be saying that what I was told was wrong,
> > so, I apologize for
> > wasting the lists time.
>
> It definitely didn't waste my time, as I was previously unaware of the
> scheduling bias. :)


As was I.

Having taken a quick look at the 2.2.x scheduler (it looks completely different
to how I remember the scheduler looked when I last played in that area under
2.0.x) this does indeed seem to be so. Given that a certain CPU is free at
process that last ran on that CPU gets an advantage compared to those that
haven't. However, given a process that is looking to be scheduled and a CPU
looking to schedule the two can be matched up even if that process last ran on
another CPU.

The reason for the preference seems to be the sensible desire to maximise cache
efficiency, amongst other things.


--
Nigel J. Andrews
Director

---
Logictree Systems Limited
Computer Consultants