Number of LRU queues to configure

Multiple LRU queues reduce user-thread contention and allow multiple cleaners to flush pages from the queues so that the percentage of dirty pages is maintained at an acceptable level.

Initial values for the LRUs are recommended based on the number of CPUs that are available on your computer. If your computer is a uniprocessor, start by setting the lrus value in the BUFFERPOOL configuration parameter to 4. If your computer is a multiprocessor, use the following formula:
LRUS = max(4, (number_CPU_VPs))
You specify the number of LRU queues by setting the lrus value in the BUFFERPOOL configuration parameter. The default number of LRU queues depends on the number of CPUs on your computer:
  • If you have a uniprocessor computer, the default value of the lrus field is 8.
  • If you have a multiprocessor computer and the MULTIPROCESSOR configuration parameter is enabled, the default value of the lrus field is the greater of 8 or the number of CPU virtual processors.

After you provide an initial value for the lrus field in the BUFFERPOOL configuration parameter, monitor your LRU queues with the onstat -R command. If you find that the percentage of dirty LRU queues consistently exceeds the value of the lru_max_dirty field in the BUFFERPOOL configuration parameter, increase the value of the lrus field to add more LRU queues.

For example, if the value of the lru_max_dirty field is 70 and your LRU queues are consistently 75 percent dirty, you can increase the value of the lrus field. If you increase the number of LRU queues, you shorten the length of the queues, which reduces the work of the page cleaners. However, you must allocate enough page cleaners with the CLEANERS configuration parameter.