FIO 工具测试

测试环境

3台服务器:ceph配置内外网分离,外网使用万兆线,内网使用千兆线,osd共21个。

1台客户端:安装fio工具、内核客户端,使用万兆线。

测试目的

针对fio工具中的iodepth(队列深度)和numjobs(线程数)参数,分析使用fio工具时,哪个参数对带宽值测试结果影响比较大。

测试思路

测试过程:集群通过内核客户端挂载到客户机上,fio工具参数中,使用块大小为1M,一次测试写入10G文件,测试时间300s。测试过程中,观察磁盘的读写速度、使用率、IO操作的服务时间与IO请求的处理时间等参数,并记录带宽值与延时时间。

测试场景:

1、单独使用iodepth参数,测试块大小为1M随机读写,记录带宽值与延时时间等;

2、单独使用numjobs参数,测试块大小为1M随机读写,记录带宽值与延时时间等;

3、同时使用iodepth、numjobs参数,保持numjobs参数为1,加大iodepth参数,测试块大小为1M随机读写,记录带宽值与延时时间等;

4、同时使用iodepth、numjobs参数,保持iodepth参数为1,加大numjobs参数,测试块大小为1M随机读写,记录带宽值与延时时间等;

5、同时使用iodepth、numjobs参数,iodepth与numjobs参数值相等,测试块大小为1M随机读写,记录带宽值与延时时间等。

测试过程命令

1.1 单独测试IO深度,IO深度为1,1M随机写

fio -filename=/xuqi/ceph/iow1 -direct=1 -iodepth=1 -thread -rw=randwrite -ioengine=libaio -bs=1M -size=10G -runtime=180 -group_reporting -name=Fio_Write

bw=18605KB/s,clat=55ms

1.2 单独测试IO深度,IO深度为2,1M随机写

fio -filename=/xuqi/ceph/iow2 -direct=1 -iodepth=2 -thread -rw=randwrite -ioengine=libaio -bs=1M -size=10G -runtime=180 -group_reporting -name=Fio_Write

bw=18993KB/s,clat=107ms

1.3 单独测试IO深度,IO深度为4,1M随机写

fio -filename=/xuqi/ceph/iow4 -direct=1 -iodepth=4 -thread -rw=randwrite -ioengine=libaio -bs=1M -size=10G -runtime=180 -group_reporting -name=Fio_Write

bw=18295KB/s,clat=223ms

1.4 单独测试IO深度,IO深度为8,1M随机写

fio -filename=/xuqi/ceph/iow8 -direct=1 -iodepth=8 -thread -rw=randwrite -ioengine=libaio -bs=1M -size=10G -runtime=180 -group_reporting -name=Fio_Write

bw=18801KB/s,clat=435ms

1.5 单独测试IO深度,IO深度为16,1M随机写

fio -filename=/xuqi/ceph/iow16 -direct=1 -iodepth=16 -thread -rw=randwrite -ioengine=libaio -bs=1M -size=10G -runtime=180 -group_reporting -name=Fio_Write

bw=18523KB/s,clat=882ms

2.1 单独测试numjobs,numjobs为1,1M随机写

fio -filename=/xuqi/ceph/njw1 -direct=1 -numjobs=1 -thread -rw=randwrite -ioengine=libaio -bs=1M -size=10G -runtime=180 -group_reporting -name=Fio_Write

bw=18647KB/s,clat=54ms

2.2 单独测试numjobs,numjobs为2,1M随机写

fio -filename=/xuqi/ceph/njw2 -direct=1 -numjobs=2 -thread -rw=randwrite -ioengine=libaio -bs=1M -size=10G -runtime=180 -group_reporting -name=Fio_Write

bw=34620KB/s,clat=59ms

2.3 单独测试numjobs,numjobs为4,1M随机写

fio -filename=/xuqi/ceph/njw4 -direct=1 -numjobs=4 -thread -rw=randwrite -ioengine=libaio -bs=1M -size=10G -runtime=180 -group_reporting -name=Fio_Write

bw=57983KB/s,clat=70ms

2.4 单独测试numjobs,numjobs为8,1M随机写

fio -filename=/xuqi/ceph/njw8 -direct=1 -numjobs=8 -thread -rw=randwrite -ioengine=libaio -bs=1M -size=10G -runtime=180 -group_reporting -name=Fio_Write

bw=92872KB/s,clat=88ms

2.5 单独测试numjobs,numjobs为16,1M随机写

fio -filename=/xuqi/ceph/njw16 -direct=1 -numjobs=16 -thread -rw=randwrite -ioengine=libaio -bs=1M -size=10G -runtime=180 -group_reporting -name=Fio_Write

bw=134340KB/s,clat=121ms

3.1 numjobs=1,IO深度为1,1M随机写

fio -filename=/xuqi/ceph/inw1 -direct=1 -iodepth=1 -numjobs=1 -thread -rw=randwrite -ioengine=libaio -bs=1M -size=10G -runtime=180 -group_reporting -name=Fio_Write

bw=18494KB/s,clat=55ms

3.2 numjobs=1,IO深度为2,1M随机写

fio -filename=/xuqi/ceph/inw2 -direct=1 -iodepth=2 -numjobs=1 -thread -rw=randwrite -ioengine=libaio -bs=1M -size=10G -runtime=180 -group_reporting -name=Fio_Write

bw=18709KB/s,clat=109ms

3.3 numjobs=1,IO深度为4,1M随机写

fio -filename=/xuqi/ceph/inw4 -direct=1 -iodepth=4 -numjobs=1 -thread -rw=randwrite -ioengine=libaio -bs=1M -size=10G -runtime=180 -group_reporting -name=Fio_Write

bw=18678KB/s,clat=219ms

3.4 numjobs=1,IO深度为8,1M随机写

fio -filename=/xuqi/ceph/inw8 -direct=1 -iodepth=8 -numjobs=1 -thread -rw=randwrite -ioengine=libaio -bs=1M -size=10G -runtime=180 -group_reporting -name=Fio_Write

bw=18837KB/s,clat=434ms

3.5 numjobs=1,IO深度为16,1M随机写

fio -filename=/xuqi/ceph/inw16 -direct=1 -iodepth=16 -numjobs=1 -thread -rw=randwrite -ioengine=libaio -bs=1M -size=10G -runtime=180 -group_reporting -name=Fio_Write

bw=18792KB/s,clat=869ms

4.1 IO深度为1,numjobs=1,1M随机写

4.2 IO深度为1,numjobs=2,1M随机写

fio -filename=/xuqi/ceph/niw2 -direct=1 -iodepth=1 -numjobs=2 -thread -rw=randwrite -ioengine=libaio -bs=1M -size=10G -runtime=180 -group_reporting -name=Fio_Write

bw=34620KB/s,clat=59ms

4.3 IO深度为1,numjobs=4,1M随机写

fio -filename=/xuqi/ceph/niw4 -direct=1 -iodepth=1 -numjobs=4 -thread -rw=randwrite -ioengine=libaio -bs=1M -size=10G -runtime=180 -group_reporting -name=Fio_Write

bw=58827KB/s,clat=69ms

4.4 IO深度为1,numjobs=8,1M随机写

fio -filename=/xuqi/ceph/niw8 -direct=1 -iodepth=1 -numjobs=8 -thread -rw=randwrite -ioengine=libaio -bs=1M -size=10G -runtime=180 -group_reporting -name=Fio_Write

bw=91264KB/s,clat=89ms

4.5 IO深度为1,numjobs=16,1M随机写

fio -filename=/xuqi/ceph/niw16 -direct=1 -iodepth=1 -numjobs=16 -thread -rw=randwrite -ioengine=libaio -bs=1M -size=10G -runtime=180 -group_reporting -name=Fio_Write

bw=135186KB/s,clat=121ms

5.1 单独测试IO深度,IO深度为1,1M随机读

fio -filename=/xuqi/ceph/iow1 -direct=1 -iodepth=1 -thread -rw=randread -ioengine=libaio -bs=1M -size=10G -runtime=180 -group_reporting -name=Fio_Read

bw=66847KB/s,clat=15ms

5.2 单独测试IO深度,IO深度为2,1M随机读

fio -filename=/xuqi/ceph/iow2 -direct=1 -iodepth=2 -thread -rw=randread -ioengine=libaio -bs=1M -size=10G -runtime=180 -group_reporting -name=Fio_Read

bw=67005KB/s,clat=30ms

5.3 单独测试IO深度,IO深度为4,1M随机读

fio -filename=/xuqi/ceph/iow4 -direct=1 -iodepth=4 -thread -rw=randread -ioengine=libaio -bs=1M -size=10G -runtime=180 -group_reporting -name=Fio_Read

bw=66533KB/s,clat=61ms

5.4 单独测试IO深度,IO深度为8,1M随机读

fio -filename=/xuqi/ceph/iow8 -direct=1 -iodepth=8 -thread -rw=randread -ioengine=libaio -bs=1M -size=10G -runtime=180 -group_reporting -name=Fio_Read

bw=68366KB/s,clat=119ms

5.5 单独测试IO深度,IO深度为16,1M随机读

fio -filename=/xuqi/ceph/iow16 -direct=1 -iodepth=16 -thread -rw=randread -ioengine=libaio -bs=1M -size=10G -runtime=180 -group_reporting -name=Fio_Read

bw=68800KB/s,clat=237ms

6.1 单独测试numjobs,numjobs为1,1M随机读

fio -filename=/xuqi/ceph/njw1 -direct=1 -numjobs=1 -thread -rw=randread -ioengine=libaio -bs=1M -size=10G -runtime=180 -group_reporting -name=Fio_Read

bw=68255KB/s,clat=15ms

6.2 单独测试numjobs,numjobs为2,1M随机读

fio -filename=/xuqi/ceph/njw2 -direct=1 -numjobs=2 -thread -rw=randread -ioengine=libaio -bs=1M -size=10G -runtime=180 -group_reporting -name=Fio_Read

bw=123516KB/s,clat=16ms

6.3 单独测试numjobs,numjobs为4,1M随机读

fio -filename=/xuqi/ceph/njw4 -direct=1 -numjobs=4 -thread -rw=randread -ioengine=libaio -bs=1M -size=10G -runtime=180 -group_reporting -name=Fio_Read

bw=205883KB/s,clat=19ms

6.4 单独测试numjobs,numjobs为8,1M随机读

fio -filename=/xuqi/ceph/njw8 -direct=1 -numjobs=8 -thread -rw=randread -ioengine=libaio -bs=1M -size=10G -runtime=180 -group_reporting -name=Fio_Read

bw=274756KB/s,clat=29ms

6.5 单独测试numjobs,numjobs为16,1M随机读

fio -filename=/xuqi/ceph/njw16 -direct=1 -numjobs=16 -thread -rw=randread -ioengine=libaio -bs=1M -size=10G -runtime=180 -group_reporting -name=Fio_Read

bw=302328KB/s,clat=54ms

7.1 numjobs=1,IO深度为1,1M随机读

fio -filename=/xuqi/ceph/inw1 -direct=1 -iodepth=1 -numjobs=1 -thread -rw=randread -ioengine=libaio -bs=1M -size=10G -runtime=180 -group_reporting -name=Fio_Read

bw=69037KB/s,clat=14ms

7.2 numjobs=1,IO深度为2,1M随机读

fio -filename=/xuqi/ceph/inw2 -direct=1 -iodepth=2 -numjobs=1 -thread -rw=randread -ioengine=libaio -bs=1M -size=10G -runtime=180 -group_reporting -name=Fio_Read

bw=68272KB/s,clat=29ms

7.3 numjobs=1,IO深度为4,1M随机读

fio -filename=/xuqi/ceph/inw4 -direct=1 -iodepth=4 -numjobs=1 -thread -rw=randread -ioengine=libaio -bs=1M -size=10G -runtime=180 -group_reporting -name=Fio_Read

bw=66958KB/s,clat=61ms

7.4 numjobs=1,IO深度为8,1M随机读

fio -filename=/xuqi/ceph/inw8 -direct=1 -iodepth=8 -numjobs=1 -thread -rw=randread -ioengine=libaio -bs=1M -size=10G -runtime=180 -group_reporting -name=Fio_Read

bw=66708KB/s,clat=122ms

7.5 numjobs=1,IO深度为16,1M随机读

fio -filename=/xuqi/ceph/inw16 -direct=1 -iodepth=16 -numjobs=1 -thread -rw=randread -ioengine=libaio -bs=1M -size=10G -runtime=180 -group_reporting -name=Fio_Read

bw=67542KB/s,clat=241ms

8.1 IO深度为1,numjobs=1,1M随机读

8.2 IO深度为1,numjobs=2,1M随机读

fio -filename=/xuqi/ceph/niw2 -direct=1 -iodepth=1 -numjobs=2 -thread -rw=randread -ioengine=libaio -bs=1M -size=10G -runtime=180 -group_reporting -name=Fio_Read

bw=123773KB/s,clat=16ms

8.3 IO深度为1,numjobs=4,1M随机读

fio -filename=/xuqi/ceph/niw4 -direct=1 -iodepth=1 -numjobs=4 -thread -rw=randread -ioengine=libaio -bs=1M -size=10G -runtime=180 -group_reporting -name=Fio_Read

bw=202943KB/s,clat=20ms

8.4 IO深度为1,numjobs=8,1M随机读

fio -filename=/xuqi/ceph/niw8 -direct=1 -iodepth=1 -numjobs=8 -thread -rw=randread -ioengine=libaio -bs=1M -size=10G -runtime=180 -group_reporting -name=Fio_Read

bw=266208KB/s,clat=30ms

8.5 IO深度为1,numjobs=16,1M随机读

fio -filename=/xuqi/ceph/niw16 -direct=1 -iodepth=1 -numjobs=16 -thread -rw=randread -ioengine=libaio -bs=1M -size=10G -runtime=180 -group_reporting -name=Fio_Read

bw=295396KB/s,clat=55ms

9.1 IO深度为4,numjobs=4,1M随机写

fio -filename=/xuqi/ceph/dd1 -direct=1 -iodepth=4 -numjobs=4 -thread -rw=randwrite -ioengine=libaio -bs=1M -size=10G -runtime=180 -group_reporting -name=Fio_Write

bw=60076KB/s, iops=58,clat=272ms

9.2 IO深度为16,numjobs=16,1M随机写

fio -filename=/xuqi/ceph/dd16 -direct=1 -iodepth=16 -numjobs=16 -thread -rw=randwrite -ioengine=libaio -bs=1M -size=10G -runtime=180 -group_reporting -name=Fio_Write

Fio_Write: (g=0): rw=randwrite, bs=1M-1M/1M-1M/1M-1M, ioengine=libaio, iodepth=16

bw=136774KB/s, iops=133

测试结果汇总:

1、单独测试IO深度

测试项IO深度带宽延时
1M随机写118.2MB/s55ms
218.5MB/s107ms
417.9MB/s223ms
818.4MB/s435ms
1618.1MB/s882ms
1M随机读165.3MB/s15ms
265.4MB/s30ms
465MB/s61ms
866.8MB/s119ms
1667.2MB/s237ms

2、单独测试numjobs

测试项Numjobs值带宽延时
1M随机写118.2MB/s54ms
233.8MB/s59ms
456.6MB/s70ms
890.7MB/s88ms
16131.2MB/s121ms
1M随机读166.7MB/s15ms
2120.6MB/s16ms
4201.1MB/s19ms
8268.3MB/s29ms
16295.2MB/s54ms

3、保持numjobs=1,增加IO深度

测试项IO深度带宽延时
1M随机写118.1MB/s55ms
218.3MB/s109ms
418.3MB/s219ms
818.4MB/s434ms
1618.4MB/s869ms
1M随机读167.4MB/s14ms
266.7B/s29ms
465.4MB/s61ms
865.1MB/s122ms
1666MB/s241ms

4、保持IO深度为1,增加numjobs

测试项Numjobs值带宽延时
1M随机写118.1MB/s55ms
233.8MB/s59ms
457.4MB/s69ms
889.1MB/s89ms
16132MB/s121ms
1M随机读167.4MB/s14ms
2120.9MB/s16ms
4198.2MB/s20ms
8260MB/s30ms
16288.5MB/s55ms

5、IO深度与numjobs值相等,1M随机写

测试项Numjobs值Iodepth值带宽延时
1M随机写4458.7MB/s272ms
1616133.6MB/s1905ms

测试结果:

延时
最大带宽1M随机写132MB/s121ms
1M随机读295.2MB/s54ms

分析:

在测试过程中,观察到的情况如下:

1、单独使用iodepth参数,来测试1M块大小的随机读写,可以看出,无论是随机读还是随机写,增加iodepth参数时,带宽值没有显著变化,而每一次延时比上一次延时基本是成倍增加的。且随着iodepth参数的加大,观察到磁盘读写速度与磁盘使用率等慢慢增加,但幅度不大,说明单独增加iodepth参数的值不会增加集群压力。

2、单独使用numjobs参数来测试1M块大小的随机读写,可以看出,无论是随机读还是随机写,增加numjobs参数时,每一次测出的带宽值比起上次测出的带宽值基本上有较大幅度的增加,有的是成倍的增加,但是延时总体来说没有增加很多。且随着numjobs参数的加大,观察到磁盘读写速度与磁盘使用率等快速增加,幅度较大。

3、保持numjobs参数为1,增加iodepth参数值,来测试1M块大小的随机读写,可以看出,无论是随机读还是随机写,增加iodepth参数时,带宽值没有显著变化,而每一次延时比上一次延时基本是成倍增加的。

4、保持iodepth参数为1,增加numjobs参数值,来测试1M块大小的随机读写,可以看出,无论是随机读还是随机写,增加numjobs参数时,每一次测出的带宽值比起上次测出的带宽值基本上有较大幅度的增加,有的是成倍的增加,但是延时总体来说没有增加很多。

5、保持iodepth 和numjobs分别为4 ,测试混合设置后测试的结果值与numjobs为4但是延时较iodepth为1的时候增加4倍。,iodepth为1对比发现2者测试结果带宽值差不多.

6、保持iodepth 和numjobs分别为16 ,测试混合设置后测试的结果值与numjobs为16,iodepth为1对比发现2者测试结果差不多. 但是延时较iodepth为1的时候增加16倍。

总结:此次测试结果中,使用numjobs参数测试出的效果要好,更能够增加集群客户端测试压力,使测试结果更准确。而iodepth参数设置后,集群带宽值几乎不变,反而延时随着iodepth增加而成倍增加。混合设置后也同样如此,随着iodepth的值增加,带宽值没有增加,反而延时成倍增加。所有延时增加的倍数刚好是iodepth增加的倍数。

  • 0
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
### 回答1: 要下载 Linux FIO 测试工具,可以按照以下步骤进行操作: 1. 打开终端,进入命令行界面。 2. 确保已经安装了 wget 命令行工具。如果未安装,可以使用包管理器(如 apt、dnf、yum 等)来安装这个工具。例如,在 Ubuntu 系统上,可以使用以下命令进行安装:sudo apt-get install wget 3. 使用 wget 命令下载 FIO 工具的安装包。在命令行中输入以下命令:wget https://github.com/axboe/fio/archive/master.zip 4. 下载完成后,使用 unzip 命令解压缩下载的压缩包。在命令行中输入以下命令:unzip master.zip 5. 解压缩完成后,进入解压后的目录。在命令行中输入以下命令:cd fio-master 6. 编译 FIO 工具。在命令行中输入以下命令:make 7. 等待编译完成后,可以使用 FIO 工具进行测试。 以上就是下载和安装 Linux 下的 FIO 测试工具的步骤。请注意,这些步骤可能因不同的 Linux 发行版而略有不同,但整体过程类似。建议在下载和安装前,查看一下官方文档或相关资源,了解适用于你的具体环境的下载和安装方法。 ### 回答2: 要下载Linux Fio测试工具,你可以按照以下步骤进行: 1. 打开终端,使用curl命令下载Fio源代码。在终端中输入以下命令并按下回车键: ``` curl -O https://github.com/axboe/fio/archive/fio-x.x.x.tar.gz ``` 请注意,"x.x.x"应替换为最新版本的Fio。 2. 解压下载的源代码。在终端中输入以下命令并按下回车键: ``` tar -zxvf fio-x.x.x.tar.gz ``` 这将解压源代码文件到当前目录中。 3. 进入解压后的目录。在终端中输入以下命令并按下回车键: ``` cd fio-fio-x.x.x ``` 进入包含Fio源代码的文件夹。 4. 构建和安装Fio。在终端中输入以下命令并按下回车键: ``` make && sudo make install ``` 这将编译并安装Fio工具。 5. 完成安装后,你就可以使用Fio进行磁盘性能测试了。可以通过在终端中运行"Fio"命令来查看可用的参数和选项。 请注意,下载和安装Fio需要确保你的计算机已经正确安装了curl和构建工具(例如gcc)。根据你的Linux发行版,你可能需要提前安装这些依赖项。 ### 回答3: 要下载Linux下的fio测试工具,可以按照以下步骤进行操作: 1. 打开终端,使用wget命令从fio官方网站下载fio的源代码压缩包。可以使用以下命令进行下载: wget https://github.com/axboe/fio/archive/refs/tags/fio-X.YY.tar.gz 注意,X.YY需要替换成所需的版本号。 2. 下载完成后,可以使用tar命令解压缩下载的文件。使用以下命令进行解压缩: tar -zxvf fio-X.YY.tar.gz 解压后将会得到一个名为fio-X.YY的文件夹。 3. 进入解压后的文件夹,使用make命令进行编译。使用以下命令进行编译: cd fio-X.YY make 编译完成后,将会生成一个可执行文件fio。 4. 将fio可执行文件移动到系统的可执行文件路径下,这样就可以在任何位置使用fio命令。使用以下命令进行移动: sudo mv fio /usr/local/bin/ 这里需要使用sudo命令以管理员权限进行操作。 5. 完成以上步骤后,即可在终端中使用fio命令进行性能测试,例如: fio --name=mytest --ioengine=libaio --rw=read --bs=4k --numjobs=4 --size=1G --runtime=60s 这个命令将会进行一个简单的读取测试,读取4KB大小的数据,使用4个并发作业,总共测试1GB的数据,在60秒的时间内完成。 通过以上步骤,就可以成功下载并使用Linux下的fio测试工具进行性能测试了。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

乾 乾

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值