当前位置:网站首页>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 边栏推荐
- 大型项目中的Commit Message规范化控制实现
- 【js】-【DFS、BFS应用】-学习笔记
- Kubernetes理论基础
- sql主從複制搭建
- Study notes 22/1/10
- Is it reliable for securities companies to register and open accounts? Is it safe?
- Uninstall and reinstall the latest version of MySQL database. The test is valid
- Es data export CSV file
- Analyze 5 indicators of NFT project
- Static resource compression reduces bandwidth pressure and increases access speed
猜你喜欢

Source code analysis of kubernetes' process of deleting pod

数字藏品市场“三大套路”

Leetcode learning records

LeetCode之三步问题

HJ质数因子

asp. Net datalist when there are multiple data displays

Software design of resistance test board

Three step problem of leetcode

Disposition Flex

Safety training is the greatest benefit for employees! 2022 induction safety training for new employees
随机推荐
Makefile
Porting ucosiii to stm32f429
ZYNQ_ IIC read / write m24m01 record board status
Installing redis on Linux
自动化测试的生命周期是什么?
Understanding of OPC protocol
HJ explicit random number
flutter 实现摇一摇功能
HJ21 简单密码
Section 8: DMA of zynq
云原生:云计算技术再次升级 开启全面云开发时代
SQL analysis (query interception analysis for SQL optimization)
Redis master-slave structure and application scenarios
Configuring multiple instances of MySQL under Linux
Kubernetes theoretical basis
SOC clock configuration
How to use redis to solve concurrency problems
Study notes 22/1/19 and 22/1/20
HJ成绩排序
NDK cross compilation