ITPub博客

首页 > Linux操作系统 > Linux操作系统 > rman backup algorithm

rman backup algorithm

原创 Linux操作系统 作者:v_fantasy 时间:2009-02-04 11:27:14 0 删除 编辑

Algorithm Rules
The basic backup algorithm follows several important tenets when creating backup sets. Each
allocated channel that performs work in the backup job—that is, each channel that is not idle
generates at least one backup set. By default, this backup set contains one backup piece. RMAN
always tries to divide the backup load so that all allocated channels have roughly the same
amount of work to do.
The basic algorithm determines the number and size of the backup pieces by balancing the
FILESPERSET and MAXSETSIZE (if used) parameters of the BACKUP command. The
FILESPERSET parameter of the BACKUP command determines the maximum number of data
files in each backup set. If none is specified, RMAN will calculate this figure by comparing the
value 64 to the rounded-up ratio of number of files divided by the number of channels, and sets
FILESPERSET to the lower value. For example, if you are backing up 140 files and allocating
two channels, RMAN divides 140 by two, compares the resultant 70 to 64 and chooses 64 as the
value for FILESPERSET.
The maximum size of a backup set is determined by the MAXSETSIZE parameter of the
CONFIGURE or BACKUP command. When you set this, RMAN uses the algorithm to determine
the number of files to write to each set.
When both parameters are being used, the number of backup sets is the greater of the following
ratios:
?Total number of blocks divided by MAXSETSIZE
?Total number of data files divided by FILESPERSET
RMAN will enforce both the FILESPERSET and MAXSETSIZE limits. If necessary, then
RMAN creates more backup sets than are calculated in the preceding comparison. RMAN uses
the algorithm of best fit so that the majority of backup sets have a size as close to the
MAXSETSIZE limit with the number of files as close to the FILESPERSET limit as possible.
-------------------------------------------------------------------------------------------------------------------------------------

Advanced Algorithm
The advanced algorithm uses the same factors as the basic algorithm to determine the number
and size of backup sets. The difference is that the advanced algorithm is also influenced by the
DISKRATIO parameter. If DISKRATIO = n, then each backup set must read data from at
least n disk drives. RMAN uses file location information obtained from the database server to
determine which data files are present on which disk drives.
If you set FILESPERSET but not DISKRATIO, then DISKRATIO defaults to the same value
as FILESPERSET. If you specify neither parameter, then DISKRATIO defaults to 4. RMAN
compares DISKRATIO to the number of devices and uses the lowest value.
Assume that a database contains 50 data files spread across six disks, and the operating system is
able to deliver this disk contention information to the server. You configure a single sbt
channel and then run BACKUP DATABASE.
RMAN uses the advanced algorithm for the reason that the basic algorithm indicates that
because you did not specify FILESPERSET or MAXSETSIZE, RMAN should produce a single
backup set. The advanced algorithm also looks at DISKRATIO, which in this case defaults to 4.
Therefore, each backup set must contain data files from at least four disks. Because RMAN is
only producing one backup set containing all data files from all six disks, DISKRATIO makes
no difference.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/16158219/viewspace-545220/,如需转载,请注明出处,否则将追究法律责任。

上一篇: ORADEBUG
请登录后发表评论 登录
全部评论

注册时间:2008-10-07

  • 博文量
    98
  • 访问量
    181396