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: Is it better to set the freelist to a prime number ?

Re: Is it better to set the freelist to a prime number ?

From: Andrew Mobbs <andrewm_at_chiark.greenend.org.uk>
Date: 24 Jul 2002 16:50:13 +0100 (BST)
Message-ID: <Dy*Tm7tp@news.chiark.greenend.org.uk>


Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk> wrote:
>
>Thanks for the reference, which I've followed up.
>Suddenly it's all clear.
>
>It makes no difference whether the value is prime
>or not. The significance appears I think when you
>use multiple free lists AND multiple freelist groups
>in a single instance.
>
>In this case, the number of freelists and the number
>of freelist groups must be relatively prime (co-prime ?)
>or you don't make use of all the freelists in all the
>freelist blocks.

Not quite, it still can make a difference in some cases. For example, if there's some characteristic of your environment that makes the PID non-random.

Say I start up a batch job that runs as 64 parallel processes on the same system as the database server is running. Each batch job has an Oracle shadow process. It's quite likely (on some OSes) to have the application and shadow processes interleaved, i.e. all the application processes to end up with an odd PID, and all the Oracle shadow processes to end up with an even PID (or vice-versa). There's an example of something very similar on my other terminal about two feet away :-)

If you had a even number of freelists, you'd only end up using half the freelists.

PIDs have no guarantees about their numerical properties, so may well fall into a pattern (possibly one more complex than just all being even). Primes have the greatest resistance to matching a pattern.

-- 
Andrew Mobbs - http://www.chiark.greenend.org.uk/~andrewm/
Received on Wed Jul 24 2002 - 10:50:13 CDT

Original text of this message

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