When Adaptive Server needs to read a buffer into cache, it places the buffer:
At the LRU (least recently used) end of each memory pool, in a cache with strict LRU policy.
At the victim pointer, in a cache with relaxed LRU policy. If the recently used bit of buffer at the victim marker is set, the victim pointer is moved to the next buffer in the pool.
A portion of each pool is configured as the wash area. After dirty pages (pages that have been changed in cache) pass the wash marker and enter the wash area, Adaptive Server starts an asynchronous I/O on the page. When the write completes, the page is marked clean and remains available in the cache.
The space in the wash area must be large enough so that the I/O on the buffer can complete before the page needs to be replaced. Figure 4-2 illustrates how the wash area of a buffer pool works with a strict and relaxed LRU cache.
Figure 4-2: Wash area of a buffer pool
By default, the size of the wash area for a memory pool is configured as follows:
If the pool size is less than 300MB, the default wash size is 20 percent of the buffers in the pool.
If the pool size is greater than 300MB, the default wash size is 20 percent of the number of buffers in 300MB.
The minimum wash size is 10 buffers. The maximum size of the wash area is 80 percent of the pool size.
A buffer is a block of pages that matches the I/O size for the pool. Each buffer is treated as a unit: all pages in the buffer are read into cache, written to disk, and aged in the cache as a unit. For the size of the block, multiply the number of buffers by the pool size—for a 2K pool, 256 buffers equals 512K; for a 16K pool, 256 buffers equals 4096K.
For example, if you configure a 16K pool with 1MB of space, the pool has 64 buffers; 20 percent of 64 is 12.8. This is rounded down to 12 buffers, or 192K, are allocated to the wash area.