Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle 8i - W2k - MultiProcessor and Thread Question

Re: Oracle 8i - W2k - MultiProcessor and Thread Question

From: Billy Verreynne <vslabs_at_onwe.co.za>
Date: Fri, 21 Feb 2003 08:40:28 +0000
Message-ID: <b34hn1$fn5$1@ctb-nnrp2.saix.net>


Brian E Dick wrote:

> You can't specify processor affinity at the thread level. It's specified
> at the process level and all threads and spawned processes inherit the
> parent process setting. Check out the SetProcessAffinityMask() API
> function.

That was a newer API call added to Win32. Was not part of the original o/s interface design.

There's a similar API call on some Unix systems. It allows you to bind a process to a CPU id. There's even a Unix command equvalent for the API call, allowing you to force a PID to be run on another CPU.

Using such calls, is a Bad Idea (tm).

Quoting from the Win32 API specs.
"Setting thread affinity should generally be avoided, because it can interfere with the scheduler's ability to schedule threads effectively across processors. This can decrease the performance gains produced by parallel processing. An appropriate use of thread affinity is testing each processor."

As for Oracle. Oracle does not perform thread scheduling or change thread priorities or perform thread binding to a specific CPU.

This is not the job of an application. It's the job of the operating system.

The flaw in many people's reasoning is that multiple CPU's mean that if you have a 40% processor load, it will be run 20% on CPU0 and 20% on CPU1.

They do not seem to grasp that a 40% load on CPU0 and a 0% CPU1 load, delivers the same (and possibly even slightly faster) performance.

--
Billy
Received on Fri Feb 21 2003 - 02:40:28 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US