暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

Oracle checksum: DB_BLOCK_CHECKSUM

DB小榴莲 2019-02-15
2350


DB_BLOCK_CHECKSUM 

determines whether DBWn and the direct loader will calculate a checksum (a number calculated from all the bytes stored in the block) and store it in the cache header of every data block when writing it to disk. Checksums are verified when a block is read - only if this parameter is TYPICAL or FULL and the last write of the block stored a checksum. In FULL mode, Oracle also verifies the checksum before a change application from update/delete statements and recomputes it after the change is applied. In addition, Oracle gives every log block a checksum before writing it to the current log.


DBWn和director loader是否计算校验和取决于DB_BLOCK_CHECKSUM参数的值。


What's checksum ?


checksum是一个值,该值用于判断数据块是否损坏,是根据一个数据块中存储的字节数算出来的,这个值存储在每个数据块头部缓存中。


DB_BLOCK_CHECKSUM参数值为TYPICAL或FULL,读入(cache)时重新计算checksum和写出(to disk)时的checksum对比,如果不同则认为是块损坏。


如果设置为FULL模式,则基于update/delete应用程序语句级别的改变发生后,checksum会被重新计算并写入。同时对于日志块,在写入之前,同样会生成checksum并写入到块头。


Starting with Oracle Database 11g, most of the log block checksum is done by the generating foreground processes, while the LGWR performs the rest of the work, for better CPU and cache efficiency. Prior to Oracle Database 11g, the LGWR solely performed the log block checksum.


从Oracle 11g开始,大部分的日志块校验由生成的前台进程计算出来,LGWR进程完成剩下的工作,这样能让系统更好的利用CPU和高速缓存。Oracle 11g之前,LGWR单独执行日志块校验。


If this parameter is set to OFF, DBWn calculates checksums only for the SYSTEM tablespace, but not for user tablespaces. In addition, no log checksum is performed when this parameter is set to OFF.


如果此参数设置为OFF,则DBWn仅计算SYSTEM表空间的校验和,而不计算用户表空间的校验和。 此外,当此参数设置为OFF时,不执行日志校验和。


Checksums allow Oracle to detect corruption caused by underlying disks, storage systems, or I/O systems. If set to FULL, DB_BLOCK_CHECKSUM also catches in-memory corruptions and stops them from making it to the disk. Turning on this feature in TYPICAL mode causes only an additional 1% to 2% overhead. In the FULL mode it causes 4% to 5% overhead. Oracle recommends that you set DB_BLOCK_CHECKSUM to TYPICAL.


checksum允许Oracle检测由底层磁盘,存储系统或I / O系统引起的损坏。 如果设置为FULL,DB_BLOCK_CHECKSUM还会捕获内存中的数据块损坏并阻止它们进入磁盘。在TYPICAL模式下启用此功能仅会导致额外的1%到2%的开销;在FULL模式下,它会产生4%到5%的开销。Oracle建议设置为TYPICAL。

最后修改时间:2021-06-23 11:12:50
文章转载自DB小榴莲,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论