当前位置:网站首页>Buffer pool in MySQL
Buffer pool in MySQL
2022-06-28 07:56:00 【star++】
summary
innodb The storage engine loads data in page units . When we add, delete, and modify a table ,mysql Will find the corresponding table space , Find the segment according to the index , Find the page or area according to the segment , And then 16k The whole page of data is loaded into memory , Then modify the records in the page , Save to disk . Actually, this is not the case , The last step is not to write back to the disk immediately , It's about writing first Buffer Pool in , When the time comes , Will be unified to brush the disk , such mysql Can save some io operation , Especially hot data that is frequently operated . In other words, data modification is temporarily written to memory (Buffer Pool) Of , In fact, there will be persistence problems , Follow up discussion redo,undo The log details how to solve the persistence problem .
Buffer Pool principle

1. To cache pages in memory , When the system starts, a certain amount of continuous memory space will be allocated , This space will
Cut it into n and 16k Page of , The control block is not counted in it .
2. To distinguish between blank cache pages and modified dirty pages , Two lists are opened. One is free Linked list and flush Linked list
When a cache page is occupied by data, it will start from free List removal , At the same time insert into flush Linked list
3. To improve cache hit rate , Have a LUR Linked list , If a page is accessed , Then it will be referred to the head node ,
such 边栏推荐
- ES6 use of return in arrow function
- Real time database - Notes
- PLC -- Notes
- Is it reliable for securities companies to register and open accounts? Is it safe?
- What is EC blower fan?
- [JS] - [throttling and anti shake function]
- 【js】-【DFS、BFS应用】-学习笔记
- Update pip to the latest version
- Software design of power control board
- flutter 实现摇一摇功能
猜你喜欢

Redis master-slave structure and application scenarios

SOC timer and interrupt configuration

sql主從複制搭建

Uninstall and reinstall the latest version of MySQL database. The test is valid

Soft exam -- software designer -- afternoon question data flow diagram DFD

Analyze 5 indicators of NFT project

asp. Net error "/" server error in the application. String or binary data would be truncated. The statement...

分析 NFT 项目的 5 个指标

Design of DSP image data stream

Redis one master multi slave cluster setup
随机推荐
LeetCode之三步问题
Redis one master multi slave cluster setup
Kubernetes cluster command line tool kubectl
Section Xi. Axi of zynq_ Use of DMA
Today's notes 22/1/7
【尚品汇】项目笔记
asp. Net registration page
ACM笔记
Software design of power control board
Helloword routine for ROS
Ice, protobuf, thrift -- Notes
flutter 实现摇一摇功能
分析 NFT 项目的 5 个指标
What is the lifecycle of automated testing?
How redis solves cache avalanche, breakdown and penetration problems
Analyze 5 indicators of NFT project
HJ字符串排序
Sentinel mechanism of redis cluster
Dataset filling data, and the use of rows and columns
22/02/14 study notes