Page cleaner configuration
Posted in 1999
Topics: Storage & Space Management
I have heard that you should set the CLEANERS configuration variable equal to the LRUS variable. I have also heard that you should set CLEANERS equal to the number of chunks in the instance. Which is it?
Top Cat wrote: > > I have heard that you should set the CLEANERS configuration variable equal > to the LRUS variable. I have also heard that you should set CLEANERS equal > to the number of chunks in the instance. Which is it? WELLLLLL..... There are several reasons for the descrepancy: o Differences of opinion from different sources. I say CLEANER >= LRUS, some others, including the manual, differ o Difference of whether you tune for LRU Writes or Chunk Writes. For chunk writes, at checkpoint time, the engine collects all dirty buffers and by chunk and when it has enough (there is a threshold value) it launches a cleaner to write those pages and goes back to collecting for the next chunk. Therefore the engine MAY try to launch one cleaner for each chunk so having that number MAY, some believe, speed checkpoints. I believe it is unlikely that all those cleaners will still be busy when the 33rd+ batch of buffers is launched if you only have 32 LRUS and CLEANERS. HOWEVER, it is possible so if you tune for Chunk Writes you should consider this. For LRU Write tuning, ie so most writes happen when the LRU queues reach LRU_MAX_DIRTY rather than at checkpoint time, there will never be more than LRUS number of active CLEANERS since only one cleaner is ever launched to clean any LRU queue. Now if you tune for LRU Writes then the number of dirty buffers is very small at checkpoint time and there will never be very many active cleaner threads during a checkpoint so even as many as the number of LRUS is not needed then. One could make an argument that the number of active cleaners during LRU write activity should also always be less than LRUS and I cannot argue strongly I just have always seen best performance when CLEANERS >= LRUS. For a balance: If you have fewer LRUS than chunks add a few more CLEANERS above the number of LRUS, it couldn't hurt! If you have MORE LRUS than chunks, not as strange as it sounds, you may try living with a FEW fewer CLEANERS than LRUS but not too many fewer. o Differece depending on your transaction load. If you have a high transaction load you will keep the cleaners busier during checkpoints and therefore need more cleaner threads to get the job done quickly. Even at LRU time there will be more LRU flushing at any one moment with higher activity and so having CLEANERS = LRUS is even more important. If your activity level is less you can live easier and shave a few off the number of CLEANERS buying into the "I will never need them all anyway!" school. So there is the debate. I hope I have presented all sides fairly. This ignores the whole issue of why/when/whether to tune for LRU or Chunk Writes in the first place. Art S. Kagel