Fw: Unofficial Unix Notes-Raw

Nelly Stanfield (nelly@fnal.gov)
Mon, 30 Nov 1998 13:23:14 -0600

This is a multi-part message in MIME format.

--Boundary_(ID_jvLXWnSv+mgEobsZz3ZSIA)
Content-type: MULTIPART/ALTERNATIVE;
BOUNDARY="Boundary_(ID_rpnTJOl9GcuaGhRNYT48nw)"

--Boundary_(ID_rpnTJOl9GcuaGhRNYT48nw)
Content-type: text/plain; charset="iso-8859-1"
Content-transfer-encoding: quoted-printable

As promised... Raw partitions info.

-----Original Message-----
From: Frank T. Kinder <fkinder@us.oracle.com>
To: nelly@fnal.gov <nelly@fnal.gov>
Date: Monday, November 30, 1998 12:54 PM
Subject: Unofficial Unix Notes-Raw

> Nelly, here are some Notes that can also help. Oracle Unofficial.

> 1. How is ORACLE implemented on UNIX?
>
> ORACLE is implemented using a "two-task architecture". The reason
> this is so-named is that each application "task" starts
> corresponding shadow process [task].
>
> This implementation dates back to small memory machines (i.e.
> PDP11) which had a limited address space (64K0. It is still
> useful for those systems which have limited levels of protection.
> The shadow process, which constitutes the ORACLE Kernal, is only
> process which has access to the SGA (and thus the only process
> which can change data.) User requests are passed between the
> two-task interface.
>
> Through reentrant-code, the ORACLE kernel needs to be loaded into
> memory only once. Each application or user maps to the same code
> segment. A stack keeps track of the application's or user's place
> in the program. Only the data variables that pertain to each
> individual are loaded into memory, thus preserving valuable space.
>
> 2. How large is shared-memory in UNIX?
>
> UNIX System V allows the system administrator to alter parameters
> which control the allocation of shared memory. These parameters
> can be found in the SHM file in the directory /etc/master.d. The
> parameters which interact with ORACLE include:
>
> a. SHMMAX - The maximum size (in bytes) of a single shared memory
> segment.
> b. SHMSEG - The maximum number of shared memory segments which
> can be attached by a process.
> c. SHMALL - The maximum amount of shared memory (in clicks[page
> size]) which can be used by all processess. Some examples of
> click sizes are: 1024 - VAX, 3B2, and 3B20; 2048 - 3B5;
> 4096 - UTS.
>
> Typical values of SHMMAX might be:
> a. 3B2 - 131072
> b. 3B5 - 524288 (maximum value)
> c. 3B20 - 131072 (maximum value)
> d. UTS - 1048576
> e. VAX - 524288
>
> ORACLE uses shared memory segments for the System Global Area
> (SGA). If the size of the SGA exceeds the maximum size of a
> shared memory segment (SHMMAX), ORACLE wukk attempt to attach up
> to SHMSEG contiguous segments to fulfill the reqsuested SGA size.
> In order to attach the segments at contiguous addresses, SHMMAX,
> must be set to its maximum value on systems where its size is
> limited (eg. 3B5 and 3B20).
>
> The typical setting for SHMALL should be no more than 25% of the
> physical memory on the machine.
>
> One word of caution, increasing SHMMAX or SHMALL to allow too
> much of a machines physical memory to be devoted to shared memory
> (ORACLE SGA's) can lead to excessive swapping and poor performance
>
> 3. How is the ORACLE data stored on disk?
>
> ORACLE data can be stored in two ways: A) On the UNIX file system
> B) On "raw devices". A "raw device" is a disk or a partition of
> a disk which has been configured so that the UNIX operating
> system is no longer in control of that disk or partition. The
> advantage to using raw devices is:
>
> * I/O is done directly from the disk to the SGA with little CPU
> overhead. (ORACLE bypasses the UNIX buffer cache.)
> * The overhead of UNIX one block read ahead is avoided.
> * The overhead of the UNIX file system is avoided.
> * The UNIX and ORACLE buffer cache are independently tuned.
>
> Most users will want to place both the .DBS and .BI file onto
> raw disk. They should be placed on separate drives in order to
> avoid head contention. All other files should be placed onto the
> UNIX file system.
>
> The use of raw devices should generally result in a 10-20%
> improvement in database performance.
>
> 4. How does a user set up a "raw device"
>
> The answer to this varies depending upon the particular UNIX
> system and hardware. We will give you a generic overview. You
> should not attempt to do this without and experienced system
> administrator and specific knowledge about the machine you are
> using.
>
> You should know the name if the disk devices on the system. On
> standard System V systems these are normally found in the direct-
> ory "/dev/rdsk"/. The names might be of the form "c0d1s9"
> (Controller 0, Disk 1, Section 9). Documentation on device names
> should be located in the UNIX System Administrator Reference
> Manual issued with your machine.
>
> a. You will also need the names of the free sections (partitions).
> A free partition is one which is not used for a UNIX file system.
> That is, when you execute the "/etc/mount" command, it will not
> be listed. It also MUST NOT be overlapped by or overlap a UNIX
> file system. (It MUST not overlap the swapping paritition either)
> How will lyou know? Execute a "vtoc" command and it will list out
> the current mapping of your disks. The areas that show up as not
> being assigned are available for partitioning as raw.
>
> b. Verify that the paritition is formatted and then "chown oracle
> /dev/rdsk/cXdXsX". You may now ccf the device to initialize it
> for use with ORACLE. (The number of blocks is determined by
> the partition size MINUS 2 blocks). The partition name can be
> used as a standard ORACLE partition in the "init.ora" file or
> with the "alter partition" command.
>
> 5. What is the difference between the UNIX buffer cache and the
> ORACLE buffer cache?
>
> The UNIX buffer cache is provided by the operating system and is
> used to hold blocks of data, in RAM, which are being transferred
> from memory to disk or vice versa. This is a configurable
> parameter on most UNIX systems (NBUF). The ORACLE buffer cache,
> on the other hand, is the area in memory which stores the
> database buffers for the ORACLE RDBMS. Since ORACLE can use raw
> devices, it does not need to use the UNIX buffer cache. This
> eliminates one potential area of contention that other UNIX
> DBMS's can not.
>
>

--Boundary_(ID_rpnTJOl9GcuaGhRNYT48nw)
Content-type: text/html; charset="iso-8859-1"
Content-transfer-encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">

    As=20 promised...    Raw partitions info.
 
 
-----Original = Message-----
From:=20 Frank T. Kinder <fkinder@us.oracle.com>
To:=20 nelly@fnal.gov <nelly@fnal.gov>
Date: = Monday,=20 November 30, 1998 12:54 PM
Subject: Unofficial Unix=20 Notes-Raw

>     Nelly, here = are some=20 Notes that can also help.  Oracle Unofficial.



> = 1. =20 How is ORACLE implemented on = UNIX?
>
>    =20 ORACLE is implemented using a "two-task architecture". The=20 reason
>     this is so-named is that each = application=20 "task" starts
>     corresponding = shadow=20 process [task].
>
>     This = implementation=20 dates back to small memory machines = (i.e.
>     PDP11)=20 which had a limited address space (64K0.  It is=20 still
>     useful for those systems which = have=20 limited levels of protection.
>     The shadow = process, which constitutes the ORACLE Kernal, is=20 only
>     process which has access to the SGA = (and=20 thus the only process
>     which can change=20 data.)  User requests are passed between=20 the
>     two-task=20 interface.
>
>     Through = reentrant-code, the=20 ORACLE kernel needs to be loaded into
>     = memory=20 only once.  Each application or user maps to the same=20 code
>     segment.  A stack keeps track = of the=20 application's or user's place
>     in the=20 program.  Only the data variables that pertain to=20 each
>     individual are loaded into memory, = thus=20 preserving valuable space.
>
> 2.  How large is = shared-memory=20 in UNIX?
>
>     UNIX System V allows = the system=20 administrator to alter parameters
>     which = control=20 the allocation of shared memory.  These=20 parameters
>     can be found in the SHM file = in the=20 directory /etc/master.d.  The
>     = parameters=20 which interact with ORACLE = include:
>
>     a.=20 SHMMAX - The maximum size (in bytes) of a single shared=20 memory
>       =20 segment.
>     b. SHMSEG - The maximum number = of=20 shared memory segments = which
>       =20 can be attached by a process.
>     c. SHMALL = - The=20 maximum amount of shared memory (in=20 clicks[page
>        size]) = which can=20 be used by all processess.  Some examples=20 of
>        click sizes = are:  1024=20 - VAX, 3B2, and 3B20; 2048 -=20 3B5;
>        4096 -=20 UTS.
>
>     Typical values of SHMMAX = might=20 be:
>     a. 3B2 -=20 131072
>     b. 3B5 - 524288 (maximum=20 value)
>     c. 3B20 - 131072 (maximum=20 value)
>     d. UTS -=20 1048576
>     e. VAX -=20 524288
>
>     ORACLE uses shared memory = segments for the System Global Area
>     = (SGA). =20 If the size of the SGA exceeds the maximum size of=20 a
>     shared memory segment (SHMMAX), ORACLE = wukk=20 attempt to attach up
>     to SHMSEG = contiguous=20 segments to fulfill the reqsuested SGA = size.
>     In=20 order to attach the segments at contiguous addresses,=20 SHMMAX,
>     must be set to its maximum value = on=20 systems where its size is
>     limited (eg. = 3B5 and=20 3B20).
>
>     The typical setting for = SHMALL=20 should be no more than 25% of the
>     = physical=20 memory on the machine.
>
>     One word = of=20 caution, increasing SHMMAX or SHMALL to allow=20 too
>     much of a machines physical memory = to be=20 devoted to shared memory
>     (ORACLE SGA's) = can lead=20 to excessive swapping and poor performance
>
> 3.  How = is the=20 ORACLE data stored on disk?
>
>     = ORACLE data=20 can be stored in two ways:  A) On the UNIX file=20 system
>     B) On "raw = devices".  A=20 "raw device" is a disk or a partition=20 of
>     a disk which has been configured so = that the=20 UNIX operating
>     system is no longer in = control of=20 that disk or partition.  The
>     = advantage to=20 using raw devices is:
>
>     * I/O is = done=20 directly from the disk to the SGA with little=20 CPU
>       overhead.  (ORACLE = bypasses=20 the UNIX buffer cache.)
>     * The overhead = of UNIX=20 one block read ahead is avoided.
>     * The = overhead=20 of the UNIX file system is avoided.
>     * = The UNIX=20 and ORACLE buffer cache are independently=20 tuned.
>
>     Most users will want to = place=20 both the .DBS and .BI file onto
>     raw = disk. =20 They should be placed on separate drives in order=20 to
>     avoid head contention.  All = other files=20 should be placed onto the
>     UNIX file=20 system.
>
>     The use of raw devices = should=20 generally result in a 10-20%
>     improvement = in=20 database performance.
>
> 4.  How does a user set up a=20 "raw device"
>
>     The = answer to=20 this varies depending upon the particular = UNIX
>    =20 system and hardware.  We will give you a generic overview. =20 You
>     should not attempt to do this = without and=20 experienced system
>     administrator and = specific=20 knowledge about the machine you are
>    =20 using.
>
>     You should know the name = if the=20 disk devices on the system.  On
>     = standard=20 System V systems these are normally found in the=20 direct-
>     ory = "/dev/rdsk"/.  The=20 names might be of the form = "c0d1s9"
>    =20 (Controller 0, Disk 1, Section 9).  Documentation on device=20 names
>     should be located in the UNIX = System=20 Administrator Reference
>     Manual issued = with your=20 machine.
>
>     a. You will also need = the names=20 of the free sections (partitions).
>     A = free=20 partition is one which is not used for a UNIX file=20 system.
>     That is, when you execute the=20 "/etc/mount" command, it will = not
>     be=20 listed.  It also MUST NOT be overlapped by or overlap a=20 UNIX
>     file system.  (It MUST not = overlap the=20 swapping paritition either)
>     How will = lyou=20 know?  Execute a "vtoc" command and it will list=20 out
>     the current mapping of your = disks.  The=20 areas that show up as not
>     being assigned = are=20 available for partitioning as = raw.
>
>     b.=20 Verify that the paritition is formatted and then "chown=20 oracle
>     /dev/rdsk/cXdXsX".  You = may now=20 ccf the device to initialize it
>     for use = with=20 ORACLE.  (The number of blocks is determined=20 by
>     the partition size MINUS 2 = blocks).  The=20 partition name can be
>     used as a standard = ORACLE=20 partition in the "init.ora" file = or
>    =20 with the "alter partition" command.
>
> 5.  = What is=20 the difference between the UNIX buffer cache and=20 the
>     ORACLE buffer=20 cache?
>
>     The UNIX buffer cache is = provided=20 by the operating system and is
>     used to = hold=20 blocks of data, in RAM, which are being=20 transferred
>     from memory to disk or vice=20 versa.  This is a configurable
>     = parameter on=20 most UNIX systems (NBUF).  The ORACLE buffer=20 cache,
>     on the other hand, is the area in = memory=20 which stores the
>     database buffers for = the ORACLE=20 RDBMS.  Since ORACLE can use raw
>     = devices,=20 it does not need to use the UNIX buffer cache. =20 This
>     eliminates one potential area of = contention=20 that other UNIX
>     DBMS's can=20 not.
>
>
--Boundary_(ID_rpnTJOl9GcuaGhRNYT48nw)-- --Boundary_(ID_jvLXWnSv+mgEobsZz3ZSIA) Content-type: text/html; charset="iso-8859-1"; name="GETHIT" Content-disposition: inline; filename="GETHIT" Content-transfer-encoding: 7bit Content-Base: "http://www-sup.uk.oracle.com/cgi-bin/webiv/do.pl/GETHIT?WwwID=Note.1844.1&List=FUZZY&FUZZY.Idx=22" View NOTE
WebIV:View NOTE


Article-ID:         <Note:1844.1>
Alias:              OLS:3113.004
Circulation:        NOT KROWN Controlled (INTERNAL)
Folder:             platform.Unix
Topic:              * Unix Standards, Variants and Features
Platform:           GENERIC  Generic issue
Subject:            TECH:  Oracle on Unix System Architecture
Creation-Date:      23-DEC-1992 08:49:29
Modified-Date:      03-OCT-1994 11:42:56
Attachments:        NONE



User: OLSBULL
Category: unix
Topic: SYSTEM ARCHITECTURE
Reply: 
Date: 04-OCT-90 12:00:00

********************  ENTER ARTICLE TEXT BELOW THIS LINE *********************
Document: 3113.004
Updated:  04-OCT-90

1.  How is ORACLE implemented on UNIX?

    ORACLE is implemented using a "two-task architecture". The reason
    this is so-named is that each application "task" starts
    corresponding shadow process [task].

    This implementation dates back to small memory machines (i.e.
    PDP11) which had a limited address space (64K0.  It is still
    useful for those systems which have limited levels of protection.
    The shadow process, which constitutes the ORACLE Kernal, is only
    process which has access to the SGA (and thus the only process
    which can change data.)  User requests are passed between the
    two-task interface.

    Through reentrant-code, the ORACLE kernel needs to be loaded into
    memory only once.  Each application or user maps to the same code
    segment.  A stack keeps track of the application's or user's place
    in the program.  Only the data variables that pertain to each
    individual are loaded into memory, thus preserving valuable space.

2.  How large is shared-memory in UNIX?

    UNIX System V allows the system administrator to alter parameters
    which control the allocation of shared memory.  These parameters
    can be found in the SHM file in the directory /etc/master.d.  The
    parameters which interact with ORACLE include:

    a. SHMMAX - The maximum size (in bytes) of a single shared memory
       segment.
    b. SHMSEG - The maximum number of shared memory segments which
       can be attached by a process.
    c. SHMALL - The maximum amount of shared memory (in clicks[page
       size]) which can be used by all processess.  Some examples of
       click sizes are:  1024 - VAX, 3B2, and 3B20; 2048 - 3B5;
       4096 - UTS.

    Typical values of SHMMAX might be:
    a. 3B2 - 131072
    b. 3B5 - 524288 (maximum value)
    c. 3B20 - 131072 (maximum value)
    d. UTS - 1048576
    e. VAX - 524288

    ORACLE uses shared memory segments for the System Global Area
    (SGA).  If the size of the SGA exceeds the maximum size of a
    shared memory segment (SHMMAX), ORACLE wukk attempt to attach up
    to SHMSEG contiguous segments to fulfill the reqsuested SGA size.
    In order to attach the segments at contiguous addresses, SHMMAX,
    must be set to its maximum value on systems where its size is
    limited (eg. 3B5 and 3B20).

    The typical setting for SHMALL should be no more than 25% of the
    physical memory on the machine.

    One word of caution, increasing SHMMAX or SHMALL to allow too
    much of a machines physical memory to be devoted to shared memory
    (ORACLE SGA's) can lead to excessive swapping and poor performance

3.  How is the ORACLE data stored on disk?

    ORACLE data can be stored in two ways:  A) On the UNIX file system
    B) On "raw devices".  A "raw device" is a disk or a partition of
    a disk which has been configured so that the UNIX operating
    system is no longer in control of that disk or partition.  The
    advantage to using raw devices is:

    * I/O is done directly from the disk to the SGA with little CPU
      overhead.  (ORACLE bypasses the UNIX buffer cache.)
    * The overhead of UNIX one block read ahead is avoided.
    * The overhead of the UNIX file system is avoided.
    * The UNIX and ORACLE buffer cache are independently tuned.

    Most users will want to place both the .DBS and .BI file onto
    raw disk.  They should be placed on separate drives in order to
    avoid head contention.  All other files should be placed onto the
    UNIX file system.

    The use of raw devices should generally result in a 10-20%
    improvement in database performance.

4.  How does a user set up a "raw device"

    The answer to this varies depending upon the particular UNIX
    system and hardware.  We will give you a generic overview.  You
    should not attempt to do this without and experienced system
    administrator and specific knowledge about the machine you are
    using.

    You should know the name if the disk devices on the system.  On
    standard System V systems these are normally found in the direct-
    ory "/dev/rdsk"/.  The names might be of the form "c0d1s9"
    (Controller 0, Disk 1, Section 9).  Documentation on device names
    should be located in the UNIX System Administrator Reference
    Manual issued with your machine.

    a. You will also need the names of the free sections (partitions).
    A free partition is one which is not used for a UNIX file system.
    That is, when you execute the "/etc/mount" command, it will not
    be listed.  It also MUST NOT be overlapped by or overlap a UNIX
    file system.  (It MUST not overlap the swapping paritition either)
    How will lyou know?  Execute a "vtoc" command and it will list out
    the current mapping of your disks.  The areas that show up as not
    being assigned are available for partitioning as raw.

    b. Verify that the paritition is formatted and then "chown oracle
    /dev/rdsk/cXdXsX".  You may now ccf the device to initialize it
    for use with ORACLE.  (The number of blocks is determined by
    the partition size MINUS 2 blocks).  The partition name can be
    used as a standard ORACLE partition in the "init.ora" file or
    with the "alter partition" command.

5.  What is the difference between the UNIX buffer cache and the
    ORACLE buffer cache?

    The UNIX buffer cache is provided by the operating system and is
    used to hold blocks of data, in RAM, which are being transferred
    from memory to disk or vice versa.  This is a configurable
    parameter on most UNIX systems (NBUF).  The ORACLE buffer cache,
    on the other hand, is the area in memory which stores the
    database buffers for the ORACLE RDBMS.  Since ORACLE can use raw
    devices, it does not need to use the UNIX buffer cache.  This
    eliminates one potential area of contention that other UNIX
    DBMS's can not.

                          << E N D   O F   B U L L E T I N >>

			<<< E N D   O F   A R T I C L E >>>





--Boundary_(ID_jvLXWnSv+mgEobsZz3ZSIA)--