fio工具中的iodepth参数与numjobs参数 |
您所在的位置:网站首页 › OPTIONS请求会影响性能吗 › fio工具中的iodepth参数与numjobs参数 |
测试环境
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/s882ms1M随机读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/s121ms1M随机读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/s869ms1M随机读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/s121ms1M随机读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/s121ms1M随机读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增加的倍数。 该结果,有待观察。 本文转自:http://www.178pt.com/204.html |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |