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

From: "Nigel J(dot) Andrews" <nandrews(at)investsystems(dot)co(dot)uk>
To: Ron Snyder <snyder(at)roguewave(dot)com>
Cc: 'Peter Darley' <pdarley(at)kinesis-cem(dot)com>, Pgsql-General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Process balancing on smp db server/apache web serve
Date: 2002-05-23 23:41:30
Message-ID: Pine.LNX.4.21.0205240034160.12663-100000@ponder.fairway2k.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Glen Parker 2002-05-24 01:17:18 Pg_dump and huge OID's
Previous Message Tom Lane 2002-05-23 22:51:22 Re: Psql 7.2.1 Regress tests failed on RedHat 7.3