Académique Documents
Professionnel Documents
Culture Documents
2
Instances on Unix vs. Windows
3
Dedicated Server
A new dedicated server
process is created per
user/session.
Client process talks
directly to the server
process.
OS manages the server
processes.
4
MTS – Multi-threaded Server
Client processes
communicate with a
dispatcher to send in
requests and receive
responses.
Both requests and •The client connection will send a request to the
dispatcher.The dispatcher will first place this
responds are queued request onto the request queue in the SGA (1).
•The first available shared server will dequeue this
up. request (2) and process it.
•When the shared server completes, the response
More client processes (return codes, data, and so on) is placed into the
response queue (3) and subsequently picked up by
than (shared) server the dispatcher (4), and transmitted back to the
client.
processes.
5
Dedicated vs. Shared Configurations
6
Oracle Files
Server Parameter Files (SPFILEs) – These files tell the
Oracle instance where to find the control files. For example,
how big certain memory structures are, and so on.
The major files that make up the database are:
Data files – For the database (these hold your tables, indexes and
all other segments).
Redo log files – Transaction logs for recovery.
Control files – Which tell us where these data files are, and other
relevant information about their state.
Temp files – Used for disk-based sorts and temporary storage.
Password files – Used to authenticate users performing
administrative activities over the network.
Trace files – sources of debugging and diagnostic information.
7
Storage Hierarchy
A block is the smallest
allocation unit, 2, 4, 8, 16, 32KB.
An extent consists of
contiguous blocks.
A segment consists of one or
more extents.
A database object (table, index,
…) is stored as a segment.
A data file consists of
segments.
A segment could reside in
multiple data files.
An extend reside in exactly one
file.
A tablespace is made up of data
files.
8
Memory Structures
SGA, System Global Area – This is a large, shared
memory segment that virtually all Oracle processes will
access at one point or another.
PGA, Process Global Area – This is memory that is
private to a single process or thread, and is not accessible
from other processes/threads.
UGA, User Global Area – This is memory associated
with your session. It will be found either in the SGA or
the PGA depending on whether you are running in MTS
mode (then it'll be in the SGA), or dedicated server (it'll
be in the PGA).
9
SGA
Java pool – The Java pool is a fixed amount of
memory allocated for the JVM running in
thedatabase.
Large pool – The large pool is used by the MTS for
session memory, by Parallel Execution for message
buffers, and by RMAN Backup for disk I/O buffers.
Shared pool – The shared pool contains shared
cursors, stored procedures, state objects, dictionary
caches, and many dozens of other bits of data.
The 'Null' pool – This one doesn't really have a
name. It is the memory dedicated to block buffers
(cached database blocks), the redo log buffer and a
'fixed SGA' area.
Redo Buffer - is where data that needs to be
written to the online redo logs will be cached
temporarily before it is written to disk.
Block Buffer Cache - is where Oracle will store
database blocks before writing them to disk, and
after reading them in from disk
Fixed SGA – Contains a set of variables that point
to the other components of the SGA, and variables
that contain the values of various parameters.
10
Server Process - Dedicated
Remote Execution – It is
very natural for the client
application to be executing on
a machine other than the
database itself.
Address Space Isolation –
The server process has read-
write access to the SGA. An
errant pointer in a client
process could easily corrupt
data structures in the SGA, if
the client process and server
process were physically linked
together.
Process control via OS.
Suitable for long sessions.
11
Server Process - MTS
Reduces the number of
OS processes/threads - In
a typical system, only a
fraction of the thousands of
users are concurrently active
at any point in time. (50 out
of 5000)
Allows you to artificially
limit the degree of
concurrency
Reduces the memory
needed on the system
Suitable for short
sessions.
12
Focused Background Processes
13
Selected Background Processes
PMON – The Process Monitor
This process is responsible for cleaning up after abnormally
terminated connections.
SMON – The System Monitor
Temporary space clean up
Crash recovery
Coalescing free space
Recovering transactions active against unavailable files
Instance recovery of failed node in OPS
Cleans up OBJ$ – a low-level data dictionary table
RECO – Distributed Database Recovery
It recovers transactions that are left in a prepared state because of a
crash or loss of connection during a two-phase commit (2PC).
14
Selected Background Processes
CKPT – Checkpoint Process
Assists DBWn by updating file headers.
DBWn – Database Block Writer
The background process responsible for writing dirty blocks to disk.
LGWR – Log Writer
The LGWR process is responsible for flushing to disk the contents
of the redo log buffer, located in the SGA.
ARCn – Archive Process
The job of the ARCn process is to copy an online redo log file to
another location when LGWR fills it up.
Other Utility Processes
Job Queues, Advanced Queues, Event Monitor Processes, Memory
Manager, Manageability Monitors, Change Tracking Processes,
Recovery Writer.
15