What Is a Checkpoint Restart?
There are four types of checkpoints: MMDB checkpoints, non-distortion checkpoints, distortion checkpoints, and log-driven checkpoints.
- Chinese name
- checking point
- Foreign name
- Check point
- There are four types of checkpoints: MMDB checkpoints, non-distortion checkpoints, distortion checkpoints, and log-driven checkpoints.
Checkpoint inspection method
- In software development projects, the project is checked within a specified time interval, the differences between the actual and planned are compared, and adjustments are made based on the differences, usually once or twice a week.
Defined in Checkpoint Database Recovery Technology
- Checkpoint recovery technology: Add a new type of record to the log file-checkpoint record (checkpoint), add a restart file, and let the recovery subsystem dynamically maintain the log during log file log.
- Reasons for doing this: 1. When using log technology for database recovery, you need to check all log records. There are two problems:
- One is that searching the entire log will take a lot of time.
- The second is that REDO needs to deal with many operations that have written the operation results to the database, wasting a lot of time.
- 2. Checkpoint records include:
- 1. Establish a checklist of all transactions being performed at the checkpoint.
- 2. The address of the most recent log record for these transactions.
- Maintaining log files at checkpoints
- 1. Write all log records in the current log buffer to a log file on disk.
- 2. Write a checkpoint record in the log file.
- 3. Write all data records of the current data buffer to the database on disk.
- 4. Write the checkpointed address in the log file to a restart file.
MMDB(Checkointing) Checkpointing MMDB (Checkointing)
- [1] The fast recovery is highly dependent on the existence of the latest checkpoint (Pu-to-daet). Checkpoints reduce the amount of recovery work that must be done when the system restarts after a MMDB crash. On the other hand, checkpoints also affect the processing performance of the database one by one, especially in large-capacity memory environments. I do not want to suspend the execution of other transactions while the checkpoint is executing. The checkpoint algorithm needs to be carefully designed so that it has little impact on the normal processing of transactions and it can effectively recover the system when the system crashes. The checkpoint of the MMDB system is different from that of the DRDB system. DRDB's checkpoint is designed at a point in time to allow uncommitted transactions and committed transactions to ensure that their log records are written back to disk. The design idea of the MMDB checkpoint is to write back the entire database or part of the database data in memory to disk at a point in time, or in other ways, form a mirror of the database data at this point in time. Like backup. The checkpoint technology in MMDB can be divided into three categories: non-fuzzy eheckpointing, fuzzy checkpointing, and log-driven checkpointing.
(Nofuzzy Checkpointing) Checkpoint non-fuzzy checkpointing
- [1] Non-distortion checkpointing strategies usually bring additional overhead to transaction processing;] These overheads mainly come from the need for non-distortion checkpointing strategies to lock the data objects being checked to maintain transaction consistency. There are many different strategies to choose from.
(Fuzzy Checkpointing) Checkpoint Distortion Checkpointing
- [1] The distortion checkpoint F (uzyzChecPkointnig) strategy in MMDB means that checkpoint programs do not need to lock data objects when they operate on data. The checkpoint program and other transactions execute concurrently. The checkpoint program writes back only a portion of the database's dirty data pages to disk at a time. The checkpoint program keeps synchronization with other transactions by writing log records to the system log.
(LogDrivenCheckpointing) Checkpoint Log Driven Checkpointing
- [1] In the distortion checkpoint and the non-distortion checkpoint, the in-memory database needs to be copied to disk in whole or in part, while the log-driven checkpoint is based on the database image generated by the previous checkpoint, based on the log Update the image to create a new image. This checkpointing strategy can be applied to backup database mirroring to a remote host. Because the amount of data in the log is smaller than the size of the database, it is more conducive to network transmission. Each time a checkpoint is made, the log is transmitted to the remote host, and then the update action is played back on the remote host according to the log to generate a new data mirror image. However, this strategy is also flawed. If MMDB has a large transaction throughput, it will generate a large number of log records. These logs will frequently drive the checkpoint program to update the backup data image on the disk, which involves a large number of disk 1/0 operations, which will seriously reduce the efficiency of the checkpoint program. If you can control the number of logs generated under a large transaction throughput, log-driven checkpointing is still a good checkpointing strategy. In the "recovery model" proposed in the second half of this chapter, the checkpoint strategy is a log-driven checkpoint.