Tuning database backups to cloud object storage
You can back up a database to, and restore a database from, cloud object storage for disaster recovery purposes.
- Database volumes
- Device configuration file
- Volume history file
- Master encryption key for the server
- A session connection from Db2® to the IBM Spectrum Protect server
- A server thread that sends data from the server to object storage
- Are you using object storage endpoints?
- To optimize performance, use multiple object storage endpoints, such as IBM® Cloud Object Storage Accessers, instead of a load balancer.
- How many IBM Cloud Object Storage Accessers are you using?
- Use the following number of IBM Cloud Object
Storage
Accessers for small, medium, and large
Blueprint systems:
- Small system: 1 IBM Cloud Object Storage Accesser®
- Medium system: 2 IBM Cloud Object Storage Accessers
- Large system: 3 - 4 IBM Cloud Object Storage Accessers
Tip: The IBM Cloud Object Storage Accessers can be used for other storage requirements in addition to the IBM Spectrum Protect server. - Are the disks configured for optimal performance?
- The following items can impact the performance of database backup and restore operations:
- Database disks
- Object storage system
- Network to the object storage system
- Is network bandwidth greater than the planned maximum throughput for backup operations?
-
For system operations, such as backups, network bandwidth must be greater than the planned maximum throughput. The system must complete operations on schedule to meet service level commitments.
When the TCP/IP network link to object storage shows signs of packet loss, the performance for database backup and restore operations requires improvement. Packet loss of 2% or more, dropped packets, or both, can cause a large degradation in throughput for database backup or restore operations with object storage.
When you use an off-premises IBM Cloud Object Storage system with larger IBM Spectrum Protect servers, use a dedicated network link to the object storage resource. A 1 Gb network might be enough for a small Blueprint system. A 10 Gb network is necessary for medium and large Blueprint systems with larger databases when regular database backup and time-intensive restore operations must be completed in an acceptable amount of time. For example, a 1 Gb network link might process only 100 MB per second of throughput. A 1 TB database backup operation might take 3 or more hours to complete.
- Are you using Db2 database encryption?
- Db2 database encryption is used by default for database
backup operations to cloud device classes. You can specify encryption or compression for a database
backup operation to cloud, but not both. If you specify compression, for a database backup to cloud,
encryption is disabled.Compression impacts backup performance and limits front-end throughput to approximately 0.5 TB per hour, or less. Use compression with database restore operations to improve performance. For smaller IBM Spectrum Protect servers with smaller databases, use compression when the following conditions are met:
- The network link to object storage is 1 Gb or less.
- Database encryption is not necessary.
- Compression savings are required.
- How many streams are you using for the database backup?
- Depending on IBM Spectrum Protect server size, use the
following stream quantities for database backup operations for small, medium, and large Blueprint systems:
- Small system: 10 streams
- Medium system: 25 streams
- Large system: 50 streams
Adjust the number of data streams until you achieve optimal throughput.
Backing up a database to cloud object storage uses approximately 20 MB per data stream on the IBM Spectrum Protect server. For example, a 50-stream database backup operation consumes approximately 1000 MB of memory on the server.Restriction: If the process of backing up the database to cloud object storage takes longer than expected, check the Operations Center or activity log to determine whether the database backup operation failed and whether the operation was retried. When a database backup operation is retried, the operation uses a single backup stream, which might be insufficient for your throughput requirements. To optimize throughput, cancel the database backup operation and try to manually back up the database with a larger stream count. - Is throughput sufficient for database backup operations based on your server maintenance schedule?
- Throughput requirements for database backup operations depend on the IBM Spectrum Protect server maintenance schedule. A typical full database backup window is 2 hours daily. For example, an 8 TB database must back up at least 4 TB per hour to comply with the backup window. Four TB per hour is approximately the limit of a single 10 Gb Ethernet link. The database disks must manage approximately 1200 MB per second of larger (256 – 512 KB) input/output operations per second (IOPS). More throughput is required if concurrent operations occur on the IBM Spectrum Protect server in addition to database backup operation. Longer scheduled windows can be used to accommodate slower throughput.