Download PDF (1.3 MB) - IBM Redbooks
Download PDF (1.3 MB) - IBM Redbooks
Download PDF (1.3 MB) - IBM Redbooks
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
4.13 General database tuning<br />
This section provides general tuning hints for databases.<br />
4.13.1 Providing adequate statistics for optimization<br />
Databases usually offer a wide variety of available choices when determining the best<br />
approach to access data. Statistics, which describe the shape of the data, are used to guide<br />
the selection of a low-cost data access strategy. Statistics are maintained in tables and<br />
indexes. Examples of statistics include the number of rows in a table and the number of<br />
distinct values in a certain column.<br />
Gathering statistics can be expensive, but fortunately, for many workloads, a set of<br />
representative statistics allows for good performance over a large span of time. Refreshing<br />
statistics periodically if the data population shifts dramatically might be necessary.<br />
4.13.2 Placing database log files on a fast disk subsystem<br />
Databases are designed for high availability, transactional processing, and recoverability. For<br />
performance reasons, changes made to table data might not be written immediately to disk.<br />
These changes can be recovered if they are written to the database log. Updates are made to<br />
database log files when the log buffer fills, at transaction-commit time, and for some<br />
implementations after a maximum interval of time.<br />
As a result, database log files might be heavily used. More important, the log-writes hold<br />
commit operations pending, meaning that the application is synchronously waiting for the<br />
write to complete. Therefore, the performance of write access to the database log files is<br />
critical to overall system performance. For this reason, we suggest that database log files be<br />
placed on a fast disk subsystem with write-back cache.<br />
4.13.3 Placing logs on a separate device from the table space containers<br />
A basic strategy for all database storage configurations is to place the database logs on<br />
dedicated physical disks, ideally on a dedicated disk adapter. This placement reduces disk<br />
access contention between I/O to the table space containers and I/O to the database logs<br />
and preserves the mostly sequential access pattern of the log stream. Such separation also<br />
improves recoverability when log archival is employed.<br />
4.13.4 Providing sufficient physical memory<br />
Accessing data in memory is much faster than reading it from disk. Because 64-bit hardware<br />
is readily available and memory prices continue to fall, the sensible approach is to provision<br />
enough memory to avoid most disk reads in steady state for many performance-critical<br />
workloads.<br />
Be careful to avoid virtual memory paging in the database machine. The database manages<br />
its memory with the assumption that it is never paged and does not cooperate well if the<br />
operating system swaps some of its pages to disk.<br />
80 <strong>IBM</strong> Business Process Manager V8.0 Performance Tuning and Best Practices