最近一直再研究Buffer Cache Hit Ratio 。有个问题到现在都没有搞清楚，why Buffer Cache Hit Ratio < 0。
It is possible for both the 'buffer hit ratio' to be negative. In the case of the buffer hit ration, the buffer cache is too small and the data in is being aged out before it can be used so it must be retrieved again. This is a form. of thrashing which degrades performance immensely.
Performance Tuning Guide 10g Release 2 (10.2)
Calculating the Buffer Cache Hit Ratio
The buffer cache hit ratio calculates how often a requested block has been found in the buffer cache without requiring disk access. This ratio is computed using data selected from the dynamic performance view V$SYSSTAT.
consistent gets from cache: Number of times a consistent read was requested for a block from the buffer cache.
db block gets from cache: Number of times a CURRENT block was requested from the buffer cache.
physical reads cache: Total number of data blocks read from disk into buffer cache.
SELECT NAME, VALUE
WHERE NAME IN ('db block gets from cache', 'consistent gets from cache', 'physical reads cache');
Using the values in the output of the query, calculate the hit ratio for the buffer cache with the following formula:
1 - (('physical reads cache') / ('consistent gets from cache' + 'db block gets from cache')
Buffer Pool Hit Ratios
The data in V$SYSSTAT reflects the logical and physical reads for all buffer pools (by setting
the BUFFER_POOL_KEEP or BUFFER_POOL_RECYCLE init.ora parameters)
within one set of statistics. To determine the hit ratio for the buffer pools individually, query the V$BUFFER_POOL_STATISTICS view. This view maintains statistics for each pool on the number of logical reads and writes.
The buffer pool hit ratio can be determined using the following formula:
1 - (physical_reads/(db_block_gets + consistent_gets))
The ratio can be calculated with the following query:
SELECT NAME, PHYSICAL_READS, DB_BLOCK_GETS, CONSISTENT_GETS,
1 - (PHYSICAL_READS / (DB_BLOCK_GETS + CONSISTENT_GETS)) "Hit Ratio"
在什么情况下用V$SYSSTAT？什么情况下用V$BUFFER_POOL_STATISTICS？为什么Buffer Pool Hit Ratios<0？
Subject: STATISTIC "cache hit ratio" - Reference Note
Doc ID: 33883.1 Type: REFERENCE
Modified Date : 12-FEB-2004 Status: PUBLISHED
来自 “ ITPUB博客 ” ，链接：http://blog.itpub.net/9252210/viewspace-606087/，如需转载，请注明出处，否则将追究法律责任。