更新时间:2023-10-25 GMT+08:00

SFS Turbo性能测试

fio是一个开源的I/O压力测试工具,可以使用fio工具对SFS进行吞吐量和IOPS的性能测试。

前提条件

已在云服务器上安装fio工具。fio可从官网GitHub下载。

注意和说明

测试性能依赖client和server之间的网络带宽及文件系统的容量大小。

安装fio

以Linux CentOS系统为例说明:

  1. 在官网下载fio。

    yum install fio

  2. 安装libaio引擎。

    yum install libaio-devel

  3. 查看fio版本。

    fio --version

文件系统性能数据

SFS Turbo文件系统的性能主要有IOPS和吞吐量等指标,具体各指标数据参见表1

表1 性能数据表

参数

普通型

HPC型

SFS Turbo标准型

SFS Turbo性能型

125MB/s/TiB

250MB/s/TiB

最大容量

32TB

32TB

1PB

1PB

最大IOPS

5K

20K

1000K

1000K

最大吞吐量

150 MB/s

350 MB/s

20 GB/s

20 GB/s

IOPS性能计算公式

IOPS = min (5000, 1200 + 6 × 容量)

其中,容量单位为GB

IOPS = min (20000, 1500 + 20 × 容量)

其中,容量单位为GB

IOPS = min (1000000, 6000 × 容量)

其中,容量单位为TB

IOPS = min (1000000, 12500 × 容量)

其中,容量单位为TB

通用测试配置样例

以下提供的预估值为单台弹性云服务器ECS测试的结果。建议使用多台ECS测试,以达到弹性文件服务的性能指标。

本文以SFS Turbo性能型,云服务器规格如下为例说明。

规格:通用计算增强型 | c3.xlarge.4 | 4vCPUs | 16GB

镜像:CentOS 7.564bit

混合读写,读写比例7:3

  • fio命令:

    fio --randrepeat=1 --ioengine=libaio --name=test -output=output.log --direct=1 --filename=/mnt/nfs/test_fio --bs=4k --iodepth=128 --size=10240M --readwrite=rw --rwmixwrite=30 --fallocate=none

    其中,“/mnt/nfs/test_fio”为待测试的目标文件的挂载路径,需具体到文件名,即这里要测试的是“/mnt/nfs”目录下的“test_fio”文件,请根据实际填写。

  • fio结果:

混合读写,读写比例3:7

  • fio命令:

    fio --randrepeat=1 --ioengine=libaio --name=test -output=output.log --direct=1 --filename=/mnt/nfs/test_fio --bs=4k --iodepth=128 --size=10240M --readwrite=rw --rwmixwrite=70 --fallocate=none

    其中,“/mnt/nfs/test_fio”为待测试的目标文件的挂载路径,需具体到文件名,即这里要测试的是“/mnt/nfs”目录下的“test_fio”文件,请根据实际填写。

  • fio结果:

顺序读IOPS

  • fio命令:

    fio --randrepeat=1 --ioengine=libaio --name=test -output=output.log --direct=1 --filename=/mnt/sfs-turbo/test_fio --bs=4k --iodepth=128 --size=10240M --readwrite=read --fallocate=none

    其中,“/mnt/sfs-turbo/test_fio”为待测试的目标文件的挂载路径,需具体到文件名,即这里要测试的是“/mnt/sfs-turbo”目录下的“test_fio”文件,请根据实际填写。

  • fio结果:

随机读IOPS

  • fio命令:

    fio --randrepeat=1 --ioengine=libaio --name=test -output=output.log --direct=1 --filename=/mnt/sfs-turbo/test_fio --bs=4k --iodepth=128 --size=10240M --readwrite=randread --fallocate=none

    其中,“/mnt/sfs-turbo/test_fio”为待测试的目标文件的挂载路径,需具体到文件名,即这里要测试的是“/mnt/sfs-turbo”目录下的“test_fio”文件,请根据实际填写。

  • fio结果:

顺序写IOPS

  • fio命令:

    fio --randrepeat=1 --ioengine=libaio --name=test -output=output.log --direct=1 --filename=/mnt/sfs-turbo/test_fio --bs=4k --iodepth=128 --size=10240M --readwrite=write --fallocate=none

    其中,“/mnt/sfs-turbo/test_fio”为待测试的目标文件的挂载路径,需具体到文件名,即这里要测试的是“/mnt/sfs-turbo”目录下的“test_fio”文件,请根据实际填写。

  • fio结果:

随机写IOPS

  • fio命令:

    fio --randrepeat=1 --ioengine=libaio --name=test -output=output.log --direct=1 --filename=/mnt/sfs-turbo/test_fio --bs=4k --iodepth=128 --size=10240M --readwrite=randwrite --fallocate=none

    其中,“/mnt/sfs-turbo/test_fio”为待测试的目标文件的挂载路径,需具体到文件名,即这里要测试的是“/mnt/sfs-turbo”目录下的“test_fio”文件,请根据实际填写。

  • fio结果:

顺序读带宽

  • fio命令:

    fio --randrepeat=1 --ioengine=libaio --name=test -output=output.log --direct=1 --filename=/mnt/sfs-turbo/test_fio --bs=1M --iodepth=128 --size=10240M --readwrite=read --fallocate=none

    其中,“/mnt/sfs-turbo/test_fio”为待测试的目标文件的挂载路径,需具体到文件名,即这里要测试的是“/mnt/sfs-turbo”目录下的“test_fio”文件,请根据实际填写。

  • fio结果:

随机读带宽

  • fio命令:

    fio --randrepeat=1 --ioengine=libaio --name=test -output=output.log --direct=1 --filename=/mnt/sfs-turbo/test_fio --bs=1M --iodepth=128 --size=10240M --readwrite=randread --fallocate=none

    其中,“/mnt/sfs-turbo/test_fio”为待测试的目标文件的挂载路径,需具体到文件名,即这里要测试的是“/mnt/sfs-turbo”目录下的“test_fio”文件,请根据实际填写。

  • fio结果:

顺序写带宽

  • fio命令:

    fio --randrepeat=1 --ioengine=libaio --name=test -output=output.log --direct=1 --filename=/mnt/sfs-turbo/test_fio --bs=1M --iodepth=128 --size=10240M --readwrite=write --fallocate=none

    其中,“/mnt/sfs-turbo/test_fio”为待测试的目标文件的挂载路径,需具体到文件名,即这里要测试的是“/mnt/sfs-turbo”目录下的“test_fio”文件,请根据实际填写。

  • fio结果:

随机写带宽

  • fio命令:

    fio --randrepeat=1 --ioengine=libaio --name=test -output=output.log --direct=1 --filename=/mnt/sfs-turbo/test_fio --bs=1M --iodepth=128 --size=10240M --readwrite=randwrite --fallocate=none

    其中,“/mnt/sfs-turbo/test_fio”为待测试的目标文件的挂载路径,需具体到文件名,即这里要测试的是“/mnt/sfs-turbo”目录下的“test_fio”文件,请根据实际填写。

  • fio结果: