Loading...

Best Practices - DB2 Agent

Table of Contents

Creating Subclients

Reconfiguring the Default Subclient Content

Retention Cycles and Scheduling

Key Performance Tuning Parameters and Their Recommended Uses

Disabling Optimization for Restores from a Tape Library

Excluding Logs from Backup Images

Run a Full CommCell Console GUI Backup after Changing a Database's Table Spaces

Creating Subclients

Each Commvault backup set represents a DB2 database. You can create subclients for each backup set. Consider the following recommendations when you plan your subclients:

  • Create separate subclients for your traditional and IntelliSnap backups.
  • Create separate subclients to backup data that undergo frequent changes.

    For example, if the EXAMPLE and USERS dbspaces frequently change, you can create a separate subclient for each tablespace.

    Example:

    User-defined subclient: Test1

    Content: EXAMPLE

    User-defined subclient: Test2

    Content: USERS

  • Create a separate user-defined subclient for the log files on the client.

These recommendations can help improve backup performance by organizing the workload on the client into logical groupings.

Reconfiguring the Default Subclient Content

We recommend that you do not re-configure the content of a default subclient because this would disable its capability to serve as a catch-all entity for client data. As a result, some data will not get backed up or scanned.

Retention Cycles and Scheduling

For easier management, create one schedule for your full and incremental backups, and a separate schedule for your log backups.

If the reason that you want to create separate subclients is that you have different retention needs, then you can simplify your subclient strategy by retaining full backups for a longer period by using selective copies. For more information, see Selective Copy - Overview.

To simplify your parallel cycle strategy, start a new cycle when you run a full backup on another monthly full subclient.

Key Performance Tuning Parameters and Their Recommended Uses

The following options are available for enhancing the backup performance and reducing the network bandwidth used for performing the backups.

  • The number of streams
  • The buffer size
  • The buffer number
  • Parallelism

The configured values have a direct impact on the DB2 performance. The DB2 client computer must also be considered when you assign values to these parameters.

When you set the values to a higher number, the operations use more of the client computer memory. The performance is reduced on computers that cannot handle higher memory usage.

Specifying the Number of Streams (Open n Sessions)

If specified, the backup process will open n number of I/O sessions to the Commvault MediaAgent to send the data to storage media.

The number of sessions is limited by the number of streams configured at the storage policy level. If the tape drives are not available at Commvault media library when a backup is directed to the tape storage pool, some of the sessions will have to wait until the tape mounts are free and available again.

Specifying the Number of Buffers for the Backups

When you backup the database to multiple locations, you can give sufficient buffer value to improve the backup performance. The default value is 2.

The number of buffers should be:

#sessions + #parallelism +2.

Also, the following calculation must fit:

(number of buffers * buffer-size) < UTIL_HEAP_SZ (UTIL_HEAP_SZ is the database utility heap size).

Specifying the Buffer Size

This software uses this value for the buffer allocation size when you build the backup image.

When you back up a database, the data is first copied to an internal buffer. Data is then written from this buffer to the backup media when the buffer is full. Tuning BACKBUFSZ can help improve the performance of the Commvault backup utility as well as minimize the impact on the performance of other concurrent database operations.

If you want to have the DB2 software determine the buffer size, set the value to 0. If you do not set it to 0, the minimum value that you can enter is 8.

Use a buffer size that is a multiple of the extent size. If multiple table spaces have different extent sizes, the buffer size value must be a multiple of the largest extent size.

Configuring the Parallelism for Backups and Restores

Note: If you use deduplication, set the Parallelism value to 0.

If the DB2 database contains large number of tablespaces and indexes, you can perform backups and restores faster when you set a maximum number of concurrent parallelism queries to take advantage of available Input/Output bandwidth and processor power of DB2 server. DB2's query parallelism targets Input/Output intensive queries for example, tablespace scans, large index scans etc.) and CPU intensive queries (for example, joins, sorts, complex expressions etc.). If the number is not set, the optimal value is automatically chosen. When you set this parameter, it can reduce the time required to complete the backup (specially, if the backup is going to a disk).

This parameter defines the number (n) of processes that are started to read the data from the database. A specific table space is assigned to backup as part of each process. When it completes the tablespace backup, it requests another. If you are trying to backup to different targets (for example, using multiple sessions to send the data), parallelism should not be greater than the number of targets (sessions).

Modifying the Threshold Value for Faster Log Retrieval

Set the sDb2ThresholdALFN Additional Setting to the 25 logs for each log backup. This reduces the number of logs scanned for each log backup and ensures a faster log retrieval.

Configuring the DB2 Archive Path, DB2 Retrieve Path and DB2 Audit Error Path in a Clustered Environment

When you install the software in a clustered environment, the DB2 archive path, the DB2 retrieve path and the DB2 audit error path must be on a shared drive, so the passive node can reach the paths after a failover.

Disabling Optimization for Restores from a Tape Library

When you restore from a tape library, or you run a multi stream third party command line backup, disable optimization. For more information, see Disabling Optimization for Database Restores.

Excluding Logs from Backup Images

You can exclude the log files from the backup image (Subclient Properties dialog box, Content tab, Exclude Logs from Full Backup check box). DB2 includes all the required logs in the backup image when the transaction spreads across many log files, even when a log file backup exists. If the backed up log files are deleted, DB2 will submit a log restore request to the DB2 Agent. For more information, see Why is a Command line Restore job submitted during an online full backup?

For additional information, go to the DB2 Knowledge Center, db2chkbkp.

Run a Full CommCell Console GUI Backup after Changing a Database's Table Spaces

If you add, update, or delete a database's table space, run a full backup from the CommCell Console as soon as possible. In this situation, a full backup of the source database is mandatory if you want to run a redirect restore. Only a full CommCell Console GUI backup syncs all the table space information so that the backup can be used for a redirect restore. Conversely, third-party command line full backups don't update the necessary Commvault database metadata. Consequently, the correct list of table spaces is not displayed on the Browse and Restore dialog box when running a redirect restore.

Last modified: 7/31/2019 6:03:45 PM