Linux本地SSD磁盘IO性能压测教程-fio
一、fio工具介绍
官网介绍:http://freecode.com/projects/fio
安装包下载:http://brick.kernel.dk/snaps/
FIO是测试IOPS的非常好的工具,用来对硬件进行压力测试和验证,支持13种不同的I/O引擎,包括: sync、mmap、libaio、posixaio、SGv3、splice、null、network、syslet、guasi、solarisaio等等。使用fio工具,建议使用libaio引擎测试。这里重点强调:性能测试建议直接通过写裸盘的方式进行测试,会得到较为真实的数据。但直接测试裸盘会破坏文件系统结构,导致数据丢失,请在测试前确认磁盘中数据已备份。
[root@kvm ~]# yum install -y libaio-devel # fio工具编译安装 [root@kvm ~]# tar -zxvf fio-2.1.10.tar.gz [root@kvm ~]# cd fio-2.1.10/ [root@kvm fio-2.1.10]# ./configure [root@kvm fio-2.1.10]# make && make install # 安装完成后查看fio存放位置 [root@kvm fio-2.1.10]# which fio /usr/local/bin/fio
二、本地SSD磁盘性能压测演示
2.1 压测相关参数解读
-filename=/dev/sdb 支持文件系统或者裸设备,-filename=/dev/sdb
-direct=1 忽略缓存,直接写入磁盘,使测试结果更真实
-rw=randread 测试随机读的I/O
-rw=randwrite 测试随机写的I/O
-rw=randrw 测试随机混合写和读的I/O
-rw=read 测试顺序读的I/O
-rw=write 测试顺序写的I/O
-rw=rw 测试顺序混合写和读的I/O
-bs=4k 单次io的块文件大小为4k
-bsrange=512-2048 同上,提定数据块的大小范围
-size=5g 本次的测试文件大小为5g,以每次4k的io进行测试
-numjobs=30 本次的测试线程为30
-runtime=1000 测试时间为1000秒,如果不写则一直将5g文件分4k每次写完为止
-ioengine=psync io引擎使用pync方式,如果要使用libaio引擎,需要yum install libaio-devel包
-rwmixwrite=30 在混合读写的模式下,写占30%
-group_reporting 关于显示结果的,汇总每个进程的信息
-lockmem=1g 只使用1g内存进行测试
-zero_buffers 用0初始化系统buffer
-nrfiles=8 每个进程生成文件的数量
-iodepth 64 请求的IO队列深度
注:对于SSD磁盘,当增加队列深度时,会增加IOPS,同时也会增加响应时间,但达到一定程度后,IOPS反而会下降,此时IO平均响应时间增加较大,因为磁盘利用率已经达到一个稳定状态了。
2.2 512K顺序写、读
(1)512K顺序写
[root@kvm ~]# fio -filename=/dev/sdb -direct=1 -iodepth 64 -thread -rw=write -ioengine=libaio -bs=512K -numjobs=8 -runtime=1200 -group_reporting -name=test test: (g=0): rw=write, bs=512K-512K/512K-512K/512K-512K, ioengine=libaio, iodepth=64 ... fio-2.1.10 Starting 8 threads Jobs: 8 (f=8): [WWWWWWWW] [100.0% done] [0KB/1121MB/0KB /s] [0/2241/0 iops] [eta 00m:00s] test: (groupid=0, jobs=8): err= 0: pid=143498: Tue Mar 29 17:43:23 2022 write: io=2448.2GB, bw=2089.1MB/s, iops=4178, runt=1200017msec slat (usec): min=50, max=30754, avg=1906.07, stdev=2411.81 clat (msec): min=5, max=294, avg=120.63, stdev=40.09 lat (msec): min=13, max=301, avg=122.54, stdev=40.66 clat percentiles (msec): | 1.00th=[ 46], 5.00th=[ 58], 10.00th=[ 73], 20.00th=[ 94], | 30.00th=[ 100], 40.00th=[ 106], 50.00th=[ 112], 60.00th=[ 119], | 70.00th=[ 135], 80.00th=[ 159], 90.00th=[ 182], 95.00th=[ 196], | 99.00th=[ 221], 99.50th=[ 229], 99.90th=[ 247], 99.95th=[ 255], | 99.99th=[ 269] bw (KB /s): min=120649, max=784384, per=12.52%, avg=267811.24, stdev=92221.82 lat (msec) : 10=0.01%, 20=0.01%, 50=2.20%, 100=27.46%, 250=70.26% lat (msec) : 500=0.08% cpu : usr=5.88%, sys=19.40%, ctx=2124800, majf=0, minf=20425722 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.1%, >=64=0.0% issued : total=r=0/w=5013891/d=0, short=r=0/w=0/d=0 latency : target=0, window=0, percentile=100.00%, depth=64 Run status group 0 (all jobs): WRITE: io=2448.2GB, aggrb=2089.1MB/s, minb=2089.1MB/s, maxb=2089.1MB/s, mint=1200017msec, maxt=1200017msec Disk stats (read/write): sdb: ios=48/40107676, merge=0/0, ticks=6/186880605, in_queue=187055110, util=100.00%
(2)512顺序读
[root@kvm ~]# fio -filename=/dev/sdb -direct=1 -iodepth 64 -thread -rw=read -ioengine=libaio -bs=512K -numjobs=1 -runtime=120 -group_reporting -name=test test: (g=0): rw=read, bs=512K-512K/512K-512K/512K-512K, ioengine=libaio, iodepth=64 fio-2.1.10 Starting 1 thread Jobs: 1 (f=1): [R] [100.0% done] [2551MB/0KB/0KB /s] [5102/0/0 iops] [eta 00m:00s] test: (groupid=0, jobs=1): err= 0: pid=34172: Tue Mar 29 18:06:29 2022 read : io=308060MB, bw=2567.8MB/s, iops=5134, runt=120004msec slat (usec): min=39, max=1450, avg=190.83, stdev=169.43 clat (usec): min=3794, max=36150, avg=12271.35, stdev=549.18 lat (usec): min=3916, max=36882, avg=12462.35, stdev=548.04 clat percentiles (usec): | 1.00th=[11072], 5.00th=[11456], 10.00th=[11584], 20.00th=[11840], | 30.00th=[11968], 40.00th=[12096], 50.00th=[12224], 60.00th=[12352], | 70.00th=[12480], 80.00th=[12736], 90.00th=[12992], 95.00th=[13120], | 99.00th=[13632], 99.50th=[13888], 99.90th=[14528], 99.95th=[15040], | 99.99th=[18048] bw (MB /s): min= 2356, max= 2606, per=100.00%, avg=2567.94, stdev=20.88 lat (msec) : 4=0.01%, 10=0.01%, 20=99.99%, 50=0.01% cpu : usr=1.75%, sys=58.03%, ctx=138763, majf=0, minf=65691 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.1%, >=64=0.0% issued : total=r=616119/w=0/d=0, short=r=0/w=0/d=0 latency : target=0, window=0, percentile=100.00%, depth=64 Run status group 0 (all jobs): READ: io=308060MB, aggrb=2567.8MB/s, minb=2567.8MB/s, maxb=2567.8MB/s, mint=120004msec, maxt=120004msec Disk stats (read/write): sdb: ios=4922302/0, merge=0/0, ticks=16056087/0, in_queue=16058190, util=100.00%
2.3 4K随机写、读
(1)4K随机写
[root@kvm ~]# fio -filename=/dev/sdb -direct=1 -iodepth 64 -thread -rw=randwrite -ioengine=libaio -bs=4K -numjobs=8 -runtime=120 -group_reporting -name=test test: (g=0): rw=randwrite, bs=4K-4K/4K-4K/4K-4K, ioengine=libaio, iodepth=64 ... fio-2.1.10 Starting 8 threads Jobs: 6 (f=6): [ww__wwww] [33.5% done] [0KB/131.6MB/0KB /s] [0/33.6K/0 iops] [eta 04m:00s] test: (groupid=0, jobs=8): err= 0: pid=63465: Tue Mar 29 18:38:22 2022 write: io=15678MB, bw=133782KB/s, iops=33445, runt=120006msec slat (usec): min=3, max=14322, avg=231.97, stdev=708.61 clat (usec): min=297, max=37563, avg=15072.69, stdev=1735.66 lat (usec): min=300, max=37576, avg=15304.90, stdev=1655.98 clat percentiles (usec): | 1.00th=[ 8256], 5.00th=[12480], 10.00th=[13248], 20.00th=[15168], | 30.00th=[15296], 40.00th=[15296], 50.00th=[15296], 60.00th=[15424], | 70.00th=[15424], 80.00th=[15552], 90.00th=[15680], 95.00th=[17024], | 99.00th=[19072], 99.50th=[19840], 99.90th=[21888], 99.95th=[22912], | 99.99th=[27008] bw (KB /s): min=15848, max=84942, per=12.49%, avg=16706.57, stdev=2031.54 lat (usec) : 500=0.01%, 750=0.01%, 1000=0.05% lat (msec) : 2=0.15%, 4=0.40%, 10=0.99%, 20=97.96%, 50=0.43% cpu : usr=2.53%, sys=24.41%, ctx=263131, majf=0, minf=25659 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.1%, >=64=0.0% issued : total=r=0/w=4013647/d=0, short=r=0/w=0/d=0 latency : target=0, window=0, percentile=100.00%, depth=64 Run status group 0 (all jobs): WRITE: io=15678MB, aggrb=133781KB/s, minb=133781KB/s, maxb=133781KB/s, mint=120006msec, maxt=120006msec Disk stats (read/write): sdb: ios=162/4010241, merge=0/0, ticks=337/18402736, in_queue=18432560, util=100.00%
(2)4K随机读
[root@kvm ~]# fio -filename=/dev/sdb -direct=1 -iodepth 64 -thread -rw=randread -ioengine=libaio -bs=4K -numjobs=8 -runtime=120 -group_reporting -name=test test: (g=0): rw=randread, bs=4K-4K/4K-4K/4K-4K, ioengine=libaio, iodepth=64 ... fio-2.1.10 Starting 8 threads Jobs: 7 (f=7): [r_rrrrrr] [50.2% done] [552.2MB/0KB/0KB /s] [141K/0/0 iops] [eta 02m:00s] test: (groupid=0, jobs=8): err= 0: pid=66294: Tue Mar 29 18:41:25 2022 read : io=66087MB, bw=563934KB/s, iops=140983, runt=120002msec slat (usec): min=3, max=2987, avg=52.44, stdev=124.64 clat (usec): min=314, max=9194, avg=3577.55, stdev=751.31 lat (usec): min=317, max=9213, avg=3630.10, stdev=754.20 clat percentiles (usec): | 1.00th=[ 2040], 5.00th=[ 2480], 10.00th=[ 2704], 20.00th=[ 2992], | 30.00th=[ 3216], 40.00th=[ 3344], 50.00th=[ 3504], 60.00th=[ 3632], | 70.00th=[ 3856], 80.00th=[ 4128], 90.00th=[ 4576], 95.00th=[ 4896], | 99.00th=[ 5728], 99.50th=[ 5984], 99.90th=[ 6560], 99.95th=[ 6816], | 99.99th=[ 7264] bw (KB /s): min=65936, max=170960, per=12.48%, avg=70367.69, stdev=3096.70 lat (usec) : 500=0.06%, 750=0.03%, 1000=0.08% lat (msec) : 2=0.70%, 4=74.16%, 10=24.96% cpu : usr=5.20%, sys=62.37%, ctx=526399, majf=0, minf=13005 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.1%, >=64=0.0% issued : total=r=16918298/w=0/d=0, short=r=0/w=0/d=0 latency : target=0, window=0, percentile=100.00%, depth=64 Run status group 0 (all jobs): READ: io=66087MB, aggrb=563933KB/s, minb=563933KB/s, maxb=563933KB/s, mint=120002msec, maxt=120002msec Disk stats (read/write): sdb: ios=16890768/0, merge=0/0, ticks=16655695/0, in_queue=16709707, util=100.00%
2.4 4K随机写、读延时
(1)4K随机写延迟
[root@kvm ~]# fio -filename=/dev/sdb -direct=1 -iodepth 1 -thread -rw=randwrite -ioengine=libaio -bs=4K -numjobs=1 -runtime=120 -group_reporting -name=test test: (g=0): rw=randwrite, bs=4K-4K/4K-4K/4K-4K, ioengine=libaio, iodepth=1 fio-2.1.10 Starting 1 thread Jobs: 1 (f=1): [w] [100.0% done] [0KB/53141KB/0KB /s] [0/13.3K/0 iops] [eta 00m:00s] test: (groupid=0, jobs=1): err= 0: pid=69118: Tue Mar 29 18:44:27 2022 write: io=6364.6MB, bw=54310KB/s, iops=13577, runt=120001msec slat (usec): min=3, max=238, avg=13.15, stdev= 3.92 clat (usec): min=3, max=2258, avg=58.34, stdev=112.05 lat (usec): min=31, max=2286, avg=71.65, stdev=112.20 clat percentiles (usec): | 1.00th=[ 39], 5.00th=[ 40], 10.00th=[ 40], 20.00th=[ 40], | 30.00th=[ 41], 40.00th=[ 41], 50.00th=[ 41], 60.00th=[ 42], | 70.00th=[ 42], 80.00th=[ 43], 90.00th=[ 46], 95.00th=[ 62], | 99.00th=[ 932], 99.50th=[ 948], 99.90th=[ 980], 99.95th=[ 996], | 99.99th=[ 1032] bw (KB /s): min=53072, max=70664, per=100.00%, avg=54327.56, stdev=1696.02 lat (usec) : 4=0.02%, 10=0.03%, 20=0.03%, 50=92.87%, 100=3.53% lat (usec) : 250=1.98%, 500=0.01%, 750=0.01%, 1000=1.49% lat (msec) : 2=0.05%, 4=0.01% cpu : usr=10.58%, sys=28.08%, ctx=1627898, majf=0, minf=89 IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.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.0% issued : total=r=0/w=1629320/d=0, short=r=0/w=0/d=0 latency : target=0, window=0, percentile=100.00%, depth=1 Run status group 0 (all jobs): WRITE: io=6364.6MB, aggrb=54310KB/s, minb=54310KB/s, maxb=54310KB/s, mint=120001msec, maxt=120001msec Disk stats (read/write): sdb: ios=48/1626641, merge=0/0, ticks=10/81441, in_queue=80782, util=67.45%
(2)4K随机读延迟
[root@kvm ~]# fio -filename=/dev/sdb -direct=1 -iodepth 1 -thread -rw=randread -ioengine=libaio -bs=4K -numjobs=1 -runtime=120 -group_reporting -name=test test: (g=0): rw=randread, bs=4K-4K/4K-4K/4K-4K, ioengine=libaio, iodepth=1 fio-2.1.10 Starting 1 thread Jobs: 1 (f=1): [r] [100.0% done] [28859KB/0KB/0KB /s] [7214/0/0 iops] [eta 00m:00s] test: (groupid=0, jobs=1): err= 0: pid=71910: Tue Mar 29 18:47:04 2022 read : io=3374.9MB, bw=28798KB/s, iops=7199, runt=120001msec slat (usec): min=4, max=4402, avg=13.37, stdev= 6.19 clat (usec): min=3, max=1393, avg=123.38, stdev=22.99 lat (usec): min=42, max=4578, avg=136.91, stdev=24.14 clat percentiles (usec): | 1.00th=[ 95], 5.00th=[ 99], 10.00th=[ 100], 20.00th=[ 101], | 30.00th=[ 104], 40.00th=[ 116], 50.00th=[ 118], 60.00th=[ 120], | 70.00th=[ 149], 80.00th=[ 151], 90.00th=[ 151], 95.00th=[ 153], | 99.00th=[ 171], 99.50th=[ 187], 99.90th=[ 223], 99.95th=[ 235], | 99.99th=[ 342] bw (KB /s): min=27920, max=32800, per=100.00%, avg=28802.74, stdev=491.86 lat (usec) : 4=0.01%, 10=0.01%, 20=0.01%, 50=0.47%, 100=7.89% lat (usec) : 250=91.60%, 500=0.04%, 750=0.01%, 1000=0.01% lat (msec) : 2=0.01% cpu : usr=5.35%, sys=15.47%, ctx=864125, majf=0, minf=60 IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.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.0% issued : total=r=863954/w=0/d=0, short=r=0/w=0/d=0 latency : target=0, window=0, percentile=100.00%, depth=1 Run status group 0 (all jobs): READ: io=3374.9MB, aggrb=28798KB/s, minb=28798KB/s, maxb=28798KB/s, mint=120001msec, maxt=120001msec Disk stats (read/write): sdb: ios=862611/0, merge=0/0, ticks=99693/0, in_queue=99381, util=82.98%
2.5 本地盘主机压测配置
[root@kvm ~]# vim fio.conf [global] ioengine=libaio iodepth=128 time_based direct=1 thread=1 group_reporting randrepeat=0 norandommap numjobs=32 timeout=6000 runtime=120 [randread-4k] rw=randread bs=4k filename=/dev/sdb rwmixread=100 stonewall [randwrite-4k] rw=randwrite bs=4k filename=/dev/sdb stonewall [read-512k] rw=read bs=512k filename=/dev/sdb stonewall [write-512k] rw=write bs=512k filename=/dev/sdb stonewall
[root@kvm ~]# fio fio.conf randread-4k: (g=0): rw=randread, bs=4K-4K/4K-4K/4K-4K, ioengine=libaio, iodepth=128 ... randwrite-4k: (g=1): rw=randwrite, bs=4K-4K/4K-4K/4K-4K, ioengine=libaio, iodepth=128 ... read-512k: (g=2): rw=read, bs=512K-512K/512K-512K/512K-512K, ioengine=libaio, iodepth=128 ... write-512k: (g=3): rw=write, bs=512K-512K/512K-512K/512K-512K, ioengine=libaio, iodepth=128 ... fio-2.1.10 Starting 128 threads Jobs: 32 (f=32): [WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW] [4.0% done] [0KB/3182MB/0KB /s] [0/6363/0 iops] [eta 03h:10m:38s] randread-4k: (groupid=0, jobs=32): err= 0: pid=41518: Tue Mar 29 20:57:27 2022 read : io=64680MB, bw=551926KB/s, iops=137981, runt=120003msec slat (usec): min=3, max=26107, avg=226.93, stdev=717.52 clat (usec): min=820, max=86655, avg=29449.57, stdev=4883.81 lat (usec): min=877, max=87034, avg=29676.70, stdev=4892.28 clat percentiles (usec): | 1.00th=[20608], 5.00th=[22912], 10.00th=[23936], 20.00th=[25472], | 30.00th=[26752], 40.00th=[27776], 50.00th=[28800], 60.00th=[29824], | 70.00th=[31104], 80.00th=[33024], 90.00th=[35584], 95.00th=[38656], | 99.00th=[44800], 99.50th=[46848], 99.90th=[50944], 99.95th=[52992], | 99.99th=[57088] bw (KB /s): min=13654, max=19400, per=3.13%, avg=17252.94, stdev=683.33 lat (usec) : 1000=0.01% lat (msec) : 2=0.01%, 4=0.01%, 10=0.01%, 20=0.64%, 50=99.21% lat (msec) : 100=0.14% cpu : usr=1.16%, sys=49.95%, ctx=688147, majf=0, minf=49631 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 : total=r=16558183/w=0/d=0, short=r=0/w=0/d=0 latency : target=0, window=0, percentile=100.00%, depth=128 randwrite-4k: (groupid=1, jobs=32): err= 0: pid=43447: Tue Mar 29 20:57:27 2022 write: io=15593MB, bw=133053KB/s, iops=33263, runt=120007msec slat (usec): min=4, max=23629, avg=951.23, stdev=1986.83 clat (msec): min=2, max=173, avg=122.16, stdev= 9.62 lat (msec): min=3, max=173, avg=123.11, stdev= 9.66 clat percentiles (msec): | 1.00th=[ 99], 5.00th=[ 111], 10.00th=[ 114], 20.00th=[ 117], | 30.00th=[ 120], 40.00th=[ 122], 50.00th=[ 124], 60.00th=[ 125], | 70.00th=[ 127], 80.00th=[ 129], 90.00th=[ 133], 95.00th=[ 135], | 99.00th=[ 143], 99.50th=[ 145], 99.90th=[ 151], 99.95th=[ 157], | 99.99th=[ 163] bw (KB /s): min= 3664, max= 7640, per=3.12%, avg=4156.52, stdev=215.23 lat (msec) : 4=0.01%, 10=0.01%, 20=0.01%, 50=0.30%, 100=0.78% lat (msec) : 250=98.89% cpu : usr=0.78%, sys=20.91%, ctx=585167, majf=0, minf=76134 IO depths : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=0.1%, >=64=99.9% 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 : total=r=0/w=3991828/d=0, short=r=0/w=0/d=0 latency : target=0, window=0, percentile=100.00%, depth=128 read-512k: (groupid=2, jobs=32): err= 0: pid=45349: Tue Mar 29 20:57:27 2022 read : io=309709MB, bw=2570.5MB/s, iops=5140, runt=120487msec slat (usec): min=45, max=62427, avg=6191.15, stdev=9105.93 clat (msec): min=2, max=1100, avg=784.72, stdev=61.11 lat (msec): min=4, max=1116, avg=790.91, stdev=61.41 clat percentiles (msec): | 1.00th=[ 676], 5.00th=[ 717], 10.00th=[ 725], 20.00th=[ 750], | 30.00th=[ 758], 40.00th=[ 775], 50.00th=[ 783], 60.00th=[ 799], | 70.00th=[ 807], 80.00th=[ 824], 90.00th=[ 848], 95.00th=[ 873], | 99.00th=[ 938], 99.50th=[ 971], 99.90th=[ 1029], 99.95th=[ 1045], | 99.99th=[ 1074] bw (KB /s): min= 555, max=102803, per=3.13%, avg=82322.79, stdev=7971.46 lat (msec) : 4=0.01%, 10=0.01%, 20=0.01%, 50=0.03%, 100=0.04% lat (msec) : 250=0.13%, 500=0.21%, 750=21.22%, 1000=78.10%, 2000=0.26% cpu : usr=0.10%, sys=4.63%, ctx=194154, majf=0, minf=13771951 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.0%, 64=0.0%, >=64=0.1% issued : total=r=619418/w=0/d=0, short=r=0/w=0/d=0 latency : target=0, window=0, percentile=100.00%, depth=128 write-512k: (groupid=3, jobs=32): err= 0: pid=47248: Tue Mar 29 20:57:27 2022 write: io=462570MB, bw=3836.8MB/s, iops=7673, runt=120563msec slat (usec): min=56, max=571525, avg=4141.41, stdev=4882.78 clat (usec): min=126, max=1318.3K, avg=527023.53, stdev=149479.35 lat (msec): min=4, max=1325, avg=531.17, stdev=150.55 clat percentiles (msec): | 1.00th=[ 273], 5.00th=[ 302], 10.00th=[ 322], 20.00th=[ 383], | 30.00th=[ 433], 40.00th=[ 474], 50.00th=[ 519], 60.00th=[ 570], | 70.00th=[ 619], 80.00th=[ 676], 90.00th=[ 734], 95.00th=[ 766], | 99.00th=[ 832], 99.50th=[ 848], 99.90th=[ 906], 99.95th=[ 938], | 99.99th=[ 1139] bw (KB /s): min=20430, max=266603, per=3.13%, avg=123021.43, stdev=36784.33 lat (usec) : 250=0.01%, 500=0.01%, 750=0.01%, 1000=0.01% lat (msec) : 2=0.01%, 4=0.01%, 10=0.01%, 20=0.01%, 50=0.02% lat (msec) : 100=0.03%, 250=0.20%, 500=46.28%, 750=46.14%, 1000=7.28% lat (msec) : 2000=0.04% cpu : usr=3.41%, sys=18.75%, ctx=424696, majf=0, minf=34760178 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=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.1% issued : total=r=0/w=925140/d=0, short=r=0/w=0/d=0 latency : target=0, window=0, percentile=100.00%, depth=128 Run status group 0 (all jobs): READ: io=64680MB, aggrb=551925KB/s, minb=551925KB/s, maxb=551925KB/s, mint=120003msec, maxt=120003msec Run status group 1 (all jobs): WRITE: io=15593MB, aggrb=133053KB/s, minb=133053KB/s, maxb=133053KB/s, mint=120007msec, maxt=120007msec Run status group 2 (all jobs): READ: io=309709MB, aggrb=2570.5MB/s, minb=2570.5MB/s, maxb=2570.5MB/s, mint=120487msec, maxt=120487msec Run status group 3 (all jobs): WRITE: io=462570MB, aggrb=3836.8MB/s, minb=3836.8MB/s, maxb=3836.8MB/s, mint=120563msec, maxt=120563msec Disk stats (read/write): sdb: ios=21513917/11392940, merge=0/0, ticks=33339661/37187242, in_queue=70797523, util=100.00%
2.6 压测结果解读
注:msec是毫秒; usec是微秒;1s=1000msec=1000000ues
read/write io:执行了多少M的IO bw:平均IO带宽 iops:IOPS runt:线程运行时间
slat:提交延迟
clat:完成延迟
lat:响应时间
bw:带宽
cpu:利用率
IO depths:io队列
submit:单个IO提交要提交的IO数
complete:Like the above submit number, but for completions instead.
issued:The number of read/write requests issued, and how many of them were short.
latency:IO完延迟的分布
Run status group 0 (all jobs):
io:总共执行多少M的IO aggrb:group总带宽 minb:最小.平均带宽 maxb:最大平均带宽 mint:group中线程的最短运行时间 maxt:group中线程的最长运行时间
Disk stats (read/write):
ios:所有group总共执行的IO数 merge:总共发生的IO合并数 ticks:Number of ticks we kept the disk busy io_queue:花费在队列上的总共时间 util:磁盘利用率
作者:UStarGao
链接:https://www.starcto.com/stress-test/260.html
来源:STARCTO
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
UCloud云平台推荐
随便看看
- 2021-04-10MySQL数据库页损坏修复方案
- 2021-11-19Windows云主机服务器高频配置集锦
- 2022-04-02Docker可视化管理工具-Portainer
- 2021-09-16LDAP认证服务器容器化部署
- 2021-10-28PostgreSQL日志轮滚配置教程