IBM 5655-DB2 Server User Manual


 
© Copyright IBM Corp. 1999 103
Chapter 10. DB2 I/O Operations
The information shown here is extracted and modified from different sections of
the
DB2 UDB for OS/390 V6 Administration Guide, SC26-8957. This information
is provided to give storage administrators an understanding of the I/O operations
performed by DB2.
The two most important I/O operations performed by DB2 are the data read I/O
and the log write I/O. The data read I/O has direct impact on the response time of
any SQL query. The log write I/O has an important impact on online transaction
response time. This chapter will describe the following I/O operations in detail:
Data I/O: read and write accesses to DB2 table spaces and index spaces
Log I/O: read and write accesses to the active log.
Other I/O operations are performed by DB2, like access to image copies, archive
logs, and BSDSs. These I/O operations are not described in this chapter.
10.1 Avoiding I/O Operations
One of the basic principles of DB2 design is to avoid I/O operations if at all
possible. As Roger Miller, DB2 Lead Architect, often says: "
The best I/O is the
one which is avoided completely, the second best is the one that does not go to
the disk - just to the cache."
DB2 tries to achieve this, using a hierarchy of buffer pools to keep data in
memory. Modern disk devices complement this by having large caches which
give an additional level of intermediate data storage. This storage hierarchy is
illustrated in Figure 32 on page 104.
DB2 uses virtual buffer pools to store the data pages. The virtual buffer pools are
optionally backed up by hiper pools. When data sharing is used, group buffer
pools in the coupling facility store updated pages before these are cast out to
disk. Pages in the group buffer pool can be accessed from any member of the
data sharing group.
In addition to the caching done by DB2, the storage controller also uses a cache
for data. The controller has algorithms to determine the convenience of
pre-staging the data to the cache. For example, if several sequential reads are
detected, the controller reads tracks ahead of the requests in order to to improve
the cache hit ratio.
With DB2 V6, the hierarchy shown in Figure 32 is extended to include virtual
buffer pools in data spaces. For more details, refer to
DB2 UDB for OS/390
Version 6 Performance Topics,
SG24-5351.