czwartek, 2 czerwca 2011

How to speed up a RMAN backup ?

OS: AIX 5300-06 
Oracle: 9.2.0.8


I had a problem with RMAN backup on one of the database.
The database has 20GB but RMAN backup takes about 1 hour during a night.
It is too long if I compare a size of the database.
RMAN uses Tivoli Data Protection for Oracle and goes to the tape.
I ran the backup manually with the tracing and the debugging options.



orapdvs[XXX](/aXXX/app/oracle/XXX)$ rman target / log=rman1.log debug trace=rman1_debug.trc


RMAN> run {
      allocate channel c1 type 'sbt_tape' DEBUG=5 TRACE=5 parms 
      'ENV=(TDPO_OPTFILE=/a655/app/oracle/etc/tdp/pdvs.opt)';
      backup incremental level 0 cumulative database 
      include current controlfile format 'DB_%u_%p_%c' TAG BARTEK;


In the rman1_debug.trc I found



...
 +3755  DBGRPC:   krmxrpc: xc=4568322960 starting longrunning RPC #28 to target: DBMS_BACKUP_RESTORE.BACKUPPIECECREATE
 +3756  DBGRPC:   krmxr: xc=4568322960 started long running rpc
 +3757  DBGRPC:   krmxpoq: xc=4568322960, action="0000027 FINISHED", col_l=16, ind=0, sid=20
 +3758  DBGRPC:   krmxr: callback returned TRUE, skipping sleep
 +3759  DBGRPC:   krmxpoq: xc=4568322960, action="0000028 STARTED", col_l=15, ind=0, sid=20
 +3760  DBGRPC:   krmxr: sleeping for 1 seconds
 +3761  DBGRPC:   krmxpoq: xc=4568322960, action="0000028 STARTED", col_l=15, ind=0, sid=20
 +3762  DBGRPC:   krmxr: sleeping for 2 seconds
 +3763  DBGRPC:   krmxpoq: xc=4568322960, action="0000028 STARTED", col_l=15, ind=0, sid=20
 +3764  DBGRPC:   krmxr: sleeping for 4 seconds
 +3765  DBGRPC:   krmxpoq: xc=4568322960, action="0000028 STARTED", col_l=15, ind=0, sid=20
 +3766  DBGRPC:   krmxr: sleeping for 8 seconds
 +3767  DBGRPC:   krmxpoq: xc=4568322960, action="0000028 STARTED", col_l=15, ind=0, sid=20
 +3768  DBGRPC:   krmxr: sleeping for 10 seconds
...


On the metalink I found the note: RMAN Hangs Using Tivoli TDP [ID 221212.1]
In this note Oracle writes about parameter called TDPO_NUM_BUFFERS.
In the IBM Redbook "Backing Up Oracle Using Tivoli Storage Management" is written:



Tivoli Data Protection for Oracle now includes an option to transfer Oracle 
data to the TSM server using multiple buffers to help alleviate network 
bottlenecks. 
This option specifies the number of buffers TDP for Oracle uses to support 
multi-buffering. By entering a value, multi buffering is activated.
We measured this options with runtimes of a full database backup with values 
of 2, 4, 8 and without this option. We achieved the best results with only 2 
buffers.


I decided to test using different configurations: without specifying TDPO_NUM_BUFFERS and with values from 2 to 5.
I ran rman incremental level 0 backup on one tape channel.
These results are very interesting.


TDPO_NUM_BUFFERS1st time 2nd time 3rd time
not specified 18 min
16 sec
17 min
25 sec
17 min
30 sec
 2 6 min
36 sec
5 min
26 sec
5 min
46 sec
 3 4 min
45 sec
4 min
36 sec
4 min
35 sec
 4 5 min
45 sec
6 min
46 sec
5 min
5 sec
 5 6 min
56 sec
5 min
16 sec
5 min
5 sec


Time of the backup was decreased about 3 times. Nice improvement.

Brak komentarzy:

Prześlij komentarz