RMAN Intrafile Parallel Backup (SECTION SIZE)
This document describes the concept of Intrafile Parallel Backup in Oracle Recovery Manager (RMAN), specifically focusing on the SECTION SIZE
feature, which allows for parallel backup of a single large datafile.
Understanding Intrafile Parallel Backup
Traditionally, when you allocate multiple channels in RMAN, each channel backs up a separate datafile. This means that even with several channels, a single large datafile is still backed up by only one channel at a time, which might not fully utilize the parallel capabilities of your backup infrastructure.
Starting with Oracle Database 11g RMAN, the concept of Intrafile Parallel Backup was introduced. This allows RMAN channels to break a single large datafile into smaller, independent units called "sections." Each section can then be backed up concurrently by a different channel, truly parallelizing the backup of a single large file.
How SECTION SIZE
Works
The SECTION SIZE
clause in the RMAN BACKUP
command allows you to specify the maximum size of each section. RMAN will then divide the datafile into chunks of this specified size, and each chunk can be processed by an available channel in parallel.
Example RMAN Command
Here's an example demonstrating how to use SECTION SIZE
to back up a large datafile in parallel:
RMAN> run {
2> allocate channel c1 type disk format '/backup1/%U';
3> allocate channel c2 type disk format '/backup2/%U';
4> backup
5> section size 500m
6> datafile 6;
7> }
Explanation:
allocate channel c1 type disk format '/backup1/%U';
andallocate channel c2 type disk format '/backup2/%U';
: These commands allocate two disk channels,c1
andc2
, and specify their respective backup destinations (/backup1
and/backup2
).backup section size 500m datafile 6;
: This is the core command. It instructs RMAN to back updatafile 6
. TheSECTION SIZE 500m
clause tells RMAN to dividedatafile 6
into 500MB sections. Each of these sections will then be backed up concurrently by the allocated channels (c1
andc2
).
This setup allows for a significant speedup when backing up very large individual datafiles, as multiple channels can work on different parts of the same file simultaneously.
Listing Backed-Up Sections
When a datafile is backed up using SECTION SIZE
, the backup pieces reflect these sections.
RMAN> list backup of datafile 6;
Example Output:
...
...
List of Backup Pieces for backup set 901 Copy #1
BP Key Pc# Status Piece Name
------- --- ----------- ----------
2007 1 AVAILABLE /backup1/9dhk7os1_1_1
2008 2 AVAILABLE /backup2/9dhk7os1_1_1
2009 3 AVAILABLE /backup1/9dhk7os1_1_3
2009 3 AVAILABLE /backup2/9dhk7os1_1_4
Notice how the backup pieces (/backup1/9dhk7os1_1_1
, /backup2/9dhk7os1_1_1
, etc.) correspond to different sections of the datafile. Since each section can go to a different channel, you can direct them to different mount points (like /backup1
and /backup2
in the example), enabling parallel writing to disk or even tape.
Important Consideration for Disk Performance
While SECTION SIZE
offers great parallelization benefits, it's crucial to consider the underlying storage.
No Advantage on Single Disk: If the large datafile resides entirely on a single physical disk, there is generally no performance advantage to using parallel backups with
SECTION SIZE
. In such a scenario, the disk head would have to constantly move back and forth to access different sections of the file, which can outweigh the benefits of parallel processing and actually degrade I/O performance.Benefit with Striped/Multiple Disks: The true benefit of
SECTION SIZE
comes when the large datafile is spread across multiple physical disks (e.g., via RAID, ASM, or striped file systems) or when the backup pieces are written to different physical backup destinations. This allows the parallel I/O operations to be truly concurrent.