Redo Log Files
Redo log files contain a record of all Data Manipulation Language (DML) commands (such as INSERT, UPDATE, and DELETE commands) performed on the database. As DMLs are performed, the Oracle engine writes them to sequential redo log files. Periodically, an Oracle background process retrieves the DMLs from the Redo log files and writes the actual changes to the Oracle tablespace files. This mechanism lets Oracle defer most of the I/O burden associated with DMLs to a background process that does not slow down the client processes.
Oracle Redo log files are treated by the database engine as a ring. When one file fills up, the engine performs a log switch and starts writing to the next log file in the ring. When that log file fills, the engine switches again.
The number and size of the Redo log files is an important performance consideration. If the log files are too small or if there are not enough of them in the ring, Oracle may have to stall on a log switch. If this happens, the DMLs in the next log in the ring may not have been written to the tablespace files, and therefore the next log file has not been archived by the background ARCH process. For more information about Redo log archiving, see the Oracle documentation.
Redo log files are created when the database is created. However, Redo log files can be added or deleted at any time using Data Definition Language (DDL) statements.
You should have at least four Redo log files, each 2 MB in size. A smaller number of Redo log files or a smaller Redo log file size can cause I/O bottlenecks. If the disk space is available, using more than four Redo log files further reduces the chances of delayed log switches. Larger Redo log files improve performance, but care must be taken to adequately schedule checkpoints that write DMLs stored in the Redo logs to the tablespace files.
If the number of disks permits, you should mirror Redo log files by creating Redo log groups with two mirrored members per group. This offers the database some protection against single disk errors.
Copyright © 2023 Quest Software, Inc. |