CMS Redbook Overview

Page 40

SOFTMAX parameter. Page cleaners will be idle for some period of time while no LSN gap is occurring. Then, when an LSN gap occurs, the page cleaners are activated to write a large number of pages before going back to sleep. This can result in the saturation of the I/O subsystem, which then affects other agents that are reading or writing pages. Furthermore, by the time an LSN gap is triggered, it is possible that the page cleaners will not be able to clean fast enough and DB2 might run out of log space. The alternate method of page cleaning modulates this behavior by spreading out the same number of writes over a greater period of time. The cleaners do this by proactively cleaning not only the pages that are currently in an LSN gap situation, but also the pages that will come into an LSN gap situation soon, based on the current level of activity. To use the new method of page cleaning, set the DB2_USE_ALTERNATIVE_PAGE_CLEANING registry variable to ON.

Log processing and loggers All databases maintain log files that keep records of database changes. All changes to regular data and index pages are written as a log record into a log buffer. The data in the log buffer is written to disk by the logger process. To optimize performance, neither the updated data pages in the buffer pool nor the log records in the log buffer are written to disk immediately. They are asynchronously written to disk by page cleaners and the logger, respectively. The logger and the buffer pool manager cooperate and ensure that an updated data page is not written to disk storage before its associated log record is written to the log. This ensures database recovery to a consistent state from the log in the event of a crash such as a power failure. There are two logging strategy choices: Circular logging, in which the log records fill the log files and then overwrite the initial log records in the initial log file. The overwritten log records are not recoverable. For example, assume that a database has a circular logging strategy using five log files. When the fifth log file becomes full, logging would continue against the first log file, overwriting the file’s original contents. Retain log records, in which a log file is archived when it fills with log records. New log files are made available for log records. Retaining log files enables roll-forward recovery. Roll-forward recovery reapplies changes to the database based on completed units of work (transactions) that are recorded in the log. You can specify that roll-forward recovery is to the end of the logs, or to a particular point in time before the end of the logs.

Chapter 2. Content Manager base products

33


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.