LRU tuning
The LRU settings for flushing each buffer pool between checkpoints are not critical to checkpoint performance. The LRU settings are necessary only for maintaining enough clean pages for page replacement.
The default settings for LRU flushing are 50 percent for lru_min_dirty and 60 percent for lru_max_dirty.
If your database server has been configured for more aggressive LRU flushing because of checkpoint performance, you can decrease the LRU flushing at least to the default values.
The database server automatically tunes LRU flushing when the AUTO_LRU_TUNING configuration parameter is on and in the following cases:
- A page replacement is forced to perform a foreground write in order to find an empty page. In this case, LRU flushing is adjusted to be 5 percent more aggressive for the specific bufferpool where the foreground write took place.
- A page replacement is forced to use a buffer that is marked as high priority, meaning it is frequently accessed. In this case, LRU flushing is adjusted to be one (1) percent more aggressive for the specific bufferpool where the page replacement using high priority buffer took place.
- If the RTO_SERVER_RESTART configuration parameter is on and the time it takes to flush the bufferpool is longer than the recovery time objective, LRU flushing is adjusted to be 10 percent more aggressive for all bufferpools.
After a checkpoint has occurred, if a page replacement performed
a foreground write during the previous checkpoint interval, the database
server increases the LRU settings by 5 percent and continues to increase
the LRU flushing at each subsequent checkpoint until the foreground
write stops or until the lru_max_dirty for a given buffer pool
falls below 10 percent. For example, if a page replacement performs
a foreground write and the LRU settings for a buffer pool are 80
and 90
,
the database server adjusts these to 76
and 85.5
.
In addition to foreground writes, LRU flushing is tuned more aggressively whenever a page fault replaces high priority buffers and non-high priority buffers are on the modified LRU queue. Automatic LRU adjustments only make LRU flushing more aggressive; they do not decrease LRU flushing. Automatic LRU adjustments are not permanent and are not recorded in the ONCONFIG file.
LRU flushing is reset to the values contained in the ONCONFIG file on which the database server starts.
The AUTO_LRU_TUNING configuration parameter specifies whether automatic LRU tuning is enabled or disabled when the server starts.