Dirty pages (memory pages)Clean page: the data in memory and on disk are consistent Dirty page: the data in memory and on disk are inconsistent Why do dirty pages appear? Normally, fast update operations are all writing to memory and logs. Brief description of memory management mechanism The buffer contains lists of these three categories. They are: LRUList, FreeList, and FlushList.
Note: At this time, this page is in both the LRUlist and the FlushList. Summary: LRUList (manages pages that have been read) and FreeList (manages free pages) are used to manage page availability; FlushList (manages dirty pages) is used to manage the refresh of dirty pages During the process of synchronizing dirty page data to disk, if an SQL statement is executed on the disk data page. The execution speed will be slower Is it possible to modify and read data only by relying on the buffer? If data modification and reading rely only on the memory buffer, once the database crashes, all data in the memory will be lost. Therefore, MySQL uses the redo log mentioned earlier to implement data recovery after abnormal restart. For an introduction to redo log, see this article: MySQL-redo log and binlog In simple terms, redo log is written before updating the buffer to ensure that the data in the buffer can be restored normally after an abnormal restart. Why dirty pages must be refreshed
So naturally, we must refresh the dirty pages in the memory to the disk according to some rules. With the refresh operation, the buffer size problem and the redo log size problem can be solved.
There are four scenarios for flushing dirty pages:
The impact1 If the redo log is full, try to avoid it. Otherwise the update of the entire system will stop. At this time, the write performance becomes 0, and the update can only be done after the synchronization of the corresponding dirty page of the log is completed. This will cause the SQL statement to execute very slowly. This is the end of this article about what MySQL dirty pages are. For more relevant MySQL dirty pages, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: onfocus="this.blur()" is hated by blind webmasters
>>: How to install jupyter in docker on centos and open ports
Achieve results step 1. Initial index.html To bui...
The following demonstration is based on MySQL ver...
Quick solution for forgetting MYSQL database pass...
This article describes how to compile and install...
Understanding object.defineProperty to achieve re...
Here are some problems encountered in the use of ...
This article analyzes the process of shutting dow...
1. Background 1. The front end uses vue + vuex + ...
MySQL 5.7 version: Method 1: Use the SET PASSWORD...
This article briefly describes how to use Docker ...
When the software package does not exist, it may ...
Table of contents In the React official website, ...
Detailed explanation of linux touch command: 1. C...
This article example shares the specific code of ...
Table of contents Preface sql_mode explained The ...