zoukankan      html  css  js  c++  java
  • 【I/O】NAS 性能测试

    参考:

    https://www.cnblogs.com/xuzhongtao/p/14517876.html

    https://help.aliyun.com/document_detail/65228.htm#section-urf-b97-l23

    单个文件系统的读写性能上限(峰值)与文件系统的当前使用容量成正比,即使用容量越大,读写性能上限(峰值)越高

    IOPS(Input/Output Per Second)即每秒IO操作的次数(读写次数)。

    吞吐量 = IOPS * 读写块大小

    IOPS = 读写次数 / 任务整体时延

    例如,容量型NAS文件系统1 MiB写时延约为100 ms,8 KiB写时延约为15 ms,4 KiB写时延约为10 ms,最大支持128个并发任务。
    当您需要1s内写1 MiB数据时,可以有多种写入方案,如下列举其中几种:
     
    序号读写块大小并发数写入次数任务整体时延IOPS吞吐量说明
    方案一 4 KiB 1 250 10 ms*250=2.5s 250/2.5s=100 4 KiB*100=400 KiB/s 小块读写加上低并发数,导致吞吐和时延性能都很差,无法达到1 MiB/s的吞吐目标。
    方案二 1 MiB 1 1 100 ms 1/0.1s=10 1 MiB*10=10 MiB/s 相较方案一仅提高读写块大小,吞吐和时延性能有提升,达到了1 MiB/s的吞吐目标,但任务整体时延较长。
    方案三 4 KiB 125 250 10 ms*(250/125)=20 ms 250/0.02s=12500 4 KiB*12500≈49 MiB/s 相较方案一仅提高任务并发数,吞吐和时延性能有提升,达到了1 MiB/s的吞吐目标,任务整体时延也很短,但IOPS较高,容易触及文件系统的IOPS上限。
    方案四 8 KiB 125 125 15 ms*(125/125)=15 ms 125/0.015s≈8333 8 KiB*8333≈65 MiB/s 相较方案一同时提高读写块大小和任务并发数,吞吐和时延性能有提升,达到了1 MiB/s的吞吐目标,任务整体延时最短,IOPS较低,不容易触及文件系统的IOPS上限。

     I/O 测试工具

     FIO

    https://www.cnblogs.com/bugutian/p/6653083.html

     https://linux.die.net/man/1/fio

    http://rpmfind.net/linux/rpm2html/search.php?query=fio(x86-64)

    fio-2.1.10-1.el7.rf.x86_64.html

    I/O benchmark and stress/hardware verification tool

    DAG packages for Red Hat Linux el7 x86_64

    fio-2.1.10-1.el7.rf.x86_64.rpm

    Linux IOSTAT / NFSIOSTAT 命令

    https://blog.csdn.net/wych1981/article/details/8020429

    IOSTAT

    https://www.cnblogs.com/Sweettesting/p/13902545.html

    avg-cpu:总体cpu使用情况统计信息,对于多核cpu,这里为所有cpu的平均值。重点关注iowait值,表示CPU用于

    等待io请求的完成时间,各参数介绍如下:

      %userCPU处在用户模式下的时间百分比
      %niceCPU处在带NICE值的用户模式下的时间百分比
      %systemCPU处在系统模式下的时间百分比
      %iowaitCPU等待输入输出完成时间的百分比
      %steal管理程序维护另一个虚拟处理器时,虚拟CPU的无意识等待时间百分比
      %idleCPU空闲时间百分比

     Device:各磁盘设备的IO统计信息,参数介绍如下:

      tps:该设备每秒的传输次数(Indicate the number of transfers per second that were issued to the device)。“一次传输”意思是“一次I/O请求”,多个逻辑请求可能会被合并为“一次I/O请求”,“一次传输”请求的大小是未知的。

      kB_read/s:每秒从设备(drive expressed)读取的数据量

      kB_wrtn/s:每秒向设备(drive expressed)写入的数据量

      kB_read:读取的数据总量

      kB_wrtn:写入的数据总量

    如果%iowait的值过高,表示硬盘存在I/O瓶颈。

    如果%idle值高,表示CPU较空闲;如果%idle值高但系统响应慢时,有可能是CPU等待分配内存,此时应加大内存容量;%idle值如果持续低于10,那么系统的CPU处理能力相对较低,表明系统中最需要解决的资源是CPU。

    NFSIOSTAT

    (1)nfsiostat输出的间隔时间,(2)运行nfsiostat的次数,如果第二个数字留空,nfsiostat会一直执行下去,直到你按下^c停止它。

    https://blog.csdn.net/linux_tcpdump/article/details/114336653

    https://www.howtouselinux.com/post/use-linux-nfsiostat-to-troubleshoot-nfs-performance-issue

    We can get the NFS performance metrics here like NFS IOPS, bandwidth, latency.

    • op/s This is the number of operations per second.

    • rpc bklog This is the length of the backlog queue.

    • kB/s This is the number of kB written/read per second.

    • kB/op This is the number of kB written/read per each operation.

    • retrans This is the number of retransmissions.

    • avg RTT (ms) This is the duration from the time that client's kernel sends the RPC request until the time it receives the reply.

    • avg exe (ms) This is the duration from the time that NFS client does the RPC request to its kernel until the RPC request is completed, this includes the RTT time above.

     

     sar

    https://www.e-learn.cn/topic/3803452

  • 相关阅读:
    jQuery Ajax学习
    jquery 学习
    jquery after append appendTo三个函数的区别
    rtmp服务器以及rtmp推流/拉流/转发
    Python字符编码详解
    Python自省(反射)指南
    Python线程指南
    Python正则表达式指南[转载]
    Python2.7 threading模块学习
    python中if __name__ == '__main__': 的解析
  • 原文地址:https://www.cnblogs.com/cathygx/p/14751797.html
Copyright © 2011-2022 走看看