Oracle Log Block Size

Although the size of redo entries is measured in bytes,LGWR writes the redo to the log files on disk in blocks. The size of redo log blocks is fixed in the Oracle source code and is operating system specific. Oracle's documentation uses the term "operating system block size" to refer to the log block size. Normally it is the smallest unit of I/O supported by the operating system for raw I/O,but on some operating systems it is the smallest possible unit of file system based I/O. The following table shows the most common log block sizes and some of the operating systems that use them.

Log Block Size Operating Systems
512 bytes Solaris,AIX,Windows NT/2000,Linux,Irix,DG/UX,OpenVMS,NetWare,UnixWare,DYNIX/ptx
1024 bytes HP-UX,Tru64 Unix
2048 bytes SCO Unix,Reliant Unix
4096 bytes MVS,MPE/ix

The log block size is the unit for the setting of thelog_checkpoint_interval,_log_io_sizeandmax_dump_file_sizeparameters. Therefore,it is an important constant to know. If your operating system is not listed in the table above,then you can find your log block size using the following query.

select max(lebsz) from sys.x$kccle;
This query is available as the APT script log_block_size.sql . If your operating system is not listed in the table above,please click on the Feedback icon below and send us an email so that we can add it to the list.

The log block size can also be inferred from the system statistics in StatsPack reports. There is a 16 byte header for each log block,and the size of the data area is approximately the number of bytes of redo generated (redo size) plus the number of bytes of redo space left unused (redo wastage) divided by the number of log blocks written (redo blocks written). Thus the approximate formula is

16 + (redo size+redo wastage) /redo blocks written

This formula will commonly understate the log block size by a few bytes,because it does not allow for redo that has been generated but not yet written,and theredo sizestatistic is commonly a little inaccurate.

相关文章

数据库版本:11.2.0.4 RAC(1)问题现象从EM里面可以看到,在23号早上8:45~8:55时,数据库等待会话暴增...
(一)问题背景最近在对一个大约200万行数据的表查看执行计划时,发现存在异常,理论上应该返回100多万...
(一)删除备份--DELETE命令用于删除RMAN备份记录及相应的物理文件。当使用RMAN执行备份操作时,会在RM...
(1)DRA介绍 数据恢复顾问(Data Recovery Advise)是一个诊断和修复数据库的工具,DRA能够修复数据文...
RMAN(Recovery Manager)是Oracle恢复管理器的简称,是集数据库备份(backup)、修复(restore)和恢复...
(1)备份对象 可以使用RMAN进行的备份对象如下: --整个数据库:备份所有的数据文件和控制文件; --数...