Try OpenEdge Now
skip to main content
Database Administration
Maintaining and Monitoring Your Database : Managing Performance : Server performance factors : Database I/O : Database buffers
 
Database buffers
A database buffer is a temporary storage area in memory used to hold a copy of a database block. When the database engine reads a database record, it stores the block that contains that record in a database buffer. Database buffers are grouped in an area of memory called the buffer pool. The following figure illustrates database disk I/O.
Figure 29. Database I/O
Database I/O works as follows:
1. When a process needs to read a database record, it requests access to the record.
2. The database engine searches the buffer pool for the requested record.
3. If the block that holds the record is already stored in a buffer, the engine reads the record from the buffer. This is called a buffer hit. When tuned correctly, the engine should achieve a buffer hit most of the time.
4. If the record is not found in any buffer, the engine must read the record from disk into a buffer. If an empty buffer is available, the engine reads the record into that buffer.
5. If no empty buffer is available, the engine must replace another buffer to make room for it.
6. If the block that will be replace has been modified, the engine must write the block to disk to save the changes. This is known as an eviction. While the eviction takes place, the process that requested the record in must wait. For this reason, performance is improved if empty buffers are always available. See How the database engine writes modified buffers for detailed steps.
The following figure illustrates how the engine reads a database record into a buffer.
Figure 30. Reads and writes to database buffers