Thursday, December 17, 2009

Server Architecture on UNIX and NT


Subject:
Server Architecture on UNIX and NT

Note:48681.1
Type:
BULLETIN

Last Revision Date:
26-MAY-2005
Status:
PUBLISHED
 
Oracle Server Architecture on UNIX and NT
=========================================
 
This article concentrates on the way Oracle works on UNIX and Windows NT,
but other platforms will be mentioned.
 
1.  What are the Oracle background processes/threads?
2.  What are the differences between background processes on UNIX and NT?
3.  How are the background processes/threads implemented on UNIX and NT?
4.  What are the limits on file and database size on UNIX and NT?
5.  How does Oracle use memory on UNIX and NT?
6.  How does Oracle bypass the filesystem cache on UNIX and NT?
7.  How does Oracle utilise the features and characteristics of SMP systems?
8.  How does Oracle utilise the features and characteristics of MPP systems?
9.  How does Oracle work on clustered systems?
10. The different SQL*Net protocol adapters and their environments.
11. How Oracle environment variables are set on different systems. 
12. How is the ORACLE_HOME location chosen on different systems?
13. What are the limitations on choosing ORACLE_SID?
14. How are operating system and Oracle libraries used on UNIX and NT?
15. Accounts and groups used for Oracle installation and administration.
16. Finding out and setting the size of the System Global Area (SGA).
17. How are different releases of Oracle distinguished on UNIX and NT?
18. What is meant by the terms "upgrade" and "migrate"?
19. What are the routes for transporting data between different platforms?
20. What is the difference between a server option and a server cartridge?
 
 
1. What are the Oracle background processes/threads?
 
These are the processes (on UNIX) or the threads within a process (on NT)
which manage the Oracle RDBMS. Some must always be running for the server
to be available; others are optional on all platforms; and some are optional
and specific to certain platforms.
 
A = Must always be running
O = Optional on all platforms
P = Optional and specific to a platform
 
DBWR (A) - the database writer
LGWR (A) - the log writer
PMON (A) - the process monitor
SMON (A) - the system monitor
CKPT (O) - the checkpoint process (or thread)
ARCH (O) - the archive process (or thread)
RECO (O) - the recoverer process (or thread)
SNPnnn (P) - snapshot process
LCKnnn (P) - inter-instance locking processes
Snnn (P) - shared server process in multi-threaded server
Dnnn (P) - dispatcher process in multi-threaded server
WMON (P) - wakeup monitor process
QMNn (P) - AQ Time Manager
TRWR (P) - Trace Writer
LMON (P) - Lock Manager Monitor
LMD0 (P) - Lock Manager Daemon
MMAN (O) - Memory Manager
RBAL (O) - Rebalances ASM disk resources
ASMB (O) - Communicates to and from Cluster Synchronization Services (ASM)
RVRW (O) - Recovery Writer (associated with Flashback Database)
MMNLL(O) - Memory Monitor Light
ARBx (O) - Processes managed by RBAL
CTWR (O) - Change Tracking Writer (RMAN fast incremental backup)
DMON (O) - Data Guard Broker
 
2. What are the differences between background processes/threads on UNIX and NT?
 
There is no difference between the functions, the background processes or
threads fulfil. For example, the log writer does exactly the same, in Oracle
terms, on UNIX and NT. The way they are implemented, however, is different.
 
3. How are the background processes/threads implemented on UNIX and NT?
 
On UNIX, a separate operating system process is created to run each of the
background functions listed above. On NT, they are run as different threads
within the same process.
 
4.  What are the limits on file and database size on different platforms?
 
On UNIX, block sizes usually vary between 2-8K, although larger than 8K is
possible. Maximum database file size is 2Gb on most 32-bit UNIX platforms,
though some (AIX, Solaris and HP/UX) now support a larger maximum, usually 32Gb.
 
On NT, there are only 4 million blocks per datafile, because there are 32 bits
available for block# and file#. So to support 256 (2**8) files/database
requires 8 bits for the file number, leaving 24 bits for the block number;
this gives 2**24 or 16 million blocks per file. However, if 1024 (2**10) files
are to be supported, only 222 or 4 million blocks/file is possible. So, 1024
files/database allows a maximum 4 million blocks/file. Note that the total
maximum possible capacity of the database remains the same regardless of the
way the bits are split up.
 
5. How does Oracle use memory on UNIX and NT?
 
On UNIX, the background processes attach to shared memory, one of the standard
interprocess communication methods on UNIX. On NT, this is not necessary, as
the Oracle threads all share the same virtual address space anyway.
 
6.  How does Oracle bypass the filesystem cache on UNIX and NT?
 
On UNIX, Oracle opens files using the O_SYNC flag to bypass the filesystem
buffer cache. In the current Win32 API, the equivalent flags are
FILE_FLAG_NO_BUFFERING and FILE_FLAG_WRITE_THROUGH. The goal in both cases is
the same; to ensure that data has been posted to disk before assuming that the
write has been successful.
 
7.  How does Oracle utilise the features and characteristics of SMP systems?
 
Oracle utilises as many CPUs as are available. This is completely transparent
to the Oracle user or application developer. The only init.ora parameter that
may need setting is SPIN_COUNT, to influence how long a process will wait for
a latch to become available. Before and after tests should be always be carried
carried out to determine the effects of setting this parameter on database
performance. 
 
See Note 30832.1 for details of SPIN_COUNT.
 
8.  How does Oracle utilise the features and characteristics of MPP systems?
 
Oracle Parallel Server (OPS) is available for MPP systems from all the major
vendors. The way in which it works varies between platforms; for example,
whether the vendor's lock manager is used, or an Oracle-supplied one.
 
9.  How does Oracle work on clustered systems?
 
As on MPP systems, this is very platform-specific, ranging from the more
traditional type of VAX/OpenVMS or Alpha/OpenVMS clusters to emerging
technologies such as NT clusters. Usually, OPS will be used, to take
advantage of the independent processing capability of the different cluster
nodes.
 
The Oracle Fail Safe product is available for selected two-node NT clusters
running MS Cluster Server. If one of the nodes fails, the other can take over
its workload. This product is not related to OPS.
 
10. The different types of SQL*Net protocol adapters and their environments.
 
The major protocol adapter for use with SQL*Net is TCP/IP. This is true for
all platforms. Other adapters that are supplied with the Oracle server depend
on the platform. For example, adapters that can be used on NT are Named Pipes
(Microsoft networking), SPX (for use in Novell environments), TCP/IP, Bequeath
(for local databases) and IPC (for local processes). 
 
On UNIX, TCP/IP, SPX, Bequeath and IPC are again supported. Oracle on many
UNIX platforms also includes adapters for the DECnet protocol and IBM LU6.2
protocol. Note that no DECnet protocol adapter is shipped with Oracle8.
 
The most important point about protocol adapters is that no protocol adapter
should be installed if the underlying protocol is not present on the machine,
e.g. do not install the IPX adapter if you are not using the IPX/SPX protocol.
Failure to observe this can lead to serious problems on UNIX.
 
11. How are Oracle environment variables set on different systems?
 
The variables used by Oracle for the SID, ORACLE_HOME and so on are the same
on different platforms, but stored differently. On OpenVMS, logical names are
used; on UNIX and NT, environment variables. UNIX environment variables are
set differently depending on whether the C-shell or Bourne/Korn shell is in
use.
 
On NT, environment variables may be set in one of three ways:
 
1. In a similar way to Bourne or Korn environment variables on UNIX. For
   example, in a command window, enter:
 
   C:\>set ORACLE_SID=ORC8
 
   Such a setting only has effect in the command window where it was made.
 
2. In Start > Settings > Control Panel > System > Environment
   by entering either a System or User Variable name and value. This updates
   the Registry.
 
3. By running the Registry Editor (REGEDT32) directly, and entering a new
   Key Value (variable name) and Value Data (value) in the appropriate
   subtree. Care should always be taken when editing the registry directly.
 
12. How is the ORACLE_HOME location chosen on different systems?
 
On most systems, including UNIX, the value of ORACLE_HOME is chosen by the
DBA doing the install, based on knowledge of available disk space. On NT,
the Oracle Installer offers as default the disk with the greatest amount of
free space. This can be over-ridden by the DBA doing the install.
 
13. What are the limitations on choosing ORACLE_SID?
 
The SID should consist of four or fewer alphanumeric characters. This is to
avoid problems with filename length restrictions on some platforms, e.g. the
8.3 restriction on DOS, which is still present on NT if using DOS-style names
(which Oracle requires). So the initialisation file for a database called ORCL
will be called initORCL.ora, representing the longest possible filename.
 
14. How are operating system and Oracle libraries used on different systems?
 
On UNIX, there is a general library for all products, plus separate libraries
for each product under that product's directory. These directories contain a
mixture of objects (which have a .o suffix) and archive libraries (which have a
.a suffix). Before a product can be used, it must be built, using the make
utility. This can lead to very large executables, as the relevant libraries
have to be built in to the image. For example, a very small program such as
one which simply prints hello may be 16K in size. This will not apply
if shared libraries are used.
 
On NT, executables tend to be much smaller, because of the Windows usage of
dynamic link libraries (DLLs). These are very similar to shared libraries on
UNIX, or shareable images on OpenVMS. They are dynamically linked with the
executable at runtime.
 
15. What accounts and groups are used for Oracle installation?
 
On UNIX, a dba group (the default name is "dba") and Oracle user (no default,
a good choice is something like "oracle" or "ora7") are required. Oracle cannot
be installed by the root user.
 
On NT, the account used for Oracle installation and maintenance must either be
the Administrator account, or an account in the Administrators group.
 
16. Finding out the size of the System Global Area (SGA).
 
The size of the SGA may be obtained as follows:
 
(a) On startup.
(b) By entering SHOW SGA when connected internal to Server Manager.
 
Both of these show something like:
 
Total System Global Area       4830836 bytes
Fixed Size                       46596 bytes
Variable Size                  3948656 bytes
Database Buffers                819200 bytes
Redo Buffers                     16384 bytes
 
17. How are different releases of Oracle distinguished on UNIX and NT?
 
On UNIX, there can be as many installations of Oracle as the machine's
resources will allow. They are distinguished by the environment variables
ORACLE_HOME and ORACLE_SID. The executables for different versions have the
same name.
 
On NT, all Oracle server installations must be in the same ORACLE_HOME (this
is no longer the case from 8.0.4). Versions are distinguished by having the
first two letters of the version at the end of their names, e.g. ORACLE73,
EXP80. This means that installation of one minor release, e.g. 7.3.2.3, will
overwrite another, e.g. 7.3.2.1, which may not have been the intended result.
 
18. What is meant by the terms "upgrade" and "migrate"?
 
The term upgrade is used to refer to moving from one minor release to a higher
minor release, e.g. 7.2.2.4 to 7.2.3. The term migrate is used to refer to
moving from one major release to a higher major release, e.g. 7.3.4 to 8.0.4.
 
19. What are the routes for transporting data between different platforms?
 
The tool for extracting data from an Oracle database is export. The file
it creates is written in a special, proprietary format, which can only be read
by the import utility. The latter may reside on another platform, so this 
route allows an Oracle database to be moved to a different platform. A less
sophisticated way of extracting data is to issue the appropriate SELECT query
in SQL*PLus, spooling the output to a file.
 
20. What is the difference between a server option and a server cartridge?
 
An option is an component of the Oracle Server which, when installed, becomes
part of the server kernel. The term cartridge denotes an option which provides
a user interface to the kernel, and which may, in a future release of the
server, become object-based. In some cases, for example ConText, what was an
option in Oracle7 is referred to as a cartridge in Oracle8. In other cases,
for example Parallel Query, what was an option has been included as a standard
part of the database.  
 
--------------------------------- Oracle Worldwide Customer Support Services --
 
.

1 comment:

  1. KG - Play online casino, poker, blackjack, roulette at KG - Kadangpintar
    KG · Poker febcasino · Sports kadangpintar · Casino · Bingo · Casino · Blackjack · Other Games · Online Casino · Sportsbook · 제왕 카지노 Poker Games · Online Casino · Poker Rooms · Online

    ReplyDelete