的阈值,比如10%。
链接:https://www.gaott.info/fix-blocked-for-more-than-120-seconds/
把下面内容追加到 /etc/sysctl.conf 文件中。
vm.dirty_ratio = 10
vm.dirty_background_ratio = 5
然后
sysctl -p
2、可以使用dd测试顺序IO,fio测试无序IO,检查IO能力
随机读:
time fio -filename=/dev/sdb1 -direct=1 -iodepth 1 -thread -rw=randread -ioengine=psync -bs=4k -size=10G -numjobs=10 -runtime=300 -group_reporting -name=iotest
随机写:
time fio -filename=/dev/sdb -direct=1 -iodepth 1 -thread -rw=randwrite -ioengine=psync -bs=4k -size=10G -numjobs=10 -runtime=300 -group_reporting -name=iotest
顺序读:
time fio -filename=/dev/sdb1 -direct=1 -iodepth 1 -thread -rw=read -ioengine=psync -bs=4k -size=10G -numjobs=10 -runtime=300 -group_reporting -name=iotest
顺序写:
time fio -filename=/dev/sdb -direct=1 -iodepth 1 -thread -rw=write -ioengine=psync -bs=4k -size=10G -numjobs=10 -runtime=300 -group_reporting -name=iotest
dd命令:
time dd if=/dev/zero of=/home/tools/10GB bs=4096 count=2621440
time dd of=/dev/zero if=/home/tools/10GB bs=4096 count=2621440
测试结论:这台虚拟机的IO能力是正常dell物理机IO能力的五分之一
解决方案:
1、减轻从库IO压力,一个从库只放一个实例
2、提高IO能力