当前位置:网站首页>MySQL performance tuning - dirty page refresh
MySQL performance tuning - dirty page refresh
2022-07-06 12:35:00 【wx5caecf2ed0645】
principle
When the contents of memory data page and disk data page are inconsistent , We call this memory page “ Dirty page ”. After memory data is written to disk , The contents of data pages on memory and disk are the same , be called “ Clean pages ”.
When the data page to be read is not in memory , You have to apply for a data page in the buffer pool . At this time, only the longest unused data page can be eliminated from memory : If it's a clean page to be eliminated , Just release it and reuse it ; But if it's a dirty page , You have to brush the dirty pages to disk first , It can only be reused after it becomes a clean page .
So the following two cases , It will obviously affect the performance :
- There are too many dirty pages to be eliminated in a query , The response time of the query will be significantly longer ;
- The log is full of , All updates are blocked , Writing performance has dropped to 0, For sensitive businesses , It is unacceptable .
therefore ,InnoDB There needs to be a mechanism to control the proportion of dirty pages , To try to avoid the above two situations .
Configuration tuning - innodb_io_capacity
innodb_io_capacity The default is 200, The unit is page , The setting size of this parameter depends on the size of the hard disk IOPS, That is, the input and output per second ( Or reading and writing times )
It will tell InnoDB Disk capabilities , So set this value to disk IOPS.
On disk IOPS Can pass fio This tool is used to test , The following statement is used to test the random read / write command of the disk :
fio -filename=$filename -direct=1 -iodepth 1 -thread -rw=randrw -ioengine=psync -bs=16k -size=500M -numjobs=10 -runtime=10 -group_reporting -name=mytest
- 1.
Configuration tuning - innodb_flush_neighbors
InnoDB The storage engine also provides Flush Neighbor Page( Refresh adjacent pages ) Characteristics of . Its working principle is : When a dirty page is refreshed ,InnoDB The storage engine detects the location of the page (extent) All pages of , If it's dirty , So let's refresh together .
InnoDB1.2.x The version starts with parameters innodb_flush_neighbors, Used to control whether the feature is enabled .
This feature is recommended for traditional mechanical hard drives , For solid-state drives, it has a high IOPS Performance disk , It is recommended that this parameter be set to 0, That is, turn off the feature .
边栏推荐
- Unity3D,阿里云服务器,平台配置
- 基於Redis的分布式ID生成器
- Cannot change version of project facet Dynamic Web Module to 2.3.
- (课设第一套)1-4 消息传递接口 (100 分)(模拟:线程)
- C programming exercise
- JS正则表达式基础知识学习
- Who says that PT online schema change does not lock the table, or deadlock
- 2021.11.10 compilation examination
- Navigator object (determine browser type)
- 记一次云服务器被密码爆破的经历——关小黑屋、改密码、改端口
猜你喜欢
![Intermediate use tutorial of postman [environment variables, test scripts, assertions, interface documents, etc.]](/img/b0/176bf6dea2201afc892d6750c5974b.png)
Intermediate use tutorial of postman [environment variables, test scripts, assertions, interface documents, etc.]

Basic operations of databases and tables ----- modifying data tables

Unity scene jump and exit

JS变量类型以及常用类型转换

Problèmes avec MySQL time, fuseau horaire, remplissage automatique 0

Arm pc=pc+8 is the most understandable explanation

Unity场景跳转及退出

dosbox第一次使用

Cannot change version of project facet Dynamic Web Module to 2.3.

Custom view puzzle getcolor r.color The color obtained by colorprimary is incorrect
随机推荐
Embedded startup process
[leetcode622]设计循环队列
Unity3D摄像机,键盘控制前后左右上下移动,鼠标控制旋转、放缩
Design and implementation of general interface open platform - (39) simple and crude implementation of API services
History object
ES6 grammar summary -- Part I (basic)
Learning notes of JS variable scope and function
ESP8266连接onenet(旧版MQTT方式)
idea中好用的快捷键
Understanding of AMBA, AHB, APB and Axi
Talking about the startup of Oracle Database
Unity场景跳转及退出
Unity scene jump and exit
Unity3d camera, the keyboard controls the front and rear left and right up and down movement, and the mouse controls the rotation, zoom in and out
Theoretical derivation of support vector machine
C programming exercise
Minio file download problem - inputstream:closed
Arduino uno R3 register writing method (1) -- pin level state change
Walk into WPF's drawing Bing Dwen Dwen
Arduino gets the length of the array