三三世界-百宝箱

文章 分类 标签
130 9 247

公告

暂无站点公告

Linux CentOS测试磁盘IO读写性能方法( 检查IO占用高)

三三 2022-05-04 1826 0条评论 Linux使用 测试读写性能ioiotop检测磁盘读写慢

首页 / 正文

磁盘读写速度特别慢的时候,要检查一下是不是有什么程序占用了大量的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 用起来都算可以的。

评论(0)

当前没有评论,还不快来留下第一个脚印吧


Copyright 2021 三三世界-百宝箱. All Rights Reserved.

最新评论

  • 三三

    @Doug Shume it's ok for me , you can post here.

  • refugiaguenther

    Saved as a favorite, I like your website!

  • josefa

    If some one wishes to be updated with hottest technologies after that he must be visit this site and be up to date daily.

  • Penzu

    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!

  • Yupoo Fendi

    Thanks to my father who shared with me regarding this webpage, this website is genuinely amazing.

  • Doug Shume

    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.

  • SuperWind

    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 怎么办啊

日历

2024年05月

   1234
567891011
12131415161718
19202122232425
262728293031 

文章目录

上一张 下一张