0123-0126

Previous Table of Contents Next

Page 123

CHAPTER 7

Oracle8 Server

IN THIS CHAPTER

  • Architectural Overview 124
  • Oracle SGA 125
  • New Features in Oracle8 128

Page 124

Oracle8 is much more than an upgrade to Oracle's existing relational database management system (RDBMS). For the first time, Oracle has combined object and relational technologies to produce an incredibly powerful and flexible object-relational database management system (ORDBMS). In addition to the new object-oriented extensions, Oracle8 provides significant scalability, extensibility, and performance improvements. This chapter reviews the basic Oracle architecture and presents an overview of the most significant new features of the Oracle8 server.

Architectural Overview

Despite the many new features of Oracle8, the core of the RDBMS remains intact to support backward compatibility. Backward compatibility protects investments in current Oracle implementations and enables existing application and database designs to exploit the new features of Oracle8. This section provides a high-level overview of the basic Oracle server architecture and some its most popular options.

The basic architecture of the Oracle8 server can be expressed in terms of physical storage, memory structures, and server processes.

An Oracle database uses three types of file structures:

  • Data files: Store the actual data for a tablespace, which is a logical unit of storage. Every tablespace uses one or more data files to store the actual data for the tables, indexes, and clusters it contains. Data is read from or written to data files automatically, as needed. A physical read or write is not always required to satisfy a logical read or write. Data that already has been read and any modifications to the data may be cached in memory to improve performance.
  • Redo log files: Record data changes that have not been written to the data file. Two or more redo log files make up a logical redo log, which is used to recover modifications that have not been written to data files in the event of an extreme failure, such as a power outage .
  • Control files: Used at startup to identify the database and determine which redo log files and data files will be used by the database. Control files are updated automatically when new data files or redo log files are created. Each Oracle database requires at least one data file, at least one control file (Oracle recommends using at least two), and at least two redo log files.

TIP
Ideally, control files and redo log files are spread across at least two disks to enable full recovery from a media failure.

Page 125

Oracle SGA

The primary memory structure used by an Oracle instance is the system global area (SGA). The SGA is made up of the following components :

  • Database buffer cache: Caches the most recently used data (including modifications), which minimizes physical reads and writes on data files.
  • Redo log buffer: Caches changes before they are written to redo log files.
  • Shared pool: Caches dictionary information, PL/SQL code, and information on SQL statements, such as the parse tree and execution plan.

Each of the components of the SGA can be tuned to optimize performance using initialization file parameters. You can set the number of database blocks and the size of each block, for example, to increase the size of the cache and optimize I/O between the cache and data files. As the name implies, the SGA is shared by all processes associated with the Oracle instance.

Except when using the multithreaded server option (which is discussed later in this section), a separate server process is dedicated to processing an individual client's requests . The program global area (PGA) is the memory structure used by these individual processes. The PGA contains data for a specific process and includes stack space, session information, and sort space. The size of each PGA is set for the instance, depending on the operating system and a handful of initialization parameters. The sort area of the PGA can be tuned based on these parameters, which can set the minimum and maximum size of the sort area and indicate how I/O between the sort area and temporary data segments should be handled.

A number of background processes are used by each Oracle instance to control physical I/O and to manage the instance and dedicated server processes:

  • Database Writer: DBWR reads blocks from the SGA cache and writes modified blocks to the appropriate data files. Some platforms allow multiple database writer processes, which can improve performance.
  • Log Writer: LGWR reads information from the redo log buffer in the SGA and writes this information to the redo log file. The Log Writer also may be responsible for updating data file headers if no checkpoint process is available.
  • Checkpoint: CKPT updates each data file header when a checkpoint occurs. Checkpoints occur at regular intervals (in terms of log file blocks written) or in seconds (as specified by initialization file parameters). A checkpoint always occurs when Oracle switches from one log file to another. The information written to the data file headers is used with the redo log files to recover from the database in the event of a system failure.
  • System Monitor: SMON automatically recovers an instance at startup (if needed) and cleans up temporary segments. The SMON also serves another very important purpose: It coalesces contiguous free extents into larger free extents. This helps avoid fragmentation of data files.

Page 126

  • Process Monitor: PMON automatically recovers and cleans up after user processes. When a client disconnects abnormally, for example, the Process Monitor frees resources allocated to its server process and marks the dedicated server process as inactive.
  • Archiver: The Archiver, or ARCH, copies full redo log files to offline storage. This process is used only when the database is in Archive Log mode and automatic archiving is enabled. Initialization file parameters govern this behavior and identify the archive destination, which should be a separate physical device. Archived logs can be used to restore a database (when a severe problem occurs, such as a disk failure) to a more recent state than the last backup. In OLTP (online transaction processing) systems, Archive Log mode is highly recommended.

Figure 7.1 illustrates the interaction between Oracle processes, memory structures, and file structures in a standard (dedicated server) configuration.

The basic architecture is extended by a number of popular Oracle server options, including the following:

  • Multithreaded Server option: Uses a pool of shared server processes to service clients instead of separate dedicated server processes for each client. A single shared server process is capable of servicing multiple client processes, which can conserve memory and support a larger number of clients. In a multithreaded server configuration, the size of the PGA allocated for each user is reduced, because it contains stack space only. The shared pool must be increased to accommodate additional session information for user processes. The multithreaded server also uses additional background processes (dispatchers) to manage communications between connected user processes and shared server processes. At least one dispatcher must be present for each protocol supported. You can configure the number of shared server processes and dispatcher processes by using initialization file parameters.
  • Parallel Server option: Allows the same physical database (using shared disk systems) to be accessed by multiple instances of Oracle, providing improved performance and fail-over capabilities. In Parallel Server mode, additional background processes (locks) are used to coordinate locks between instances. In most cases, a single lock process is sufficient for parallel server operations. In large distributed systems, though, you can use additional lock processes to improve throughput.

NOTE
The term fail-over refers to redundancy in servers. When two computers are accessing a common disk subsystem, the second is available in the event the first computer fails. This minimizes downtime.
Previous Table of Contents Next


Oracle Unleashed
Oracle Development Unleashed (3rd Edition)
ISBN: 0672315750
EAN: 2147483647
Year: 1997
Pages: 391

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net