Oracle8i
Parallel Server Getting Started
Release 8.1.5 for Windows NT A68813-01 |
|
This chapter provides a conceptual and component overview of Oracle Parallel Server. This information helps you prepare and plan your Oracle Parallel Server installation on Windows NT.
Note: OPS-specific implementation, installation and configuration issues are covered in Oracle8i Parallel Server Setup and Configuration Guide. |
Specific topics discussed are:
Oracle Parallel Server is an architecture that allows multiple instances to access a shared database. Oracle Parallel Server offers the following (terms will be described later in this chapter):
An Oracle Parallel Server can handle node or disk failure in a clustered environment with no or minimal downtime. The Oracle Parallel Server architecture provides the following features:
Coordination of each node accessing the shared database provides the following:
The following components make up an
Oracle Parallel Server:
A vendor-supplied Operating System
Dependent (OSD) layer that passed certification must be installed after
Oracle Parallel Server Option is installed. The OSD layer consists of several
software components developed by vendors. The OSD layer maps the key OS/cluster-ware
services required for proper operation of Oracle Parallel Server.
Note: The Performance and Management (P&M) component available as an OSD component prior to this release has now integrated with the Oracle Parallel Server Option. |
These components provide key services
required for proper operation of the Oracle Parallel Server Option and
are used by various clients, such as Integrated Distributed Lock Manager
(IDLM). Each OSD module interacts with the Oracle Parallel Server runtime
environment as a single Dynamic Link Library (DLL). These components are
more fully described later in this chapter.
Figure 1-1
illustrates the OSD components in a cluster with two nodes:
The Cluster Manager (CM) monitors process
health, specifically of the Oracle8 release 8.1 database instance. LMON,
a background process that monitors the health of the Integrated Distributed
Lock Manager (IDLM), registers and de-registers from CM.
It is critical that all Oracle Parallel
Server instances receive the same membership information when events occur.
Notification changes cause relevant Oracle Parallel Server recovery operations
to be initiated. If any node or instance is determined to be dead or otherwise
not a properly functioning part of the system, CM terminates all processes
on that node or instance. Thus, any process or thread running Oracle code
can safely assume its node or instance is an active member of the system.
If there is a failure, recovery is
transparent to user applications. CM automatically reconfigures the system
to isolate the failed node and instance and notify IDLM of the status.
IDLM subsequently recovers any of the locks from the failed node or instance.
Oracle Parallel Server can then recover the database to a valid state.
The IDLM relies on the Cluster Manager
for timely and correct information. If the IDLM cannot get the information
it needs, it will shut down the instance.
CM consists of the following components:
The Node Monitor component of CM manages
access to shared disks and monitors the status of various cluster resources
(including nodes, networks and the Cluster Management component).
The Node Monitor component:
The Cluster Management component of
CM replaces the release 8.0 Group Membership Service (PGMS) function of
determining what groups are up and managing instance members. Each instance
registers with their database specific group managed by the Cluster Management
component. Cluster Management then interacts with the Node Monitor component
of CM.
Figure 1-2
depicts how the Node Monitor and Cluster Management components coordinate.
Note: Some vendors may not support both Node Monitor and Cluster Management components. |
Oracle Parallel Server derives most
of its functional benefits from its ability to run on multiple interconnected
machines. Oracle Parallel Server relies heavily on the underlying Inter-Process
Communication (IPC) component to facilitate this.
IPC defines the protocols and interfaces
required for the Oracle Parallel Server environment to transfer reliable
messages between instances. Messages are the fundamental logical units
of communication in this interface. The core IPC functionality is built
around an asynchronous, queued messaging model. IPC is designed to send/receive
discrete messages as fast as the hardware allows. With an optimized communication
layer, various services can be implemented above it. This is how the IDLM
carries out all of its communication.
The Input/Output (IO) component provides
interprocess capabilities that a cluster implementation must support to
enable proper operation of the Oracle Parallel Server environment.
The Oracle Parallel Server environment
is extremely dependent on the ability of the underlying OS/cluster implementation
to support simultaneous disk sharing across all nodes that run coordinated
Oracle Parallel Server instances. Unlike switch-over based technologies,
all Oracle Parallel Server instances are active and can operate on any
database entity in the shared physical database simultaneously. It is this
capability that gives Oracle Parallel Server a large portion of its parallel
scalability. It is the role of the IDLM to coordinate the simultaneous
access to shared databases in a way that maintains consistency and data
integrity.
At a high level, the Oracle Parallel
Server shared I/O model can be described as a distributed disk cache implemented
across all nodes that define the Oracle Parallel Server cluster. The core
of Oracle Parallel Server can be viewed as a major client of the cache.
Disk blocks from the shared devices are read into a particular node instance
cache only after mediation by the IDLM. The other node instance may read
the same blocks into its cache and operate on them simultaneously. Updates
to those blocks are carefully coordinated. In general, all shared disk
based I/O operations are mediated by the IDLM. The set of distributed IDLMs
on each node can be thought of as managing the distributed aspects of the
cache.
Disk update operations must be carefully
coordinated so that all nodes see the same data in a consistent way. Any
Oracle Parallel Server instance intending to update a cached data block
must enter into a dialog with the IDLM to ensure it has exclusive right
to update the block. Once it does this, the instance is free to update
the block until its rights have been revoked by the IDLM. When the exclusive
update right is revoked, the instance with block updates must write the
block to disk so that the other node can see the changes. Given this rather
high-level view of the IDLM I/O consistency model, it is clear that disk
blocks can migrate around to each instance's block cache and all updates
are flushed to disk when an instance other than the owner desires access
to the block. It is this property that directly determines the reliance
of Oracle Parallel Server on shared disk implementations.
The Startup (START) component initiates
the Oracle Parallel Server components in a specific order during instance
startup. It is up to the vendor to determine this startup sequence.
Each Oracle Parallel Server instance,
a running instance of Oracle8i software, is comprised of a System Global
Area (SGA) and Oracle background processes. The SGA is a shared memory
region that contains data and control information for an instance. Users
can connect to any instance to access the information that resides within
the shared database.
Oracle Parallel Server instances coordinate
with the following components:
All instances share:
An instance contains:
See Oracle8i Concepts for information
about Oracle8i database processes and memory structures.
The data files are located on disk drives that are shared between the multiple nodes. If one node fails, client applications (written to do so) can re-route users to another node. One of the surviving nodes automatically performs recovery by rolling back any incomplete transactions that the other node was attempting. This ensures the logical consistency of the database.
Note: An instance does not include data files, you can start up an instance without mounting the data files. |
Following the OFA naming convention,
each node's instance has its own INITSID.ORA file that uniquely defines
the instance with instance-related parameters. This file calls INITDB_NAME.ORA,
which lists common parameters shared from node-to-node. Both files are
created by the Oracle Database Configuration Assistant after installation.
The INITSID.ORA file is impacted by
a number of elements, including:
If the DB_NAME is OP and the thread
IDs are 1, 2, and 3, then the SID for each node is:
Thread ID | SID |
---|---|
1 |
OP1 |
2 |
OP2 |
3 |
OP3 |
If the DB_NAME is OP and the node numbers
are 0, 1, 4, and 6, then the instance elements are effected in the following
manner:
A database is logically divided into
tablespaces that contain all data stored in the database. Tablespaces,
in turn, are made up of one or more data files.
With Oracle Parallel Server, all participating
instances access the same database files.
Figure 1-3
shows the relationship between two Oracle instances and the shared disks
on which the database files are stored:
Oracle Parallel Server has the following
features:
The Integrated Distributed Lock Manager
(IDLM) maintains a list of system resources and provides locking mechanisms
to control allocation and modification of Oracle resources. Resources
are structures of data. The IDLM does not control access to tables or anything
in the database itself. Every process interested in the database resource
protected by the IDLM must open a lock on the resource.
Oracle Parallel Server uses the IDLM
facility to coordinate concurrent access to resources, such as data blocks
and rollback segments, across multiple instances. The Integrated Distributed
Lock Manager facility has replaced the external Distributed Lock Manager
which was used in earlier releases of Oracle Server.
The IDLM uses the LMON and LMDN
processes. LMON manages instance and processes deaths and associated recovery
for the IDLM. In particular, LMON handles the part of recovery associated
with global locks. The LMDN process handles remote lock requests
(those which originate from another instance).
The IDLM:
The IDLM is a resource manager and,
thus, does not control access to the database.
A node in a cluster needs to modify
block number n in the database file. At the same time, another node
needs to update the same block n to complete a transaction.
Without the IDLM, both nodes
update the same block at the same time. With the IDLM, only one node is
allowed to update the block. The other node must wait. The IDLM ensures
that only one instance has the right to update a block at any one time.
This provides data integrity by ensuring that all changes made are saved
in a consistent manner.
The IDLM uses CM to determine which
instances are active. When the instance is started, the LMON and LMDN
processes are started and the IDLM registers with CM. The IDLM deregisters
with CM when the database is shutdown.
Parallel Cache Management (PCM) provides
instance locks (with minimal use of the IDLM) that cover one or more data
blocks of any class: data block, index blocks, undo blocks, segment headers,
and so on. Oracle Parallel Server uses these instance locks to coordinate
access to shared resources. The IDLM maintains the status of the instance
locks.
PCM locks ensure cache coherency by
forcing instances to acquire a lock before modifying or reading any database
block. PCM locks allow only one instance at a time to modify a block. If
a block is modified by an instance, the block must first be written to
disk before another instance can acquire the PCM lock, read the block,
and modify it.
If node 1 needs access to data that
is currently in node 2's buffer cache, node 1 can submit a request to the
IDLM. Node 2 then writes the needed blocks to disk. Only then is Node 1
notified by the IDLM to read updated and consistent data from the disk.
You use the initialization parameter
GC_FILES_TO_LOCKS to specify the number of PCM locks which cover the data
blocks in a data file or set of data files. The smallest granularity is
one PCM lock per data block; this is the default. PCM locks usually account
for the greatest proportion of instance locks in a parallel server.
PCM locks are implemented in four ways:
Additional Information: See Chapter 9, Parallel Cache Management Instance Locks" and Chapter 15, "Allocating PCM Instance Locks", of the Oracle8i Parallel Server Concepts and Administration guide. It is possible to have both fine-grain locking and hashed locking enabled at the same time. |
Below is a comparison of both PCM locks:
Hash PCM Locks | Fine-Grain PCM Locks |
---|---|
|
Use the table below to choose a PCM
lock:
When to use hashed locks... | When to use fine-grain locks... |
---|---|
|
With the Oracle Parallel Query (OPQ),
Oracle can divide the work of processing certain types of SQL statements
among multiple query server processes.
When parallel execution is not being
used, a single server thread performs all necessary processing for the
sequential execution of a SQL statement. For example, to perform a full
table scan (such as SELECT * FROM EMP), one thread performs the entire
operation.
OPQ performs the operations in parallel
using multiple parallel processes. One process, known as the parallel
coordinator, dispatches the execution of a statement to several parallel
server processes and coordinates the results from all the server
processes to send the results back to the user.
The parallel coordinator breaks down
execution functions into parallel pieces and then integrates the partial
results produced by the parallel server processes. The number of parallel
server processes assigned to a single operation is the degree of parallelism
for an operation. Multiple operations within the same SQL statement all
have the same degree of parallelism.
Oracle Parallel Server provides the
framework for the Parallel Query Option to work between nodes. The OPQ
behaves the same way in Oracle with or without the Parallel Server Option.
The only difference is that Oracle Parallel Server enables OPQ to ship
queries between nodes so that multiple nodes can execute on behalf of a
single query. Here, the server breaks the query up it into smaller operations
that run against a common database which resides on shared disks. Because
it is performed by the server, this parallelism can occur at a low level
of server operation, rather than at an external SQL level.
In some applications, an individual
query often consumes a great deal of CPU resource and disk I/O (unlike
most online insert or update transactions). To take advantage of multi-processing
systems, the data server must parallelize individual queries into units
of work which can be processed simultaneously.
If the query were not processed in
parallel, disks would be read serially with a single I/O. A single CPU
would have to scan all rows in a table. With the query parallelized, disks
are read in parallel, with multiple I/Os.
Several CPUs can each scan a part of
the table in parallel, and aggregate the results. Parallel query benefits
not only from multiple CPUs but also from greater I/O bandwidth availability.
OPQ can run with or without the Oracle
Parallel Server. Without the Oracle Parallel Server option, OPQ cannot
perform multi-node parallelism. Oracle Parallel Server optimizes Oracle8
Enterprise Edition running on clustered hardware, using a parallel cache
architecture to avoid shared memory bottlenecks in OLTP and decision support
applications.
OPQ within Oracle Parallel Server performs
parallelism within a node and among nodes via the parallel query slave
processes on each node.
A sample SQL statement is shown below:
After you have run a query, you can
use the information derived from V$PQ_SYSSTAT to view the number of slave
processes used, and other information for the system.
Additional Information: See Chapter 28, "Parallel Execution", in the Oracle8 Concepts guide. |
These tables describe the new
products and features of Oracle Parallel Server release 8.1.5 specific
to Windows NT. See Getting to Know Oracle8i
and Oracle8i Parallel Server
Concepts and Administration for
the list of new Oracle Parallel Server features common to all operating
systems.
New Feature | Description | For More Information, See... |
---|---|---|
Optimal Flexible Architecture (OFA) |
Provides a structured method for installing Oracle8 databases and applications in a manner which helps promote ease of maintenance, improved performance, and reliability. |
See Appendix A, "Directory Structure" in this book and Oracle8i Enterprise Edition Getting Started for Windows NT for more information on OFA. Note: OFA has caused a number of changes to the Oracle directory tree, file names, directory names, and the definition of Oracle home since release 8.0.x. |
Oracle Universal Installer |
The new installer is based on a Java engine that provides an extensible environment able to handle advanced software installation requirements. Oracle Universal Installer provides users with a consistent interface across all platforms on which Oracle is available. Note: Versions of the Installer previous to release 8.1 are referred to as "Oracle Installer." |
|
Cluster-aware software |
The Oracle Universal Installer and the Oracle Database Configuration Assistant are cluster-aware in this release. Installation and configuration can be performed from one node in the cluster rather than each individual node. Components are "pushed" out to the other nodes. |
|
Easy configuration |
Configuration was a manual process prior to this release. While this manual process is still available for this release, the Oracle Database Configuration Assistant can be run to create an Oracle Parallel Server database. The Oracle Database Configuration Assistant can be run automatically after installation or at a later time. |
|
OSD Performance and Management (P&M) component implemented in Oracle Parallel Server Manager Option |
The P&M component was a vendor-supplied component installed with the OSD layer. This component interacted with the Oracle Enterprise Manager tools. Because P&M must be implemented in a precise manner, this component is now installed with the Oracle Parallel Server Option rather than as an OSD module. |
Chapter 3 of this guide. |
initialization file name changes |
The initialization file that contains common parameters shared from node-to-node was called INIT_COM.ORA in prior releases. This file name has been replaced by INITDB_NAME.ORA. Each instance still has it's own initialization file, INITSID.ORA. |
|
|
![]() Copyright © 1999 Oracle Corporation. All Rights Reserved. |
|