You need to enable JavaScript to run this app.
文档中心
文件存储 vePFS

文件存储 vePFS

复制全文
下载 pdf
用户指南
性能测试
复制全文
下载 pdf
性能测试

本文介绍智算版文件系统的测试性能指标、Vdbench测试参数、测试示例等内容。

背景信息

为了满足智算版文件系统的性能测试需求,仅仅使用 FIO 往往不足以达到要求。Vdbench 工具提供了多客户端联机测试和复杂的工作负载模拟功能,建议您使用 Vdbench 工具对智算版文件系统进行性能测试和评估。
性能测试时,会使用不同的性能指标来衡量文件系统在特定负载条件下的性能表现,具体的性能指标说明如下:

  • IOPS:每秒读写数据块的数量,单位为 个/s。通常基于 500MB 的文件,采用并发(多机多线程)的 4K 小 IO 进行 IOPS的基准测试。
  • 吞吐:每秒读写数据量的大小,单位为 GB/s 或 MB/s。通常基于 500MB 的文件,采用并发(多机多线程)的 2M 大 IO 进行吞吐的基准测试。

前提条件

已安装 Vdbench 软件,关于 Vdbench 软件包的地址,请参见 Vdbench Downloads

环境准备

由于智算版文件系统性能规格的限制,除时延参数外,您需要准备一定规模和核心数机器进行并发压测才能测试出文件系统性能最大值。
建议您压测时准备 10 台 32C 以上的云服务器作为客户端。如果有特殊压测需求,您也可以根据实际情况配置对应的云服务器。

测试示例

带宽场景测试示例

messagescan=no
hd=default,vdbench=/root/vdbench-io/vdbench50406/,shell=ssh,user=root
hd=hd1,system=node1(测试客户端主机信息,自行调整)
hd=hd2,system=node2(测试客户端主机信息,自行调整)
hd=hd3,system=node3(测试客户端主机信息,自行调整)
hd=hd4,system=node4(测试客户端主机信息,自行调整)
hd=hd5,system=node5(测试客户端主机信息,自行调整)
hd=hd6,system=node6(测试客户端主机信息,自行调整)
hd=hd7,system=node7(测试客户端主机信息,自行调整)
hd=hd8,system=node8(测试客户端主机信息,自行调整)
hd=hd9,system=node9(测试客户端主机信息,自行调整)
hd=hd10,system=node10(测试客户端主机信息,自行调整)
fsd=fsd1_1,anchor=/mnt/vepfs/xxxx(文件测试路径,自行调整),depth=2,width=2,files=2000(文件个数,自行调整),size=500m,openflags=o_direct,shared=yes
fwd=fwd1_1,fsd=fsd1_1,host=hd1,operation=read,fileio=random,fileselect=random
fwd=fwd1_2,fsd=fsd1_1,host=hd2,operation=read,fileio=random,fileselect=random
fwd=fwd1_3,fsd=fsd1_1,host=hd3,operation=read,fileio=random,fileselect=random
fwd=fwd1_4,fsd=fsd1_1,host=hd4,operation=read,fileio=random,fileselect=random
fwd=fwd1_5,fsd=fsd1_1,host=hd5,operation=read,fileio=random,fileselect=random
fwd=fwd1_6,fsd=fsd1_1,host=hd6,operation=read,fileio=random,fileselect=random
fwd=fwd1_7,fsd=fsd1_1,host=hd7,operation=read,fileio=random,fileselect=random
fwd=fwd1_8,fsd=fsd1_1,host=hd8,operation=read,fileio=random,fileselect=random
fwd=fwd1_9,fsd=fsd1_1,host=hd9,operation=read,fileio=random,fileselect=random
fwd=fwd1_10,fsd=fsd1_1,host=hd10,operation=read,fileio=random,fileselect=random
fwd=format,threads=20,xfersize=2m
rd=randr_500m,fwd=fwd1_*,forxfersize=2m,threads=128,fwdrate=max,format=restart,elapsed=600,interval=1,pause=1m

IOPS 场景测试示例

messagescan=no
hd=default,vdbench=/root/vdbench-io/vdbench50406/,shell=ssh,user=root
hd=hd1,system=node1(测试客户端主机信息,自行调整)
hd=hd2,system=node2(测试客户端主机信息,自行调整)
hd=hd3,system=node3(测试客户端主机信息,自行调整)
hd=hd4,system=node4(测试客户端主机信息,自行调整)
hd=hd5,system=node5(测试客户端主机信息,自行调整)
hd=hd6,system=node6(测试客户端主机信息,自行调整)
hd=hd7,system=node7(测试客户端主机信息,自行调整)
hd=hd8,system=node8(测试客户端主机信息,自行调整)
hd=hd9,system=node9(测试客户端主机信息,自行调整)
hd=hd10,system=node10(测试客户端主机信息,自行调整)
fsd=fsd1_1,anchor=/mnt/vepfs/xxxx(文件测试路径,自行调整),depth=2,width=2,files=2000(文件个数,自行调整),size=500m,openflags=o_direct,shared=yes
fwd=fwd1_1,fsd=fsd1_1,host=hd1,operation=read,fileio=random,fileselect=random
fwd=fwd1_2,fsd=fsd1_1,host=hd2,operation=read,fileio=random,fileselect=random
fwd=fwd1_3,fsd=fsd1_1,host=hd3,operation=read,fileio=random,fileselect=random
fwd=fwd1_4,fsd=fsd1_1,host=hd4,operation=read,fileio=random,fileselect=random
fwd=fwd1_5,fsd=fsd1_1,host=hd5,operation=read,fileio=random,fileselect=random
fwd=fwd1_6,fsd=fsd1_1,host=hd6,operation=read,fileio=random,fileselect=random
fwd=fwd1_7,fsd=fsd1_1,host=hd7,operation=read,fileio=random,fileselect=random
fwd=fwd1_8,fsd=fsd1_1,host=hd8,operation=read,fileio=random,fileselect=random
fwd=fwd1_9,fsd=fsd1_1,host=hd9,operation=read,fileio=random,fileselect=random
fwd=fwd1_10,fsd=fsd1_10,host=hd10,operation=read,fileio=random,fileselect=random
fwd=format,threads=20,xfersize=2m
rd=randr_500m,fwd=fwd1_*,forxfersize=4k,threads=128,fwdrate=max,format=restart,elapsed=600,interval=1,pause=1m

Vdbench 测试参数

说明

文件系统参数文件定义顺序为:HD、FSD、FWD、RD。

HD(Host Define)参数

HD 参数为非必选项,单机运行时不需要配置该参数,一般只有在多主机联机测试时才需要配置该参数。

hd=default,vdbench=/root/vdbench50406,user=root,shell=ssh
hd=hd1,system=node241
hd=hd2,system=node242
hd=hd3,system=node243

参数

说明

hd

主机定义的名称,多主机运行时,可以使用 hd1、hd2 等名称进行区分。

system

主机 IP 地址或主机名称。

vdbench

Vdbench 执行文件存放路径,当多主机存放路径不同时,可在 hd 定义时单独指定该路径。

user

slave 和 master 之间通信使用的用户。

shell

多主机联机测试时,mater 和 slave 主机间通信方式。取值说明如下:

  • rsh:使用 rsh 互信,由于 rsh 使用明文传输,安全级别不够,不建议使用该种通信方式。
  • ssh:使用 ssh 互信,通常 Linux 主机联机时使用此通信方式。
  • vdbench:需要在所有 slave 主机运行 vdbench rsh 命令启用 Vdbench 本身的 rsh 守护进程,通常 Window 主机联机时使用此通信方式。

默认值为 rsh

FSD(File System Define)参数

fsd=default,openflags=directio,depth=2,width=3,files=2,size=128k
fsd=fsd1,anchor=/mnt/client1
fsd=fsd2,anchor=/mnt/client2
fsd=fsd3,anchor=/mnt/client3

参数

说明

fsd

文件系统定义的名称,多文件系统时(fsd1fsd2fsd3…),可以指定 default,将相同的参数作为所有 fsd 的默认值。

openflags

通过设置为 o_directdirectio,以无缓冲缓存的方式进行读写操作。

anchor

文件写入目录,Linux 指定路径为 /dir01;Windows 指定路径为 E:\dir01

depth

创建目录层级数,即目录深度。

width

每层文件夹的子文件夹数。

files

测试文件个数。

说明

Vdbench 测试过程中会生成多层级目录结构,实际只有最后一层目录会生成测试文件。

size

每个测试文件大小。

shared

用于设置客户端是否共享目录结构,取值如下:

  • yes:不同的 slave 可以平分一个目录下所有的文件来进行访问,相当于每个 slave 有各自等分的访问区域。当多主机联机测试时,写入的根目录 anchor 为同一个路径时,需要指定参数值为 yes
  • no:不同的 slave 可以独占一个目录下所有的文件来进行访问。

默认值为no

说明

depthwidthfiles 之间的计算公式如下:

  • 最后一层生成文件夹个数=width^depth
  • 测试文件个数=width^depth × files

其中,^ 表示次方。例如 width 为 3,depth为 2,则最后一层生成文件夹个数为 3 的 2 次方。

FWD(FileSystem Workload Defile)参数

fwd=default,operation=read,xfersize=4k,fileio=sequential,fileselect=random,threads=2
fwd=fwd1,fsd=fsd1,host=hd1
fwd=fwd2,fsd=fsd2,host=hd2
fwd=fwd3,fsd=fsd3,host=hd3

参数

说明

fwd

文件系统工作负载定义的名称,多文件系统工作负载定义时,可以使用 fwd1、fwd2、fwd3 进行区分。

fsd

工作负载使用文件存储定义的名称。

host

工作负载使用的主机。

operation

文件操作方式,可选值为 readwrite

rdpct

读操作占比百分比,一般混合读写时需要指定该参数。可选值为0~100,当值为 60 时,则混合读写比为 6:4。

fileio

文件 I/O 执行的方式,可选值为 randomsequential

fileselect

选择文件或目录的方式,可选值为 randomsequential

xfersizes

数据传输(读取和写入操作)处理的数据大小,即单次 IO 大小。

threads

工作负载的并发线程数量。

注意

默认情况下,预填数据工作负载定义为 threads=8,xfersize=128k,即预填数据使用 8 线程,IO 大小为 128K,如需更改默认预填数据工作负载定义,则需要增加参数指定线程数和 IO 大小(fwd=format,threads=nn,xfersize=nn)。

RD(Run Define)参数

rd=rd1,fwd=(fwd1-fwd3),fwdrate=max,format=restart,elapsed=604800,interval=10

参数

说明

rd

文件系统运行定义的名称。

fwd

文件系统工作负载定义的名称。

fwdrate

每秒执行的文件系统操作数量。设置为 max,表示不做任何限制,按照最大强度自适应。

format

预处理目录和文件结构的方式,取值说明如下:

  • no:不执行 format 预处理操作,如测试目录不存在文件时,Vdbench 会由于无可用文件读写而异常退出。
  • yes:删除测试目录已有文件结构,并且重新创建新的文件结构。
  • restart:只创建未生成的目录或文件,并且增大未达到实际大小的文件。

默认值为 no

elapsed

测试运行持续时间,单位为秒,默认值为30

interval

结果输出打印时间间隔,单位为秒。

FAQ

使用 Vdbench 报错 open failed for xxx
使用 Vdbench 测试过程中,测试中断,报错信息如下:

19:37:41.155 19:37:44.813 error: 2019:37:41.155 19:37:44.813 file_open(), open /trash/64M/vdb.1_47.dir/vdb.2_24.dir/vdb_f0002.file failed
19:37:41.155 19:37:44.814 error: 2019:37:41.155 19:37:44.814 file_open(), open /trash/64M/vdb.1_47.dir/vdb.2_24.dir/vdb_f0003.file failed
19:37:41.156 19:37:44.814 Maximum native memory allocation:    1,048,576; Current allocation:    1,048,57619:37:41.156 19:37:44.814 Maximum native memory allocation:    1,048,576; Current allocation:    1,048,57619:37:41.156 19:37:44.814 error: 2019:37:41.156 19:37:44.814 
19:37:41.156 19:37:44.814 open failed for /trash/64M/vdb.1_47.dir/vdb.2_24.dir/vdb_f0002.file
19:37:41.156 19:37:44.814 
19:37:41.158 java.lang.RuntimeException: open failed for /trash/64M/vdb.1_47.dir/vdb.2_24.dir/vdb_f0002.file

Vdbench 默认限制了 Java 内存使用量,测试期间 Java 运行内存不足才导致测试异常中断。您可以增大 Vdbench 运行脚本的 Java 内存参数。

[root@no**** ~]# cat vdbench50406/vdbench
if [ "$1" == "SlaveJvm" ]; then
  $java -client -Xmx10240m -Xms128m -cp $cp Vdb.SlaveJvm $*
  exit $?else
  $java -client -Xmx10240m  -Xms64m  -cp $cp Vdb.Vdbmain $*
  exit $?
fi

使用 Vdbench 报错 Minimum required Java version for Vdbench is 1.7.0
根据官方相关说明,Vdbench50407 之前的版本,具有 Java 检测功能,如果 Vdbench 版本不兼容 Java 版本,则会报错。Vdbench50407 版本则不存在 Java 兼容问题。您可以在不变更现有 Java 版本的情况下,升级 Vdbench 至 vdbench50407 版本,或者手动安装 Java。

// Removed as per 50407 because of java 1.10.x
    //checkJavaVersion();

    //....

     private static void checkJavaVersion()
  {
    if (common.get_debug(common.USE_ANY_JAVA))
      return;
    if (!JVMCheck.isJREValid(System.getProperty("java.version"), 1, 7, 0))
    {
      System.out.print("*\n*\n*\n");
      System.out.println("* Minimum required Java version for Vdbench is 1.7.0; \n" +
                         "* You are currently running " + System.getProperty("java.version") +
                         "\n* Vdbench terminated.");
      System.out.println("*\n*\n*\n");

      System.exit(-99);
    }
  } 
最近更新时间:2025.06.18 11:01:51
这个页面对您有帮助吗?
有用
有用
无用
无用