All technological notes.
| View | Use |
|---|---|
V$SESSION_LONGOPS |
Monitoring the progress of backups and restore jobs |
V$BACKUP_SYNC_IO |
Determining whether the tape is streaming when the I/O is synchronous |
V$BACKUP_ASYNC_IO |
Determining the rate of asynchronous I/O |
-- Determine the value in EFFECTIVE BYTES PER SECOND < storage media throughput
SELECT DEVICE_TYPE, TYPE ,BYTES, EFFECTIVE_BYTES_PER_SECOND
FROM V$BACKUP_ASYNC_IO
WHERE TYPE = UPPER('aggregate');
-- Monitor the progress of backup and restore operations
-- 未验证
SELECT SID,SERIAL#,CONTEXT,SOFAR, TOTALWORK,
ROUND (SOFAR/TOTALWORK*100,2) "%_COMPLETE"
FROM V$SESSION_LONGOPS
WHERE OPNAME LIKE 'RMANS'
AND OPNAME NOT LIKE '%aggregate%'
AND TOTALWORK != 0
AND SOFAR <> TOTALWORK;
-- OPNAME: A text description of the row.
-- Detail rows include RMAN:datafile copy, RMAN:full datafile backup, and RMAN:full datafile restore.
-- CONTEXT: For backup output rows, the value of this column is 2.
-- For all the other rows except proxy copy (which does not update this column), the value is 1.
VALIDATE CommandBACKUP VALIDATE command
RESTORE VALIDATE:
backup mediaRESTORE command.EFFECTIVE_BYTES_PER_SECOND column in V$BACKUP_SYNC_IO or V$BACKUP_ASYNC_IO for aggregate row.
By comparing the time of your backup operations with the time taken by the BACKUP VALIDATE command, you should be able to determine whether the bottleneck is due to reads or writes. 通过对比备份时间与BACKUP VALIDATE的时间, 从而决定是读取还是写入问题.
If the execution time of the BACKUP VALIDATE command approximates the actual backup time, the read phase is most likely the bottleneck. 读取时间占比大: 读取
LONG_WAITS/IO_COUNT ratio.
ASM, add disk spindles and/or rebalance disks.If the execution time for the BACKUP VALIDATE command is significantly less than the actual backup time, writing to the output device is most likely the bottleneck.
Solution:
LOW or MEDIUMAdditional Methods to Analyze write process
Method 1:
Method 2: a write I/O driver
DBMS_BACKUP_RESTORE.SETPARMS function with parameters:
Use to determine the source of bottlenecks and backup job progress:
V$BACKUP_SYNC_IOV$BACKUP_ASYNC_IOThe following rows exist for a backup or restore:

The maximum backup speed is limited by the available hardware.
One of the components of the backup system will be a bottleneck-which one depends on the relative speeds of the disk, tape drive, and any other transport components such as the network.
Use V$BACKUP_ASYNC_IO to monitor asynchronous I/O.
IO_COUNT: Number of I/Os performed on the fileLONG_WAITS: Number of times the backup/restore process directed the OS to wait until I/O was completeWait times should be zero to avoid bottlenecks.
The file that has the largest ratio of LONG_WAITS to IO_COUNT is probably the bottleneck.
Synchronous I/O is considered to be a bottleneck.
DISCRETE_BYTES_PER_SECOND column from V$BACKUP_SYNC_IO to view the I/O rate.
To tune RMAN backup performance, perform the following steps:
RATE settings from configured and allocated channels.
RATE parameter is used to set the maximum number of bytes (default), kilobytes (K), megabytes (M), or gigabytes (G) that RMAN reads each second on the channel.RATE parameter is not set on the ALLOCATE CHANNEL Of CONFIGURE CHANNEL command.DBWR_IO_SLAVES parameter if you use synchronous disk I/O.
asynchronous I/O, try setting the DBWR_IO_SLAVES initialization parameter to a nonzero value.
DBWR_IO_SLAVES causes a fixed number (four) of disk I/O slaves to be used for backup and restore, simulating asynchronous I/O.large pool is used if configured.
shared pool is used.DBWR_IO_SLAVES, the database writer processes will use slaves as well. You may need to increase the value of the PROCESSES initialization parameter.LARGE_POOL_SIZE initializationParallelization of backup sets is achieved by:
PARALLELISM to greater than 1 or allocating multiple channelsWhen you create multiple backup sets and allocate multiple channels, RMAN automatically parallelizes its operation and writes multiple backup sets in parallel.
server sessions share the work of backing up the specified data files, control files, and archived redo logs.backup set across multiple channels. 一个渠道处理一个备份 set
RUN {
ALLOCATE CHANNEL cl DEVICE TYPE sbt;
ALLOCATE CHANNEL c2 DEVICE TYPE sbt;
ALLOCATE CHANNEL c3 DEVICE TYPE sbt;
BACKUP
INCREMENTAL LEVEL = 0
(DATAFILE 1,4,5 CHANNEL cl)
(DATAFILE 2,3,9 CHANNEL c2)
(DATAFILE 6,7,8 CHANNEL c3);
SQL 'ALTER SYSTEM ARCHIVE LOG CURRENT';
}

RMAN uses two different types of buffers for I/O:
disktape.RMAN multiplexing

The degree of multiplexing depends on
FILESPERSET parameter of the BACKUP commandMAXOPENFILES parameter of the CONFIGURE CHANNEL Or ALLOCATE CHANNEL command.Note: RMAN multiplexing is set at the channel level. For ASM or RAID1, set MAXOPENFILES to 1 or 2.
Multiplexing level:
Value:
Min (MAXOPENFILES, FILESPERSET)
MAXOPENFILES is 8.FILESPERSET default is 64.MAXOPENFILES determines the number and size of input buffers.
PGA, unless disk or tape I/O slaves, are enabled.