Re: Keeping clean pages in shared memory
Posted in 1995
Raj Gopalakrishna writes: |> Page Cleaners and Checkpoints definitely influence cache flushing. |> By setting a low value for LRU_MIN_DIRTY, you cause excessive page |> cleaning activity. This may not be a good idea as it effectively reduces |> the effectiveness and size of the cache. I mention size of the cache |> because everytime the MIN_DIRTY threshold is reached some page cleaners |> are kicked in to start flushing pages and this artificially reduces the |> size of the cache. This rides on the FALSE assumption that "flushing" a page removes it from the buffer cache. In fact, it simply updates the page on disk to reflect the state of the page in memory. LRU cleaning has no discernable effect on cacheing. Rather, the point is to reduce checkpoint duration, which is directly related to the number of dirty pages in the cache. The more pages that are dirty, the longer the checkpoint will take. By setting LRU_MAX_DIRTY, you are essentially defining the maximum number of pages that would ever have to be written during a checkpoint. Since a checkpoint causes all other activity to halt until it is complete, it has a MAJOR impact on performance. For max performance relative to this, set LRU_MAX_DIRTY low (no higher than 10%), make your physical log as large as you can, and set your checkpoint interval to be huge. Let filling up the physlog drive the checkpoints. The major downsides to this are: 1) the length of time it will take to perform fast recivery in the case of a crash; and 2) how long it will take for logical logs to be freed (assuming you are doing logging). These two costs can be used to decine exactly how large your plog should be. |> Secondly, page cleaner flushes are not sorted but asynch. writes. |> |> On the other hand, checkpoints are sorted, synchronous writes. As of 7.10, LRU writes are also sorted. All writes are asynchronous to the user. If aync i/o (that is, kernel async i/o) is used for your port, all i/o is async in that respect. Dave Kosenko Disclaimer: All opinions expressed in this message are well-reasoned and insightful; needless to say, they are not those of Informix Software, its partners or lackeys. Anyone who says otherwise is itching for a fight. **************************************************************************** "I look back with some satisfaction on what an idiot I was when I was 25, but when I do that, I'm assuming I'm no longer an idiot." - Andy Rooney