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
First of all, this post is dedicated to Docker no...
Table of contents 1. Preparation 2. MySQL encrypt...
During the development activity, I encountered a ...
How to set the position of the block element in t...
This article mainly introduces the sql serial num...
This article shares the specific code of JavaScri...
Ubuntu 16.04 builds FTP server Install ftp Instal...
Table of contents 1. The difference between multi...
Table of contents Overview Front-end knowledge sy...
Table of contents 1. Problems encountered 2. Anal...
Preface Here are the steps to install and configu...
Simply pull the image, create a container and run...
Table of contents Overview Subqueries Subquery Cl...
In MySQL database operations, we always hope to a...
Four practical vue custom instructions 1. v-drag ...