
Maximizing Performance of IBM DB2 Backups 1
®
Maximizing Performance of IBM DB2 Backups
This IBM
Redbooks
Analytics Support Web Doc describes how to maximize the performance of IBM
DB2
backups.
Backing up a database is a critical part of any disaster recovery plan. Making sure that the backup
completes in a reasonable time frame means that there is always a valid backup available in case of
emergency. This document describes the following elements that are critical to good backup
performance:
The backup process model
z
Basic backup performance concepts
z
Backup performance considerations
z
Monitoring backup performance with the
DB2_BAR_STATS
registry variable
z
This document applies to all versions of DB2 for Linux, UNIX, and Windows.
The backup process model
The backup process model consists of the engine dispatchable units (EDUs)
db2agent
,
db2bm
, and
db2med. If the backup uses a storage manager, an additional db2vend process is created. The
db2agent EDU does most of its work during the start of the backup, and then waits for the backup to
complete. The tasks that it performs include the following actions:
Calculate and create an optimal number of
db2bm
and
db2med
EDUs
z
Allocate an optimal number of optimally sized backup buffers
z
Display the selected tunable values to the
db2diag.log
z
Allocate message queues for inter-EDU communication
z
Create a list of table spaces that are sorted by decreasing size
z
Coordinate the backup process by sending control messages to the
db2bm
and
db2med
EDUs
z
The
db2bm
EDU acquires a backup buffer from the empty queue, and then fills the buffer by reading data
from its assigned table space. The db2bm then places the backup buffer on the full queue to be written to
the backup device by the db2med EDU.
The
db2med
EDU is responsible for acquiring a backup buffer from the full queue and writing it to the
backup device. If the backup is being written to disk, it handles the input/output (I/O) directly. If the backup
is being written to a storage manager, it transfers the full buffer to the db2vend process. After
confirmation that the db2vend process successfully saved the contents of the buffer, the db2med EDU
returns the backup buffer to an empty queue for reuse by the next db2bm EDU.
The
db2vend
process is created by the
db2med
EDU if a storage manager is being used. The
db2vend
process receives a full buffer from the db2med, and calls the appropriate vendor application programming
interface (API) for sending the data to the storage manager. A separate process is used so that any crash
or abnormal failure during interaction with the storage manager terminates only the db2vend process,
and does not negatively affect the stability of the DB2 instance.
评论