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
- Use at least four directories initially for the database, spread across four LUNs or physical disks. For large IBM
Spectrum Protect servers,
use eight directories or more. You can use up to 128 directories
for the server database.
For 2 TB 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.
