利用RATE参数限制RMAN备份的IO速度!
ORACLE真是博大精深呀。只有你想不到的没有ORACLE做不到的。。比如为了减少在RMAN备份时对系统特别是OLTP系统性能的影响。我们可以利用RATE这个参数。现举一例,
RMAN> connect target
connected to target database: CPPRD (DBID=839729677)
using target database controlfile instead of recovery catalog
RMAN> show all;
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/global/oracle2/orahome2/product/9.2.0/dbs/snapcf_CPPRD.f'; # default
RMAN>backup database;
another window :
vmstat 3
tin tout kps tps serv kps tps serv kps tps serv kps tps serv us sy wt id
0 28 16948 164 142 3 0 8 17443 282 11 3 0 10 2 8 19 72
1 80 13580 221 215 3 0 5 14659 238 11 3 0 15 2 8 17 74
1 701 14953 194 170 3 0 6 13624 218 11 3 0 8 1 8 16 74
0 28 17594 157 126 3 0 7 18835 310 11 3 0 33 2 10 23 66
0 28 14591 175 163 3 0 7 14806 240 11 3 0 23 1 10 18 71
0 28 15618 187 169 3 0 8 15256 249 10 3 0 12 2 8 17 73
0 28 16298 176 125 3 0 8 14987 250 10 3 0 7 1 9 17 72
0 28 14321 208 177 3 1 7 15024 243 11 3 1 59 1 11 18 69
0 28 13044 217 179 3 0 8 13104 212 9 3 0 18 1 9 11 78
0 28 14099 199 156 3 0 7 12992 212 9 3 0 75 2 9 15 74
0 28 12370 201 178 3 0 8 13312 220 10 3 0 19 2 8 15 75
1 28 13087 214 156 3 0 8 11875 212 9 3 0 14 3 9 14 74
1 701 18475 185 151 3 0 7 18176 295 9 3 0 8 2 11 19 69
0 28 17639 154 103 3 0 7 17119 279 9 3 0 23 2 9 16 73
0 28 17413 160 103 3 0 7 16654 272 10 3 0 86 2 10 17 71
0 28 13180 205 214 3 0 8 13797 224 10 3 0 81 1 9 16 74
0 28 13663 197 180 3 0 7 14371 231 11 3 0 12 1 10 17 72
0 28 13949 214 171 3 1 7 13440 219 10 3 1 30 1 11 16 72
RMAN> configure channel device type disk rate 1k ;
RMAN>backup database;
$ iostat 3
tty 2/md52 2/md62 2/md72 2/md82 cpu
tin tout kps tps serv kps tps serv kps tps serv kps tps serv us sy wt id
0 4 8 1 2 23 1 3 158 4 106 17 1 2 8 27 2 62
0 78 0 0 0 3 0 7 3 0 8 3 0 15 0 3 0 97
5 27 0 0 0 3 0 8 3 0 9 3 0 16 0 3 0 97
1 99 4 1 10 8 1 7 8 1 14 8 1 11 2 4 1 93
0 588 809 9 65 56 7 5 91 11 6 35 4 14 0 4 4 92
0 27 305 5 42 3 0 6 24 3 8 13 2 7 1 3 2 94
0 27 703 12 46 35 4 4 16 2 4 8 1 10 0 3 3 94
0 27 2758 46 101 19 2 4 195 24 4 3 0 19 2 4 3 91
0 27 1728 29 93 35 4 5 8 1 10 5 1 14 0 3 1 96
0 27 2773 49 97 27 3 5 5 1 13 8 1 10 0 3 1 96
0 27 2758 46 98 5 1 6 3 0 0 5 1 7 0 4 0 96
0 27 3105 52 107 8 1 7 3 0 7 5 1 11 0 4 0 96
0 27 2420 41 76 5 1 6 11 1 10 5 1 11 0 3 0 96
0 27 2423 42 84 10 4 5 12 5 7 6 2 11 0 4 1 95
0 27 2764 47 106 11 1 5 5 1 8 3 0 15 0 4 0 96
0 27 2804 40 119 5 1 7 3 0 9 5 1 10 0 4 1 95
0 27 2075 19 58 5 1 6 3 0 10 8 1 10 0 4 1 95
0 27 2289 21 67 5 1 7 5 1 8 11 1 8 0 4 0 95
0 27 2417 22 71 8 1 5 3 0 8 3 0 16 0 4 0 96
tty 2/md52 2/md62 2/md72 2/md82 cpu
tin tout kps tps serv kps tps serv kps tps serv kps tps serv us sy wt id
0 27 2347 21 69 5 1 6 3 0 19 3 0 9 0 4 0 96
0 79 2651 24 59 3 0 7 3 0 8 3 0 19 0 3 0 97
0 27 1814 16 61 5 1 6 3 0 19 3 0 11 0 3 0 96
0 27 2328 21 65 8 1 7 3 0 8 3 0 19 0 4 0 95
0 27 2027 19 59 3 1 6 3 1 11 3 1 13 0 4 0 95
0 136 1031 9 76 3 0 8 3 0 9 3 0 16 0 3 0 97
0 27 0 0 0 3 0 6 3 0 10 3 0 16 0 2 0 98
ORACLE真是博大精深呀。只有你想不到的没有ORACLE做不到的。。比如为了减少在RMAN备份时对系统特别是OLTP系统性能的影响。我们可以利用RATE这个参数。现举一例,
RMAN> connect target
connected to target database: CPPRD (DBID=839729677)
using target database controlfile instead of recovery catalog
RMAN> show all;
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/global/oracle2/orahome2/product/9.2.0/dbs/snapcf_CPPRD.f'; # default
RMAN>backup database;
another window :
vmstat 3
tin tout kps tps serv kps tps serv kps tps serv kps tps serv us sy wt id
0 28 16948 164 142 3 0 8 17443 282 11 3 0 10 2 8 19 72
1 80 13580 221 215 3 0 5 14659 238 11 3 0 15 2 8 17 74
1 701 14953 194 170 3 0 6 13624 218 11 3 0 8 1 8 16 74
0 28 17594 157 126 3 0 7 18835 310 11 3 0 33 2 10 23 66
0 28 14591 175 163 3 0 7 14806 240 11 3 0 23 1 10 18 71
0 28 15618 187 169 3 0 8 15256 249 10 3 0 12 2 8 17 73
0 28 16298 176 125 3 0 8 14987 250 10 3 0 7 1 9 17 72
0 28 14321 208 177 3 1 7 15024 243 11 3 1 59 1 11 18 69
0 28 13044 217 179 3 0 8 13104 212 9 3 0 18 1 9 11 78
0 28 14099 199 156 3 0 7 12992 212 9 3 0 75 2 9 15 74
0 28 12370 201 178 3 0 8 13312 220 10 3 0 19 2 8 15 75
1 28 13087 214 156 3 0 8 11875 212 9 3 0 14 3 9 14 74
1 701 18475 185 151 3 0 7 18176 295 9 3 0 8 2 11 19 69
0 28 17639 154 103 3 0 7 17119 279 9 3 0 23 2 9 16 73
0 28 17413 160 103 3 0 7 16654 272 10 3 0 86 2 10 17 71
0 28 13180 205 214 3 0 8 13797 224 10 3 0 81 1 9 16 74
0 28 13663 197 180 3 0 7 14371 231 11 3 0 12 1 10 17 72
0 28 13949 214 171 3 1 7 13440 219 10 3 1 30 1 11 16 72
RMAN> configure channel device type disk rate 1k ;
RMAN>backup database;
$ iostat 3
tty 2/md52 2/md62 2/md72 2/md82 cpu
tin tout kps tps serv kps tps serv kps tps serv kps tps serv us sy wt id
0 4 8 1 2 23 1 3 158 4 106 17 1 2 8 27 2 62
0 78 0 0 0 3 0 7 3 0 8 3 0 15 0 3 0 97
5 27 0 0 0 3 0 8 3 0 9 3 0 16 0 3 0 97
1 99 4 1 10 8 1 7 8 1 14 8 1 11 2 4 1 93
0 588 809 9 65 56 7 5 91 11 6 35 4 14 0 4 4 92
0 27 305 5 42 3 0 6 24 3 8 13 2 7 1 3 2 94
0 27 703 12 46 35 4 4 16 2 4 8 1 10 0 3 3 94
0 27 2758 46 101 19 2 4 195 24 4 3 0 19 2 4 3 91
0 27 1728 29 93 35 4 5 8 1 10 5 1 14 0 3 1 96
0 27 2773 49 97 27 3 5 5 1 13 8 1 10 0 3 1 96
0 27 2758 46 98 5 1 6 3 0 0 5 1 7 0 4 0 96
0 27 3105 52 107 8 1 7 3 0 7 5 1 11 0 4 0 96
0 27 2420 41 76 5 1 6 11 1 10 5 1 11 0 3 0 96
0 27 2423 42 84 10 4 5 12 5 7 6 2 11 0 4 1 95
0 27 2764 47 106 11 1 5 5 1 8 3 0 15 0 4 0 96
0 27 2804 40 119 5 1 7 3 0 9 5 1 10 0 4 1 95
0 27 2075 19 58 5 1 6 3 0 10 8 1 10 0 4 1 95
0 27 2289 21 67 5 1 7 5 1 8 11 1 8 0 4 0 95
0 27 2417 22 71 8 1 5 3 0 8 3 0 16 0 4 0 96
tty 2/md52 2/md62 2/md72 2/md82 cpu
tin tout kps tps serv kps tps serv kps tps serv kps tps serv us sy wt id
0 27 2347 21 69 5 1 6 3 0 19 3 0 9 0 4 0 96
0 79 2651 24 59 3 0 7 3 0 8 3 0 19 0 3 0 97
0 27 1814 16 61 5 1 6 3 0 19 3 0 11 0 3 0 96
0 27 2328 21 65 8 1 7 3 0 8 3 0 19 0 4 0 95
0 27 2027 19 59 3 1 6 3 1 11 3 1 13 0 4 0 95
0 136 1031 9 76 3 0 8 3 0 9 3 0 16 0 3 0 97
0 27 0 0 0 3 0 6 3 0 10 3 0 16 0 2 0 98