Kbase P24108: How to view buffer hit ratio via Promon
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  24/04/2009 |
|
Status: Verified
GOAL:
How can I view database buffer hit ratio?
GOAL:
What is a Buffer hit and How can I view it?
FIX:
A buffer hit occurs when a database block requested by a client is found already in the database memory pool rather than having to read it from disk. 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.
When a process needs to read a database record, it requests access to the record. The database engine searches the buffer pool for the requested record. 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. 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. If no empty buffer is available, the engine must replace another buffer to make room for it. If the block that will be evicted 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 Step 1 must wait. For this reason, performance is improved if empty buffers are always available.
The promon utility can be used to determine the current buffer hit ratio of the database. Try to have a buffer hit ratio of between 90% and 95%. To start Promon by entering the following command:
promon <dbname>
The Promon main menu appears as shown below:
PROGRESS MONITOR Version 9
Database: <database name>
1. User Control
2. Locking and Waiting Statistics
3. Block Access
4. Record Locking Table
5. Activity
6. Shared Resources
7. Database Status
8. Shut Down Database
T. Transactions Control
L. Resolve Limbo Transactions
C. Coordinator Information
M. Modify Defaults
Q. Quit
Enter your selection:
Enter option #5 - Activity. This option will display general information about database activity. Read from the bottom of the display screen. The sixth line up will have an entry of Buffer Hits. The first menu displays a calculation from the time the database was started. To obtain the Buffer Hits at this moment refresh the screen by pressing the Enter key.