全部产品
Search
文档中心

文件存储 NAS:NAS性能测试

更新时间:Aug 26, 2026

本文介绍如何在Linux/Windows系统中使用FIO工具对文件系统进行吞吐和IOPS的性能测试。

前提条件

您已经创建了待测试的文件系统,并将文件系统挂载到ECS实例上。具体操作,请参见快速入门

背景信息

本文示例的性能参数,均为Linux/Windows系统下采用FIO工具的测试结果,以此作为文件存储NAS产品性能指标参考。如果想达到文件存储NAS的官网性能指标 ,建议使用多台ECS进行测试。文件存储NAS的官网性能指标,请参见文件存储NAS

注意事项

性能测试前,请注意以下事项。

  • 吞吐最大不会超过ECS内网带宽,如果内网带宽太小,则吞吐会被流量控制。

    例如,您购买的是最低容量的通用容量型NAS文件系统,其初始读吞吐为150 MB/s。如果您的ECS内网带宽为100 Mbps,则吞吐最大可达12.5 MB/s,如果要测试达到150 MB/s,则需要至少12台ECS进行测试。 如果您的ECS内网带宽为1 Gbps,则吞吐最大可达到125 MB/s,如果要测试达到150 MB/s,则需要至少2台ECS进行测试。

  • 在Linux操作系统中,NFS客户端对于同时发起的NFS请求数量进行了控制,默认编译的内核中此参数值为2,严重影响性能。请在安装NFS客户端后,修改同时发起的NFS请求数量,提高NFS性能。具体操作,请参见如何修改同时发起的NFS请求数量?

  • 在Windows操作系统中,测试NFS协议NAS文件系统性能会受限于Windows NFS客户端串行执行单个文件系统的请求,请调整-numjobs参数增加FIO测试文件数量。

操作步骤

  1. 远程连接ECS实例。具体操作,请参见ECS连接方式

  2. 安装FIO测试工具。如果已安装,请跳过此步骤,直接运行性能测试命令。

    • Linux操作系统

      操作系统

      安装命令

      CentOS

      sudo yum install fio

      Redhat

      Alibaba Cloud Linux

      Ubuntu

      依次执行以下安装命令:

      1. sudo apt-get  update
      2. sudo apt-get install fio

      Debian

    • Windows操作系统

      您可以下载msi格式的安装包进行安装。FIO安装包下载地址,请参见fio官网

  3. 运行性能测试命令,具体的命令请参见下文。

Linux系统下的性能测试命令

本节以通用容量型NAS为例,在单台Linux ECS中执行以下命令测试性能。

  • 随机读IOPS:

    fio -numjobs=1 -iodepth=128 -direct=1 -ioengine=libaio -sync=1 -rw=randread -bs=4K -size=1G -time_based -runtime=60 -name=Fio -directory=/mnt

    测试结果样例:

    
    Fio_168690241742: (g=0): rw=randread, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=128
    fio-3.7
    Starting 1 process
    Fio_168690241742: Laying out IO file (1 file / 1024MiB)
    
    Fio_168690241742: (groupid=0, jobs=1): err= 0: pid=24515: Fri Jun 16 16:01:21 2023
       read: IOPS=15.1k, BW=59.1MiB/s (61.0MB/s)(3562MiB/60258msec)
        slat (usec): min=2, max=142291, avg= 5.22, stdev=149.03
        clat (usec): min=607, max=4629.5k, avg=8451.38, stdev=19797.83
         lat (usec): min=650, max=4629.5k, avg=8456.67, stdev=19798.32
        lat percentiles (usec):
         |  1.00th=[  758],  5.00th=[  816], 10.00th=[  857], 20.00th=[  938],
         | 30.00th=[ 1037], 40.00th=[ 1172], 50.00th=[ 1352], 60.00th=[ 1680],
         | 70.00th=[ 3163], 80.00th=[ 17957], 90.00th=[ 20055], 95.00th=[ 22414],
         | 99.00th=[ 83362], 99.50th=[ 92799], 99.90th=[175113], 99.95th=[278922],
         | 99.99th=[517997]
       bw (  KiB/s): min=58584, max=169104, per=100.00%, avg=60776.15, stdev=10028.08, samples=120
       iops        : min=14646, max=42276, avg=15193.99, stdev=2507.02, samples=120
      lat (usec)   : 750=0.88%, 1000=25.93%
      lat (msec)   : 2=38.35%, 4=5.66%, 10=1.74%, 20=17.00%, 50=8.61%
      lat (msec)   : 100=1.48%, 250=0.29%, 500=0.07%, 750=0.01%, 1000=0.01%
      cpu          : usr=2.86%, sys=11.57%, ctx=525042, majf=0, minf=160
      IO depths    : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=0.1%, >=64=100.0%
         submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
         complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.1%
         issued rwts: total=911950,0,0,0 short=0,0,0,0 dropped=0,0,0,0
         latency   : target=0, window=0, percentile=100.00%, depth=128
    
    Run status group 0 (all jobs):
       READ: bw=59.1MiB/s (61.0MB/s), 59.1MiB/s-59.1MiB/s (61.0MB/s-61.0MB/s), io=3562MiB (3735MB), run=60258-60258msec
    
  • 随机写IOPS:

    fio -numjobs=1 -iodepth=128 -direct=1 -ioengine=libaio -sync=1 -rw=randwrite -bs=4K -size=1G -time_based -runtime=60 -name=Fio -directory=/mnt

    测试结果样例:

    
    Fio_168690232321: (g=0): rw=randwrite, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=128
    fio-3.7
    Starting 1 process
    Fio_168690232321: Laying out IO file (1 file / 1024MiB)
    
    Fio_168690232321: (groupid=0, jobs=1): err= 0: pid=24409: Fri Jun 16 15:59:44 2023
      write: IOPS=15.2k, BW=59.4MiB/s (62.3MB/s)(3567MiB/60008msec)
        slat (usec): min=2, max=5193, avg= 4.94, stdev= 5.58
        clat (usec): min=1596, max=148914, avg=8405.03, stdev=4954.14
         lat (usec): min=1601, max=148918, avg=8410.06, stdev=4954.12
        lat percentiles (usec):
         |  1.00th=[ 2966],  5.00th=[ 3687], 10.00th=[ 4113], 20.00th=[ 4686],
         | 30.00th=[ 5145], 40.00th=[ 5735], 50.00th=[ 6259], 60.00th=[ 6849],
         | 70.00th=[10552], 80.00th=[14222], 90.00th=[15401], 95.00th=[16319],
         | 99.00th=[18482], 99.50th=[21103], 99.90th=[38536], 99.95th=[44303],
         | 99.99th=[81265]
       bw (  KiB/s): min=56408, max=95856, per=99.99%, avg=60870.87, stdev=5497.41, samples=120
       iops        : min=14102, max=23964, avg=15217.70, stdev=1374.35, samples=120
      lat (msec)   : 2=0.01%, 4=8.61%, 10=61.08%, 20=29.70%, 50=0.57%
      lat (msec)   : 100=0.02%, 250=0.01%
      cpu          : usr=2.67%, sys=8.95%, ctx=216723, majf=0, minf=27
      IO depths    : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=0.1%, >=64=100.0%
         submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
         complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.1%
         issued rwts: total=0,913236,0,0 short=0,0,0,0 dropped=0,0,0,0
         latency   : target=0, window=0, percentile=100.00%, depth=128
    
    Run status group 0 (all jobs):
      WRITE: bw=59.4MiB/s (62.3MB/s), 59.4MiB/s-59.4MiB/s (62.3MB/s-62.3MB/s), io=3567MiB (3741MB), run=60008-60008msec
    
  • 随机读吞吐:

    fio -numjobs=1 -iodepth=128 -direct=1 -ioengine=libaio -sync=1 -rw=randread -bs=1M -size=1G -time_based -runtime=60 -name=Fio -directory=/mnt

    测试结果样例:

    
    Fio_168690251150: (g=0): rw=randread, bs=(R) 1024KiB-1024KiB, (W) 1024KiB-1024KiB, (T) 1024KiB-1024KiB, ioengine=libaio, iodepth=128
    fio-3.7
    Starting 1 process
    Fio_168690251150: Laying out IO file (1 file / 1024MiB)
    
    Fio_168690251150: (groupid=0, jobs=1): err= 0: pid=24616: Fri Jun 16 16:03:05 2023
       read: IOPS=498, BW=500MiB/s (524MB/s)(29.4GiB/60257msec)
        slat (usec): min=80, max=251817, avg=98.36, stdev=1453.22
        clat (msec): min=11, max=519, avg=256.37, stdev=17.04
         lat (msec): min=11, max=519, avg=256.46, stdev=16.99
        lat percentiles (msec):
         |  1.00th=[  247],  5.00th=[  255], 10.00th=[  255], 20.00th=[  255],
         | 30.00th=[  255], 40.00th=[  255], 50.00th=[  257], 60.00th=[  257],
         | 70.00th=[  257], 80.00th=[  257], 90.00th=[  257], 95.00th=[  257],
         | 99.00th=[  271], 99.50th=[  376], 99.90th=[  481], 99.95th=[  493],
         | 99.99th=[  506]
       bw (  KiB/s): min=489472, max=532480, per=99.99%, avg=512076.73, stdev=3669.64, samples=120
       iops        : min=  478, max=  520, avg=500.03, stdev= 3.58, samples=120
      lat (msec)   : 20=0.03%, 50=0.05%, 100=0.09%, 250=1.47%, 500=98.75%
      lat (msec)   : 750=0.03%
      cpu          : usr=0.03%, sys=4.83%, ctx=30067, majf=0, minf=5
      IO depths    : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=0.1%, >=64=117.1%
         submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
         complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.1%
         issued rwts: total=30010,0,0,0 short=0,0,0,0 dropped=0,0,0,0
         latency   : target=0, window=0, percentile=100.00%, depth=128
    
    Run status group 0 (all jobs):
       READ: bw=500MiB/s (524MB/s), 500MiB/s-500MiB/s (524MB/s-524MB/s), io=29.4GiB (31.6GB), run=60257-60257msec
    
  • 随机写吞吐:

    fio -numjobs=1 -iodepth=128 -direct=1 -ioengine=libaio -sync=1 -rw=randwrite -bs=1M -size=1G -time_based -runtime=60 -name=Fio -directory=/mnt

    测试结果样例:

    测试结果中随机写带宽(BW)为 500MiB/s。

    
    Fio_168690260582: (g=0): rw=randwrite, bs=(R) 1024KiB-1024KiB, (W) 1024KiB-1024KiB, (T) 1024KiB-1024KiB, ioengine=libaio, iodepth=128
    fio-3.7
    Starting 1 process
    Fio_168690260582: Laying out IO file (1 file / 1024MiB)
    
    Fio_168690260582: (groupid=0, jobs=1): err= 0: pid=24705: Fri Jun 16 16:04:37 2023
      write: IOPS=498, BW=500MiB/s (524MB/s)(29.4GiB/60254msec)
        slat (usec): min=105, max=251450, avg=156.25, stdev=1450.74
        clat (msec): min=18, max=506, avg=256.29, stdev=17.20
         lat (msec): min=19, max=506, avg=256.45, stdev=17.15
        lat percentiles (msec):
         |  1.00th=[  243],  5.00th=[  253], 10.00th=[  253], 20.00th=[  255],
         | 30.00th=[  255], 40.00th=[  255], 50.00th=[  257], 60.00th=[  257],
         | 70.00th=[  257], 80.00th=[  257], 90.00th=[  259], 95.00th=[  259],
         | 99.00th=[  292], 99.50th=[  363], 99.90th=[  481], 99.95th=[  493],
         | 99.99th=[  506]
       bw (  KiB/s): min=471040, max=548864, per=99.99%, avg=512085.42, stdev=6121.76, samples=120
       iops        : min=  460, max=  536, avg=500.07, stdev= 5.98, samples=120
      lat (msec)   : 20=0.02%, 50=0.04%, 100=0.11%, 250=2.49%, 500=97.72%
      lat (msec)   : 750=0.03%
      cpu          : usr=3.24%, sys=4.52%, ctx=28949, majf=0, minf=4
      IO depths    : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=0.1%, >=64=117.0%
         submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
         complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.1%
         issued rwts: total=0,30009,0,0 short=0,0,0,0 dropped=0,0,0,0
         latency   : target=0, window=0, percentile=100.00%, depth=128
    
    Run status group 0 (all jobs):
      WRITE: bw=500MiB/s (524MB/s), 500MiB/s-500MiB/s (524MB/s-524MB/s), io=29.4GiB (31.6GB), run=60254-60254msec
    

Windows系统下的性能测试

本节以通用容量型NAS挂载到Z盘,FIO可执行文件安装在C:\Program Files\fio\fio.exe为例,执行以下命令测试性能。

说明

如果在Windows系统测试NFS协议NAS文件系统性能,受限于Windows NFS客户端串行执行单个文件系统的请求,请调整-numjobs参数增加FIO测试文件数量。

  • 随机读IOPS:

    "c:\Program Files\fio\fio.exe" -name=Fio -numjobs=2 -iodepth=128 -direct=1 -ioengine=windowsaio -sync=1 -rw=randread -bs=4K -size=1G -time_based -runtime=60 -group_reporting -thread -directory=Z\:\

    测试结果样例:

    
    Fio_168690138640: (g=0): rw=randread, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=windowsaio, iodepth=128
    ...
    fio-3.29
    Starting 2 threads
    Fio_168690138640: Laying out IO file (1 file / 1024MiB)
    Fio_168690138640: Laying out IO file (1 file / 1024MiB)
    
    Fio_168690138640: (groupid=0, jobs=2): err= 0: pid=3716: Fri Jun 16 15:57:13 2023
      read: IOPS=15.2k, BW=59.3MiB/s (62.2MB/s)(3559MiB/60015msec)
        slat (usec): min=2, max=1923, avg= 9.75, stdev= 5.93
        clat (usec): min=574, max=172102, avg=16841.03, stdev=13743.23
         lat (usec): min=582, max=172118, avg=16850.79, stdev=13743.03
        clat percentiles (usec):
         |  1.00th=[  1565],  5.00th=[  2376], 10.00th=[  3064], 20.00th=[  4752],
         | 30.00th=[  6390], 40.00th=[  8455], 50.00th=[ 16581], 60.00th=[ 19268],
         | 70.00th=[ 20841], 80.00th=[ 23725], 90.00th=[ 34341], 95.00th=[ 42730],
         | 99.00th=[ 61604], 99.50th=[ 69731], 99.90th=[ 89654], 99.95th=[ 98042],
         | 99.99th=[113771]
       bw (  KiB/s): min=57584, max=135136, per=100.00%, avg=60797.96, stdev=3971.16, samples=238
       iops        : min=14396, max=33783, avg=15199.29, stdev=992.75, samples=238
      lat (usec)   : 750=0.01%, 1000=0.08%
      lat (msec)   : 2=2.71%, 4=13.18%, 10=27.51%, 20=20.78%, 50=32.76%
      lat (msec)   : 100=2.94%, 250=0.04%
      cpu          : usr=0.00%, sys=5.83%, ctx=0, majf=0, minf=0
      IO depths    : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=0.1%, >=64=100.0%
         submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
         complete  : 0=0.0%, 4=100.0%, 8=0.1%, 16=0.1%, 32=0.1%, 64=0.1%, >=64=0.1%
         issued rwts: total=911224,0,0,0 short=0,0,0,0 dropped=0,0,0,0
         latency   : target=0, window=0, percentile=100.00%, depth=128
    
    Run status group 0 (all jobs):
       READ: bw=59.3MiB/s (62.2MB/s), 59.3MiB/s-59.3MiB/s (62.2MB/s-62.2MB/s), io=3559MiB (3732MB),  run=60015-60015msec
    
  • 随机写IOPS:

    "c:\Program Files\fio\fio.exe" -name=Fio -numjobs=2 -iodepth=128 -direct=1 -ioengine=windowsaio -sync=1 -rw=randwrite -bs=4K -size=1G -time_based -runtime=60 -group_reporting -thread -directory=Z\:\

    测试结果样例:

    
    Fio_168690107265: (g=0): rw=randwrite, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=windowsaio, iodepth=128
    ...
    fio-3.29
    Starting 2 threads
    Fio_168690107265: Laying out IO file (1 file / 1024MiB)
    Fio_168690107265: Laying out IO file (1 file / 1024MiB)
    
    Fio_168690107265: (groupid=0, jobs=2): err= 0: pid=4056: Fri Jun 16 15:38:56 2023
      write: IOPS=15.3k, BW=59.9MiB/s (62.8MB/s)(3592MiB/60012msec); 0 zone resets
        slat (usec): min=2, max=4469, avg=11.04, stdev=16.84
        clat (usec): min=829, max=98497, avg=16640.38, stdev=3644.71
         lat (usec): min=1373, max=98502, avg=16651.42, stdev=3644.35
        clat percentiles (usec):
         |  1.00th=[10421],  5.00th=[13042], 10.00th=[13566], 20.00th=[14091],
         | 30.00th=[14746], 40.00th=[15533], 50.00th=[16450], 60.00th=[17171],
         | 70.00th=[17695], 80.00th=[18482], 90.00th=[19530], 95.00th=[20841],
         | 99.00th=[32375], 99.50th=[36439], 99.90th=[42206], 99.95th=[46924],
         | 99.99th=[76022]
       bw (  KiB/s): min=53596, max=67392, per=100.00%, avg=61371.35, stdev=1490.41, samples=238
       iops        : min=13398, max=16848, avg=15342.70, stdev=372.62, samples=238
      lat (usec)  : 1000=0.01%
      lat (msec)  : 2=0.01%, 4=0.07%, 10=0.82%, 20=91.27%, 50=7.80%
      lat (msec)  : 100=0.04%
      cpu          : usr=0.00%, sys=5.83%, ctx=0, majf=0, minf=0
      IO depths    : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=0.2%, >=64=99.7%
         submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
         complete  : 0=0.0%, 4=97.5%, 8=0.9%, 16=1.0%, 32=0.6%, 64=0.1%, >=64=0.1%
         issued rwts: total=0,919647,0,0 short=0,0,0,0 dropped=0,0,0,0
         latency   : target=0, window=0, percentile=100.00%, depth=128
    
    Run status group 0 (all jobs):
      WRITE: bw=59.9MiB/s (62.8MB/s), 59.9MiB/s-59.9MiB/s (62.8MB/s-62.8MB/s), io=3592MiB (3767MB), run=60012-60012msec
    
  • 随机读吞吐:

    "c:\Program Files\fio\fio.exe" -name=Fio -numjobs=2 -iodepth=128 -direct=1 -ioengine=windowsaio -sync=1 -rw=randread -bs=1M -size=1G -time_based -runtime=60 -group_reporting -thread -directory=Z\:\

    测试结果样例:

    
    Fio_168690086312: (g=0): rw=randread, bs=(R) 1024KiB-1024KiB, (W) 1024KiB-1024KiB, (T) 1024KiB-1024KiB, ioengine=windowsaio, iodepth=128
    ...
    fio-3.29
    Starting 2 threads
    Fio_168690086312: Laying out IO file (1 file / 1024MiB)
    Fio_168690086312: Laying out IO file (1 file / 1024MiB)
    
    Fio_168690086312: (groupid=0, jobs=2): err= 0: pid=6400: Fri Jun 16 15:35:46 2023
      read: IOPS=655, BW=656MiB/s (688MB/s)(38.7GiB/60371msec)
        slat (usec): min=20, max=7533, avg=60.61, stdev=84.70
        clat (msec): min=42, max=2036, avg=389.97, stdev=105.38
         lat (msec): min=42, max=2036, avg=390.03, stdev=105.37
        clat percentiles (msec):
         |  1.00th=[  184],  5.00th=[  257], 10.00th=[  368], 20.00th=[  376],
         | 30.00th=[  380], 40.00th=[  384], 50.00th=[  388], 60.00th=[  393],
         | 70.00th=[  397], 80.00th=[  405], 90.00th=[  414], 95.00th=[  422],
         | 99.00th=[  785], 99.50th=[ 1217], 99.90th=[ 1888], 99.95th=[ 1938],
         | 99.99th=[ 2005]
       bw (  KiB/s): min=282587, max=1051351, per=99.93%, avg=671112.03, stdev=64303.07, samples=240
       iops        : min=  275, max= 1026, avg=655.22, stdev=62.81, samples=240
      lat (msec)   : 50=0.01%, 100=0.19%, 250=4.68%, 500=93.38%, 750=0.62%
      lat (msec)   : 1000=0.53%, 2000=0.57%, >=2000=0.02%
      cpu          : usr=0.00%, sys=1.66%, ctx=0, majf=0, minf=0
      IO depths    : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=0.2%, >=64=99.7%
         submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
         complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.1%, 64=0.0%, >=64=0.1%
         issued rwts: total=39594,0,0,0 short=0,0,0,0 dropped=0,0,0,0
         latency   : target=0, window=0, percentile=100.00%, depth=128
    
    Run status group 0 (all jobs):
       READ: bw=656MiB/s (688MB/s), 656MiB/s-656MiB/s (688MB/s-688MB/s), io=38.7GiB (41.5GB), run=60371-60371msec
    
  • 随机写吞吐:

    "c:\Program Files\fio\fio.exe" -name=Fio -numjobs=2 -iodepth=128 -direct=1 -ioengine=windowsaio -sync=1 -rw=randwrite -bs=1M -size=1G -time_based -runtime=60 -group_reporting -thread -directory=Z\:\

    测试结果样例:

    
    Fio_168690096808: (g=0): rw=randwrite, bs=(R) 1024KiB-1024KiB, (W) 1024KiB-1024KiB, (T) 1024KiB-1024KiB, ioengine=windowsaio, iodepth=128
    ...
    fio-3.29
    Starting 2 threads
    Fio_168690096808: Laying out IO file (1 file / 1024MiB)
    Fio_168690096808: Laying out IO file (1 file / 1024MiB)
    
    Fio_168690096808: (groupid=0, jobs=2): err= 0: pid=4496: Fri Jun 16 15:37:12 2023
      write: IOPS=874, BW=874MiB/s (917MB/s)(51.5GiB/60296msec); 0 zone resets
        slat (usec): min=54, max=14217, avg=99.50, stdev=104.17
        clat (msec): min=8, max=972, avg=292.48, stdev=72.43
         lat (msec): min=8, max=972, avg=292.58, stdev=72.43
        clat percentiles (msec):
         |  1.00th=[   89],  5.00th=[  174], 10.00th=[  220], 20.00th=[  249],
         | 30.00th=[  292], 40.00th=[  300], 50.00th=[  300], 60.00th=[  305],
         | 70.00th=[  305], 80.00th=[  313], 90.00th=[  351], 95.00th=[  359],
         | 99.00th=[  575], 99.50th=[  667], 99.90th=[  852], 99.95th=[  885],
         | 99.99th=[  919]
       bw (  KiB/s): min=278528, max=1503232, per=100.00%, avg=895241.67, stdev=80207.46, samples=240
       iops        : min=  272, max= 1468, avg=873.98, stdev=78.34, samples=240
      lat (msec)   : 10=0.01%, 20=0.14%, 50=0.24%, 100=0.92%, 250=19.01%
      lat (msec)   : 500=78.07%, 750=1.34%, 1000=0.26%
      cpu          : usr=1.66%, sys=0.83%, ctx=0, majf=0, minf=0
      IO depths    : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=0.1%, >=64=99.8%
         submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
         complete  : 0=0.0%, 4=99.1%, 8=0.6%, 16=0.3%, 32=0.1%, 64=0.1%, >=64=0.1%
         issued rwts: total=0,52715,0,0 short=0,0,0,0 dropped=0,0,0,0
         latency   : target=0, window=0, percentile=100.00%, depth=128
    
    Run status group 0 (all jobs):
      WRITE: bw=874MiB/s (917MB/s), 874MiB/s-874MiB/s (917MB/s-917MB/s), io=51.5GiB (55.3GB), run=60296-60296msec
    

FIO参数说明

测试命令中有关FIO各参数含义的说明如下表所示。

参数

说明

direct

表示是否使用direct I/O。默认值:1。

  • 值为1:表示使用direct I/O,忽略I/O缓存,数据直写。

  • 值为0:表示不使用direct I/O。

iodepth

表示测试时的IO队列深度。例如-iodepth=1表示FIO控制请求中的I/O最大个数为1。

rw

表示测试时的读写策略。您可以设置为:

  • randwrite:随机写。

  • randread:随机读。

  • read:顺序读。

  • write:顺序写。

  • randrw:混合随机读写。

ioengine

表示测试时FIO选择哪种I/O引擎,通常选择libaio,更符合日常应用模式,更多的选择请查阅FIO官方文档。

bs

表示I/O单元的块大小(block size)。读取和写入的值可以以read、write格式单独指定,其中任何一个都可以为空以将该值保留为其默认值。

size

表示测试文件大小。

FIO会将指定的文件大小全部读/写完成,然后才停止测试,除非受到其他选项(例如运行时)的限制。如果未指定该参数,FIO将使用给定文件或设备的完整大小。也可以将大小作为1到100之间的百分比给出。例如指定size=20%,FIO将使用给定文件或设备完整大小的20%空间。

numjobs

表示测试的并发线程数。

runtime

表示测试时间,即FIO运行时长。

如果未指定该参数,则FIO会持续将上述size指定大小的文件,以每次bs值为块大小读/写完。

group_reporting

表示测试结果显示模式。

如果指定该参数,测试结果会汇总每个进程的统计信息,而不是以不同任务来统计信息。

directory

表示待测试的文件系统挂载路径。

name

表示测试任务名称,可以随意设定。

有关各参数的更多说明,请参见FIO MAN手册

相关问题

更多有关NAS性能方面的FAQ,请参见性能说明FAQ