当前位置:网站首页>[MySQL 45 lecture -12] lecture 12 the reason why MySQL has a wind attack from time to time
[MySQL 45 lecture -12] lecture 12 the reason why MySQL has a wind attack from time to time
2022-06-11 02:34:00 【You and other students】

12 | Why my MySQL It's going to shake ?
Preface
One SQL Sometimes very slow , And the scene is difficult to reproduce , reason ?
Make a metaphor
- Powder board :redo log
- Shopkeeper's memory : Memory
- Account book : Data files
Dirty page : The contents of the memory data page and the disk data page are inconsistent
Brush dirty pages : Write memory pages to disk
Shake it : Maybe it's really dirty , Usually, a very fast update operation is performed to write memory and logs
What will trigger the database flush The process ?
- The powder board is full of , I can't remember
(redo log It's full. , The system stops all update operations )
- Try to avoid this situation , It's all blocked , The number of updates dropped to 0
- The powder board is full of , I can't remember
- Business is so good , The shopkeeper can't remember
( Out of memory , To write dirty pages to disk )
Normal behavior , There should be a mechanism to control the proportion of dirty pages to avoid the following two situations
- Too many dirty pages to be eliminated , Results in longer response times for queries
- The log is full of , All updates are blocked
- Business is so good , The shopkeeper can't remember
- Update the ledger when business is not busy
(MySQL When the system is considered idle , Brush dirty pages )
- The system is idle , No pressure
- Update the ledger when business is not busy
- Year end clearing book
(MySQL Clean the dirty pages during normal shutdown )
- The system is idle , No pressure
- Year end clearing book
InnoDB Control strategy of brushing dirty pages
- tell InnoDB Of the host IO Ability
innodb_io_capacity
Factors affecting the speed of cleaning dirty pages
- Dirty page ratio
- redo log Write disk speed
- Continuous sitting mechanism for brushing dirty pages
- innodb_flush_neighbors
- When the neighbor of a dirty page is also a dirty page , Will brush together
- Set the parameter to 0, Turn off the tandem mechanism
Take a chestnut
One memory configuration is 128GB,innodb_io_capacity=20000 Under the circumstances , It is normal to suggest that you will redo log Set to 4 individual 1GB file . If... Is set during configuration redo log Set to one 100MB file , What will happen ?( High configuration machine ,redo log Set what happens when it is too small .)
- Every time a transaction is committed redo log, If the setting is too small, it will soon be filled , The system is forced to stop all updates , What happened : Disk pressure is low , But the database suffers intermittent performance degradation .
边栏推荐
- NFT insider 61:animoca brands holds US $1.5 billion of encrypted assets in 340 investments
- Epoll principle and Application & ET mode and lt mode
- ADVANCE. AI CEO Shoudong will share the compliance of cross-border e-commerce using AI technology at the 2022 emerging market brands online Summit
- Nodejs send mail
- 当逻辑删除遇上唯一索引,遇到的问题和解决方案?
- 10 years of domestic milk powder counter attack: post-90s nannies and dads help new domestic products counter attack foreign brands
- Epoll 原理及应用 && ET模式与LT模式
- 【无标题】
- Defense measures for common vulnerabilities
- 项目 - Redis消息队列+工作线程取出用户操作日志并入库(二)
猜你喜欢

SQL | 返回顾客名称和相关订单号以及每个订单的总价
![[3.delphi common components] 7 timer](/img/3c/b983575c93d7408a64a59c931ad991.jpg)
[3.delphi common components] 7 timer

Jetpack compose box control

深度学习基础篇【4】从0开始搭建EasyOCR并进行简单文字识别

Koa2 learning notes

Unity serial port communication

App test_ Summary of test points

Colab reported an error: importerror: cannot import name '_ check_ savefig_ extra_ args‘ from ‘matplotlib. backend_ bases‘

Epoll principle and Application & ET mode and lt mode

MOFs, metal organic framework materials of folic acid ligands, are loaded with small molecule drugs such as 5-fluorouracil, sidabelamine, taxol, doxorubicin, daunorubicin, ibuprofen, camptothecin, cur
随机推荐
Project - redis message queue + worker thread fetches user operation logs and stores them (2)
A数位dp
当逻辑删除遇上唯一索引,遇到的问题和解决方案?
力扣刷题篇——哈希表
[C language] storage of data in memory -1 plastic
koa2学习笔记
92. CompletableFuture 实战
Unity determines whether the object is in the camera field of view
軟件測試英語常見詞匯
SQL | calculate sum
贵金属白银和现货白银之间是什么关系
Epoll principle and Application & ET mode and lt mode
Executeineditmode property details
金属有机骨架材料Fe-MIL-53,Mg-MOF-74,Ti-KUMOF-1,Fe-MIL-100,Fe-MIL-101)负载异氟醚/甲氨蝶呤/阿霉素(DOX)/紫杉醇/布洛芬/喜树碱
[parallel and distributed systems] cache learning
889. 根据前序和后序遍历构造二叉树
STC8A8K64D4 EEPROM读写失败
Everything实现快速搜索的原理
SQL | external connection
1031. 两个非重叠子数组的最大和