Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Analysis of the working principle of redo log and archived log

2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

To cut to the chase, let's take a look at a picture (PS: I found this picture on the Internet):

How it works:

First, the lgwr process writes the redo data in the redo log buffer to the redo log. When the redo log grouping is full, or when the switch logfile instruction is issued, the log group switch will be triggered. When the log group switch occurs, the arc process will write the current redo log data to the archive log.

You know, the lgwr process writes data in memory to the redo log file, which is memory read disk write. The arc process writes the redo log file to the archive file, which is read to disk and written to disk. Obviously, the read and write efficiency or read and write speed of the lgwr process is faster than that of the arc process, and slow archiving may occur in the database with frequent DML operations, while the redo log writing speed is fast, which will cause the database to be resided by HANG. At this time, the database does nothing but wait for the arc process to write the current redo log data to the archive file.

At this point, it's time to consider starting more archiving processes, by modifying the parameter log_archive_max_processes.

The parameter is a dynamic parameter, which can be modified directly.

① to view the current parameter value

Obviously, the current maximum number of archiving processes is 4

The maximum number of ② modified archiving processes is 5

③, verify it by command.

You see, it's that simple!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report