Changing the wash area for a memory pool

When Adaptive server needs to read a buffer into cache, it places the buffer:

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 19-4 illustrates how the wash area of a buffer pool works with a strict and relaxed LRU cache.

Figure 19-4: Wash area of a buffer pool

By default, the size of the wash area for a memory pool is configured as follows:

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.