 |
|
EnterpriseDB Server Architecture
Oracle Tips by Burleson Consulting
|
In this
section, I am going to describe some of the internals about how
EnterpriseDB works. I will talk about things that are uniquely
EnterpriseDB but I will also compare some features to Oracle. I think
having something to compare with makes it easier to understand.
I am going to
purposely keep this at somewhat of a high-level. I want you to understand how
the system is put together but I don’t expect you to start hacking it.
In Oracle
parlance, a database is a set of data files and an instance is an actual running
system (processes and memory structures). To most non-Oracle technicians and
laypersons, a database is a combination of database and instance. For our
purposes here, I don’t see any reason to distinguish between them.
A Look at Oracle's
Architecture
An Oracle database
is comprised of a set of data (stored in data files) and a set of processes that
run in the background (an instance). In Figure 2.34, I show some of the Oracle
background processes that have a corresponding function in EnterpriseDB.
Figure 2.34:
Simplified Oracle Architecture
I purposely left
off the Oracle Process Monitor (PMON). PMON cleans up abandoned or failed user
sessions. The way EnterpriseDB is designed removes the need for a PMON process.
Note that in
MS-Windows, all of these processes run under a single Oracle.exe process. If
you kill Oracle.exe, you kill all processes (including user processes).
Here is a very
quick run down of the processes in Figure 2.34.
Checkpoint (CKPT)
& DB Writer (DBWn): CKPT and DBW are the processes that make sure your data
is written to the file system (in the form of the database data files). This
process is called “writing dirty buffers to disk”.
User Session:
This is an actual client connection. There is memory associated with the
session.
SMON: SMON,
or the System Monitor, is responsible for crash recovery. It also runs in the
background and cleans up temporary segments.
SGA:
The SGA is the main memory area of an Oracle instance. SGA stands for System
Global Area. The SGA stores the BUFFER CACHE and other memory structures.
Buffer Cache:
A buffer cache is a memory area that holds recently accessed data blocks
(recently used rows of data). Oracle keeps the blocks in memory in case the
same records need to be accessed again. Keeping the blocks in memory
theoretically helps with performance.
LGWR: The
Log Writer flushes data from an internal log buffer to the REDO log on disk.
REDO Logs:
A REDO log holds a copy of every transaction run through the database. The REDO
log is used to recover a database in case the database loses a data file or has
a hard disk crash.
ARCn: The
ARC, or Archiving, process makes sure that redo logs do not get over-written.
When this is running, your database is considered to be in Archive Log mode. As
the REDO logs get full, the database will round robin to the next REDO file. In
Archive Log mode, as the files are filled, they are archived to a safe
location. You want to archive your log files to ensure your database is
recoverable in the event of catastrophic failure.
This is an excerpt
from the book "EnterpriseDB: The Definitive Reference" by Rampant TechPress.