Configuring the server database directories for optimal performance

The database containers are the directories that DB2® uses to store the server database. Overall database size and the amount of data that is handled on a daily basis are the most important factors for how you configure the database directories.

Plan for growth with more directories at the start

When you are setting up your database space, ensure that you configure for future growth by including extra directories at the outset. If you are starting out with a moderate amount of data but plan to manage more, make sure that you plan for the larger amount of data to avoid reconfiguration work later.

If you must add directories after your initial configuration, make sure that you create directories that are equally sized. You can use the EXTEND DBSPACE command to add new directories for the database to use.

Plan ahead when you want to add space to the database. After new directories are added, data is redistributed and space is reclaimed for the system. This process can take considerable server resources. For more information, see the EXTEND DBSPACE command.

Use multiple database directories

How you spread the database directories across available disk storage has a strong effect on performance. Follow these guidelines for the database directories that you use:
  • Use at least four directories initially for the database, spread across four LUNs or physical disks. For large Tivoli® Storage Manager servers, use eight directories or more. You can use up to 128 directories for the server database.

    For 500 GB servers for which data deduplication is planned, use eight directories or more for the server database. With data deduplication, the load on the database becomes greater because there are frequent queries to the database to determine what deduplicated extents are on the server.

  • Make all directories that are used for the database the same size to ensure parallelism.
  • Place each database directory in a different file system. This placement improves performance because DB2 stripes the database data across the various directories.
  • Place the directories on disks that have the same capacity and I/O characteristics. For example, do not mix 10000 rpm and 15000 rpm drives for the database directories.
  • For most disk systems, performance is best if one database directory is on one LUN, which has one logical volume.
  • Aim for a ratio of one database directory, array, or LUN for each inventory expiration process.
The following image illustrates how to distribute database directories for data deduplication, by using eight disks.
Figure 1. Distribution of Tivoli Storage Manager database directories
Distribution of database directories: Place each directory on one LUN or physical disk and in different file systems.