[Translated from mos] The buffer memory parameter is used to adjust the performance of rman ., Mosrman
Use the buffer memory parameter to adjust the performance of rman.
This article is translated from the mos article: RMAN Performance Tuning Using Buffer Memory Parameters (Doc ID 1072545.1)
Rman performance adjustment aims to identify the bottleneck of a specific backup or restore job.
Use the rman command, initialize parameters, or adjust physical media to improve overall performance.
As the database capacity continues to grow, dozens to hundreds of terabytes of databases are common in customers' environments,
Server and storage systems are also increasing their capacity in terms of resource, network, and io to support database backup and restore windows
In this context (against this backdrop), the performance adjustment of rman has become more important than ever.
This article describes in detail the guidelines related to buffer memory in the rman performance adjustment during backup and restore operations.
These guidelines target the following systems:
The available I/O exceeds 100 MB/s, while memory, CPU, network consumption,
And tape drive throughput do not constrain overall RMAN performance.
This is especially true in very high performance deployments, such as Exadata.
In these environments, the default rman buffer size is insufficient (inadequate) and needs to be increased.
This article assumes that the reader has a basic understanding of rman performance adjustment.
The following connection contains the overview of rman tuning:
Http://download.oracle.com/docs/cd/E11882_01/backup.112/e10642/rcmtunin.htm#CACJCBDB
RMAN Buffer Usage
During the backup, datafile blocks is read to a batch of input buffers. In this batch of input buffers,
Datafile blocks is validated, compressed, encrypted, and copied to a batch of output buffers.
The batch of output buffers is then written to the backup piece on the disk (device type disk,
Or in the backup piece on the tape (device type sbt.
This processing process is described as follows ):
Conversely, in the restore, The datafile blocks reads a batch of input buffers from the backup piece,
In this batch of input buffers, The datafile blocks is verified, uncompressed, and decrypted, and copied to the output buffers.
The output buffers is written to the data file on the disk.
By default, buffers are allocated from pga unless disk io slaves or tape io slaves are used.
When disk io slaves or tape io slaves are used, buffers backup and distribute data from the sga or large pool (if LARGE_POOL_SIZE is set)
In the V $ BACKUP_ASYNC_IO and V $ BACKUP_SYNC_IO views, you can see the number of buffers used by each rman job and the buffer size.
The following example sets the guidelines of rman memory usage, which is organized by installing the Oracle version.
Tuning guideline:
When the following parameter with _ (underline) is used to adjust the buffer size, it is recommended that:
For a given operation, both input buffer and output buffer are set.
Oracle Database 11g Release 11.1.0.7 and prior releases
When creating backup sets:
When creating backup set:
Input buffers is allocated based on the level of multiplexing, according to the following chart:
Multiplexing indicates the number of files read by each channel.
Multiplexing = Min (MAXOPENFILES, FILESPERSET)
Defaults: MAXOPENFILES = 8, FILESPERSET = 64
Table:
For example, if MAXOPENFILES is set to 1, each channel uses 16 buffers, each buffer is 1 MB, and each channel allocates 16 MB of buffer.
Extended: For MAXOPENFILES = 8, each channel uses 32 buffers, each buffer is 512 K, and each channel allocates 16 MB of buffer.
Tuning guideline:
1. The number of input buffer can be adjusted using the following implicit parameter: _ backup_ksfq_bufcnt
The following implicit parameter can be used to adjust the input buffer size: _ backup_ksfq_bufsz
2. When using these parameters to increase the throughput of backup I/O, we recommend the following:
First, adjust the _ backup_ksfq_bufsz parameter to read the stripe size of a file to test the effect and confirm that the setting has no performance problems.
Third, if you need to adjust the disk quantity, set the _ backup_ksfq_bufcnt parameter to the number of disks in the stripe file.
In a large striped system, such as ASM, this parameter should be used to achieve an optimized balance between performance and memory usage.
For example, if your asm diskgroup contains 500 disks,
If _ backup_ksfq_bufcnt is set to 500, an excessive amount of memory will be allocated to each rman channel.
A reasonable setting, such as 32 or 64, provides a better balance between performance and memory.
When you create or restoring from image copy:
The size of input buffer is 1 MB/buffer.
The number of input buffer is 4 buffers.
Tuning guideline:
First, the input buffer size for image copies can be increased using the _ db_file_direct_io_count parameter.
When creating backup sets or image copies:
Output buffers is allocated based on device type:
Table
Tuning guideline:
First, for disk backup, the output buffer size (size) should be increased using _ db_file_direct_io_count.
Second, please note that _ db_file_direct_io_count will control other database io operations, not just rman. Therefore, this adjustment should be carefully tested.
Third: for SBT backup, the output buffer size (size) should be increased using the BLKSIZE channel parameter.
Fourth: note that BLKSIZE applies to Oracle Secure Backup. In OSB, buffer sizes is automatically calculated to optimize the transmission speed.
When restoring from backup sets:
The size of the output buffer is KB/buffer.
The number of the output buffer is 4 buffers.
Tuning guideline:
First, the number (quantity) of the output buffer can be increased using the _ backup_ksfq_bufcnt parameter.
Second, the size (size) of the output buffer can be increased using the _ backup_ksfq_bufsz parameter.
Third: Note that the default buffer sizes for restoring files are smaller than what are used when backing up those same files.
These buffers shoshould be increased to match the corresponding backup if restore times are significantly slower than the corresponding backups.
When restoring from image copies:
The default output buffer size is 1 MB/buffer.
The default output buffer number is 4 buffers.
Tuning guideline:
First, you can use _ db_file_direct_io_count to increase the output buffer size.
Oracle Database 11g Release 11.1.0.7 + Patch 8369105 (also in Exadata V1 Bundle Patch 2)
Input and output buffers are allocated and tuned largely the same as in the preceding section,
With the exception of the following changes:
First: When restoring from backup sets, the default output buffer size is increased from 128 KB to 1 MB.
Second: _ db_file_direct_io_count is not used to adjust any RMAN buffer sizes. This means that RMAN buffer sizes can be adjusted without affecting any other database I/O.
Third: _ backup_ksfq_bufcnt can be used to adjust the number of input and output buffers for all operations using DISK channels.
Oracle Database 11g Release 2
All rman I/O operations with ASM files select an optimal buffer size and count based on the allocation unit (AU) size and disk count of the ASM disk group.
Additional parameters are introduced to give more fine-grained control over RMAN buffer allocations. although these parameters are supported for all RMAN operations, they are primarily intended for use in non-ASM systems, since RMAN operations in ASM will automatically select an optimal buffer configuration.
First: _ backup_seq_bufsz/_ backup_seq_bufcnt
O These parameters set the buffer size and count for both creating and restoring backup pieces using SBT channels with third-party media managers.
O Note that these parameters are not needed when using Oracle Secure Backup, as the optimal buffer size is automatically selected.
Second: _ backup_disk_bufsz/_ backup_disk_bufcnt
O These parameters set the buffer size and count for both creating and restoring backup pieces using DISK channels.
Third: _ backup_file_bufsz/_ backup_file_bufcnt
O These parameters set the input buffer size and count for all backup operations, and the output buffer size and count for all restore operations.
Fourth:
Note that _ parameters and _ backup_ksfq_bufcnt are still supported in Oracle Database 11g Release 2 for compatibility reasons, but it is recommended that you tune the RMAN buffer sizes instead using the above parameters.