磁盘读写速度特别慢的时候,要检查一下是不是有什么程序占用了大量的IO读写。这个时候可以ssh下执行io监控命令可以排查
#安装并运行
iotop,可以监控到进程
yum install -y iotop && iotop -oP
如果发现大量占用io的进程,比如50%以上的可以考虑直接kill 掉这个进程的PID。这样磁盘读写会恢复。
#运行pidstat也可以监控到进程的io
pidstat -d 1
在服务器上执行此命令可以查看 / 目录下面的所有文件夹占用的inode信息
for i in /*; do echo $i; find $i |wc -l|sort -nr; done
测试磁盘写速度
time dd if=/dev/zero of=test.dd bs=1M count=2000
我用的是2G的数据读写,如果磁盘允许也可以使用5G或者10G试试,以下是测试结果。
[root@33f ~]# time dd if=/dev/zero of=test.dd bs=1M count=2000
2000+0 records in
2000+0 records out
2097152000 bytes (2.1 GB) copied, 1.98135 s, 1.1 GB/s
real 0m1.985s
user 0m0.004s
sys 0m1.980s
测试磁盘读速度
time dd if=test.dd of=/dev/null bs=1M
[root@33f ~]# time dd if=test.dd of=/dev/null bs=1M
2000+0 records in
2000+0 records out
2097152000 bytes (2.1 GB) copied, 0.504621 s, 4.2 GB/s
real 0m0.507s
user 0m0.005s
sys 0m0.503s
从数据来看,这台机器的读写速度是不错的,写速度1.1GB/s 读速度达到4.2GB/s
由于测试的机器是全新的,数值会比较华丽。配置越好数值越好。读写速度只要不低于50M/s 用起来都算可以的。
版权属于: 三三世界-百宝箱
本文链接: http://33f.net/linux/linux_centos_test_io.html
本文最后更新于2022年05月10日 ,已超过878天没有更新,若内容或图片失效,请留言反馈。
本文允许转载,但请在转载时请以超链接或其它形式标明文章出处
@Doug Shume it's ok for me , you can post here.
Saved as a favorite, I like your website!
If some one wishes to be updated with hottest technologies after that he must be visit this site and be up to date daily.
Heello would you mind sharing which blog platform you're using? I'm planning to start my own blog in the near future but I'm having a tough time making a decision between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your layout seems different then moost blogs and I'm looking for something completely unique. P.S Apologies forr being off-topic butt I had to ask!
Thanks to my father who shared with me regarding this webpage, this website is genuinely amazing.
Hi, I have an overflow of customers that I'd like to send to you but I want to make sure you can handle more leads, let me know if you'd like me to send you more info.
zh.us.to 有效
kms.03k.org 有效
kms.chinancce.com
kms.shuax.com 有效
kms.dwhd.org 有效
kms.luody.info 有效
kms.digiboy.ir 有效
kms.lotro.cc 有效
www.zgbs.cc 有效
cy2617.jios.org 有效
@ 权限问题,试试sudo 再加命令。
你好提示Permission denied 怎么办啊