©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 operationsperformed 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 wr ite 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 wr ite accesses to DB2 table spaces and index spaces
• Log I/O: read and wr ite 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 AvoidingI/O Op erations

One of the basic principles of DB2 design is to avoid I/O operations if at all
possible. AsRoger M iller,DB2 Lead Architect, often says: "The bes t 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 achievethis, using a hierarchy of buffer pools to keep data in
memory. Moder ndis k devicescomplement this by having large caches which
give an additional levelof intermediate data storage. This storage hierarchy is
illustrated in Figure 32 on page 104.
DB2 uses virtual bufferpools 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 severalsequential r eads 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. Form ore details, referto DB2 UDB forOS/390
Version6 Performance Topics, SG24-5351.