当前位置:网站首页>MySQL 45 lecture learning notes (12) MySQL will "shake" for a while
MySQL 45 lecture learning notes (12) MySQL will "shake" for a while
2022-07-04 06:38:00 【Tom Kong】
One . scene
A modification SQL sentence , It's very fast in normal times , But sometimes it's very slow , The scene is difficult to reproduce , Short duration .
The reasons causing :
- InnoDB When processing update statements , Only do the disk operation of writing log . This log is called redo log( Redo log )
- After updating the memory redo log after , Return to the client , This update is successful
When the memory is full , When you have to synchronize to memory , It will be slower
flush Namely Data in memory is written to disk
- Dirty page : When memory data page and disk data page atypism When
- Clean pages : When memory And the data page on the disk The content is consistent
Two . Generate the scene of cleaning dirty pages
- redo log Full of , The system should stop all update operations , take checkpoint Push forward ,redo log Make room to continue writing .
- There is not enough memory in the system , A new memory page is required , Data pages need to be eliminated when memory is insufficient , Write dirty pages to disk
- MySQL Think of the system as “ Free ” When the
- MySQL Normally closed
Analysis of the first two situations :
- redo log It's full. , To brush flush Dirty page , This situation InnoDB Try to avoid , The system no longer accepts updates , All updates must be blocked
- There's not enough memory , Write dirty pages to disk , This situation is normal
InnoDB Use cache pool (buffer pool) Manage memory , Memory pages in the cache pool have three states :
- not used
- Used are all clean pages
- Used but dirty pages
InnoDB Try to use memory when implementing strategies , For a long-running Library , Not used There are few pages
Brush dirty pages yes Normal behavior , But the following will significantly affect performance :
- There are too many dirty pages to be eliminated , This leads to significantly longer query response time
- The log is full of , All updates are blocked , Writing performance has dropped to 0
3、 ... and .InnoDB Control strategy of brushing dirty pages
InnoDB Of the host IO Ability , such InnoDB To know when you need to brush dirty pages with all your strength , How fast can I brush .
innodb_io_capacity This parameter
- It is recommended to set the value to disk IOPS
- On disk IOPS It can be used fio Tool testing
边栏推荐
- 手动对list进行分页(参数list ,当前页,页面大小)
- 11. Dimitt's law
- Native Cloud - SSH articles must be read on Cloud (used for Remote Login to Cloud Server)
- What is the sheji principle?
- Is the insurance annuity product worth buying? Is there a hole?
- uniapp 自定義環境變量
- 27-31. Dependency transitivity, principle
- Inputstream/outputstream (input and output of file)
- Mysql 45讲学习笔记(七)行锁
- tars源码分析之4
猜你喜欢

Mysql 45讲学习笔记(七)行锁

R statistical mapping - random forest classification analysis and species abundance difference test combination diagram

ABAP:OOALV实现增删改查功能

Common usage of time library

雲原生——上雲必讀之SSH篇(常用於遠程登錄雲服務器)
![[Android reverse] function interception (CPU cache mechanism | CPU cache mechanism causes function interception failure)](/img/7e/02bb01480257cd56537914a7247733.jpg)
[Android reverse] function interception (CPU cache mechanism | CPU cache mechanism causes function interception failure)

如何实现视频平台会员多账号登录
![[MySQL] introduction, function, creation, view, deletion and modification of database view (with exercises)](/img/03/2b37e63d0d482d5020b7421ac974cb.jpg)
[MySQL] introduction, function, creation, view, deletion and modification of database view (with exercises)

《ClickHouse原理解析与应用实践》读书笔记(4)

SQL join, left join, right join usage
随机推荐
Stc8h development (XII): I2C drive AT24C08, at24c32 series EEPROM storage
云原生——上云必读之SSH篇(常用于远程登录云服务器)
Tar source code analysis 8
Redis面试题集
tars源码分析之8
Functions in C language (detailed explanation)
Appium基础 — APPium安装(二)
Matlab remainder
uniapp 自定义环境变量
Lightroom import picture gray / Black rectangular multi display
2022.7.3-----leetcode. five hundred and fifty-six
Summary of leetcode BFS question brushing
How to realize multi account login of video platform members
Learning multi-level structural information for small organ segmentation
[March 3, 2019] MAC starts redis
2022 is probably the best year for the economy in the next 10 years. Did you graduate in 2022? What is the plan after graduation?
The width of the picture in rich text used by wechat applet exceeds the problem
采用中微BATG135实现IIC数据/指令交互
Considerations for testing a website
金盾视频播放器拦截的软件关键词和进程信息