DB2 Version 10.1 for Linux, UNIX, and Windows

Improving update performance

When an agent updates a page, the database manager uses a protocol to minimize the I/O that is required by the transaction and to ensure recoverability.

This protocol includes the following steps:
  1. The page that is to be updated is pinned and latched with an exclusive lock. A log record is written to the log buffer, describing how to undo and redo the change. As part of this action, a log sequence number (LSN) is obtained and stored in the header of the page that is being updated.
  2. The update is applied to the page.
  3. The page is unlatched. The page is considered to be "dirty", because changes to the page have not yet been written to disk.
  4. The log buffer is updated. Both data in the log buffer and the dirty data page are written to disk.
For better performance, these I/O operations are delayed until there is a lull in system load, or until they are necessary to ensure recoverability or to limit recovery time. More specifically, a dirty page is written to disk when: