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
Preface The server used by the blogger was purcha...
Repetition: Repeat certain page design styles thr...
Use scenarios: The jump path needs to be dynamica...
Table of contents Basic concepts of components Th...
1. Complexity of front-end engineering If we are ...
1. Concurrency Concurrency is the most important ...
Preface Last week, a colleague asked me: "Br...
Vue parent component calls the function of the ch...
mysql copy one table column to another table Some...
1. Why create an index? (Advantages) This is beca...
The following example code introduces the princip...
1: Docker private warehouse installation 1. Downl...
PS: I've recently been reading the Nginx chap...
1. Introduction to mysqldump mysqldump is a logic...
I didn't intend to write this blog, but durin...