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).
Buffer pool page size: 2048 32 buffer LRU queue pairs priority levels # f/m pair total % of length LOW HIGH 0 f 93736 99.9% 93626 83079 10547 1 m 0.1% 110 67 43 2 f 93759 99.9% 93661 83114 10547 3 m 0.1% 98 50 48 4 f 93751 99.9% 93628 83081 10547 5 m 0.1% 123 71 52 6 f 93760 99.9% 93664 83117 10547 7 m 0.1% 96 52 44 ..... 62 f 93753 99.9% 93655 83108 10547 63 m 0.1% 98 53 45 3361 dirty, 3000000 queued, 3000000 total, 4194304 hash buckets, 2048 buffer size start clean at 60.000% (of pair total) dirty, or 56250 buffs dirty, stop at 50.000% Buffer pool page size: 16384 32 buffer LRU queue pairs priority levels # f/m pair total % of length LOW HIGH 0 f 15625 97.2% 15194 14412 782 1 m 2.8% 431 228 203 2 f 15624 97.0% 15149 14370 779 3 m 3.0% 475 214 261 4 f 15625 97.2% 15186 14453 733 5 m 2.8% 439 199 240 6 f 15625 96.9% 15135 14327 808 7 m 3.1% 490 241 249 .... 62 f 15625 96.9% 15148 14326 822 63 m 3.1% 477 229 248 15094 dirty, 500000 queued, 500000 total, 524288 hash buckets, 16384 buffer size start clean at 60.000% (of pair total) dirty, or 9374 buffs dirty, stop at 50.000% </div>
Output Description
| Heading | Description | Format | See Also |
|---|---|---|---|
| Buffer pool page size | Is the page size of the buffer pool in bytes | Int | |
| # | The LRU number (sequentially assigned). Each LRU is paired into a modified (MLRU) and free/clean side (FLRU). | Dec | |
| f/m | Describes the LRU queue type using the following coded values:
f Free FLRU queue F Free FLRU with fewest buffers. m MRU queue M MRU is currently being cleaned by flusher </div> |
Str | onstat -F |
| pair total | The number of buffers currently assigned to this queue. | Dec | |
| %of | The percentage of the LRU this element of the pair represents. | Flt | |
| length | The total number of buffers on this LRU queue. | Dec | |
| LOW | The number of buffers on the low priority queue. | Dec | |
| MED_LOW | The number of buffers on the medium low priority queue. | Dec | |
| MED_HIGH | The number of buffers on the medium high priority queue. | Dec | |
| HIGH | The number of buffers on the high priority queue. | Dec |
Summary Definitions
| Label | Description |
|---|---|
| dirty | The total number of dirty pages within the LRUs. |
| queued | 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.
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.
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.