onstat -R LRU Queues

The onstat -R command displays the current status of the LRU queues. The buffer pool is broken into a
series of queues to improve accessibility and reduce buffer contention, with each LRU queue being further
broken down into a free/clean side (FLRU) and a modified side (MLRU).

Summary Definitions

The total number of pages queued into the LRUs. This number won’t necessarily match BUFFERS.

total

The total number of buffer pages assigned to the LRU queue (same as BUFFERS).

hash buckets

The number of hash buckets created to track the pages placed into the buffer pool.

buffer size

The size of a single page within this OnLine instance. Page sizes can be 2K or 4K based on the port.

start clean

Is the value specified in the lru_max_dirty field of the BUFFERPOOL configuration parameter

stop at

Is the value specified in the lru_min_dirty field of the BUFFERPOOL configuration parameter

priority downgrades

The number of buffers that have been downgraded from a higher priority queue to a lower priority queue.

priority upgrades

The number of buffers that have been upgraded from a lower priority queue to a higher priority queue.

Notes

The onstat -R command is not included as part of the onstat -a output.

A free page is one that has not been used. A clean page is free page that has had a page written to it, but
not modified. A dirty page is a clean page that has had modifications made to it.

Pages can migrate amongst the LRU queues. For this reason, the number queued and the total number of buffers
may not always correspond. In addition, the number of buffer pages per LRU queue may become slightly unbalanced.

Each LRU queue is divided up into four separate priority queues: LOW, MED_LOW, MED_HIGH
and HIGH.

Pages with a priority of HIGH are considered last for page replacement; pages with a priority of LOW
are considered first for page replacement. Page replacement priorities are utilized when no free pages
exist in the buffer pool.

Priorities are part of the Dynamic Buffer Management API incorporated into the server.

Monitoring and Tuning

Upon startup, OnLine will divide the number of pages in the buffer pool among the LRU queues as evenly as possible.
The LRU queues are designed to help reduce contention among active threads within the same OnLine instance.
In addition, they assist in reducing the processing load required for a checkpoint. When the LRU_MAX_DIRTY
percentage of pages for an LRU is exceeded, a page cleaner is assigned to the LRU to begin flushing dirty pages
out to disk until only the LRU_MIN_DIRTY percentage of pages remains in the queue.

Setting the value for LRU_MIN_DIRTY and LRU_MAX_DIRTY should be driven by the length of the system
checkpoints. If the checkpoint duration is too long, it can possibly be reduced by lowering the values for
LRU_MIN_DIRTY and LRU_MAX_DIRTY. This will reduce the overall number of dirty pages remaining in the buffer pool.

Tuning the value for LRUS, which defaults to 8, depends on whether the tuning is being performed to reduce
buffer contention or reduce checkpoint duration.

There is no metric to determine that they are too few LRUS, but LRU contention can be tested via
onstat -g spi. If there is contention you need more LRUs.
Contention is the ratio of the total spin waits and the sum of the page reads and bufferwrits
[onstat -p.