| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Log file sequential read ??
srivenu_at_hotmail.com (srivenu) wrote in message news:<1a68177.0211220054.699c89d0_at_posting.google.com>...
> I dont remember where and by whom but i read an article long time back
> that the LGWR --often-- needs to read an entire log block from disk
> before it tries to write a partly modified log buffer block to the log
> file.
> Lets say the OS block size (Which is also the log file block size) is
> 512 bytes.
> Then if LGWR tries to write redo shorter than that, it reads the
> entire block and writes it back with the modified data.
> I too am not entirely clear why. The article was written either by
> Jonathan Lewis or Steve Adams or Tom Kyte.
> regards
> Srivenu
When the filesystem needs to write to a disk block a chunk of data smaller than the filesystem block size (not the hard disk sector size which is 512 bytes), it has to read the block from disk and merge (append in case of lgwr) with the new data and write the entire block back to disk. Note that the OS block size is kind of an ambiguous term. I think it should only be used to refer to the filesystem block size, which is 8k for UFS on sun4u architecture and 4k on most other UNIX filesystems. This is one reason why redo logs are better placed on raw disks, so the low-level disk driver bypasses filesystem and writes in 512 byte chunks, the same as log block size in most cases (`dbfsize myredo.log`). I'm not positive about raw disk writes but I think the rule applies there too.
Yong Huang Received on Fri Nov 22 2002 - 12:04:22 CST
![]() |
![]() |