找回密码
 注册
查看: 730|回复: 7

fio测试IO工具

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2022-6-20 11:37:25 | 显示全部楼层 |阅读模式
fio测试IO工具

5 N' m( f$ _' d7 ^
下载地址:

$ O# ^# a7 Y: _( C% [; m7 o' n* @/ E1 p. v) X+ k8 s1 v7 D1 m

' a6 s+ g6 r8 @$ ~2 m5 a* u
: V3 u0 k9 v+ I! c3 q5 S! \

% L# \  {4 z2 p

' ^9 U2 `3 r! q* [, F- t
fio-2.1.10.tar.gz
7 b% x* X! c+ L( v. y) S, b

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2022-6-20 11:49:00 | 显示全部楼层
[root@testssd ~]# tar -zxvf fio-2.1.10.tar.gz     解压fio# e) @5 Q" N" [# y& t
fio-2.1.10/
  r2 e. [, N+ I0 q3 x# Y. X/ D
1 l+ f5 K/ c4 w安装gcc gcc-c++  make ! [7 h1 f7 I4 X9 J$ P
# yum install -y gcc gcc-c++ make
# p; j) i) e: P, b, d8 M7 ]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2022-6-20 13:42:09 | 显示全部楼层
[root@test1hhd fio-2.1.10]# ./configure * g/ q  z- c  u
Operating system              Linux" ~! c" k7 ?6 j, A
CPU                           x86_64+ E  w+ F/ S! ]. A8 d6 S
Big endian                    no
" q+ ~; r9 X* r2 K1 hCompiler                      gcc7 D: N2 }6 C* r
Cross compile                 no
4 m( I# a6 `0 ^/ G* w2 F8 w& n7 o
* ^! u( y/ h  h0 K' E9 X: aWordsize                      64) o2 ^7 {  V9 Q/ G( @( T1 q8 X1 e
zlib                          no
$ d. q1 m# t& \7 N! U* O' y: HLinux AIO support             no- A8 s2 ^, L" F
POSIX AIO support             yes
8 h: d% f. ]- y2 R% e- sPOSIX AIO support needs -lrt  yes$ u6 B  I8 u0 b7 s" x' U+ S# C
POSIX AIO fsync               yes9 ?8 c$ X  x. e3 {3 D: @7 q0 @
Solaris AIO support           no
0 \2 D, z3 I$ G__sync_fetch_and_add          yes7 K: |  L" X. F4 T8 ]2 v
libverbs                      no/ |6 h: S7 |7 L0 P5 d% V* a
rdmacm                        no( a+ z9 T( d. A. ]2 H4 T' U( K  S
Linux fallocate               yes
& X/ B, S3 P0 ?POSIX fadvise                 yes' y. ^- [: d  H9 h+ H0 a
POSIX fallocate               yes
; T  @0 K: {) v- x' j' }sched_setaffinity(3 arg)      yes4 a8 ]# {$ M. s' c) m% }5 S
sched_setaffinity(2 arg)      no1 d' q" B. w" _1 K" ^; j  z; I
clock_gettime                 yes
1 ^" J5 Q. S5 w0 \) GCLOCK_MONOTONIC               yes3 t9 _9 \6 C* b, ?& S$ Q4 O
CLOCK_MONOTONIC_PRECISE       no- p" x) m) X2 \+ a2 l5 W
gettimeofday                  yes% p. i4 ~) z0 Y0 ~  J$ ?
fdatasync                     yes" r, i7 h& \+ y# [- D
sync_file_range               yes
+ E6 w; D4 L) A! @( ^2 G! m4 @" fEXT4 move extent              yes* L, I2 u1 d- G5 @
Linux splice(2)               yes" r0 C/ X# B7 k: k5 }8 K( ~
GUASI                         no# }% p- J7 q! Z
Fusion-io atomic engine       no
+ d. P! P' n8 |  jlibnuma                       no
. N6 o3 C/ [6 H" ustrsep                        yes
8 @8 F4 T; I+ j  _7 A6 V) ]strcasestr                    yes
3 Z, O: `6 e$ e, n" G- l9 M3 Qgetopt_long_only()            yes( S5 Y% m: s0 ?' l8 A
inet_aton                     yes
4 |7 D5 |/ c  R: ?, g  {! c) ysocklen_t                     yes
9 q1 l4 w9 z. S) i$ h$ l__thread                      yes! P$ r+ G( Y, F
gtk 2.18 or higher            no
5 S% f8 L$ b; V5 U0 v- j" K7 [RUSAGE_THREAD                 yes$ O  H1 y% V5 e, y+ ^" ^" ]9 F4 n
SCHED_IDLE                    yes
4 V% s& i8 r! y6 j! Y8 zTCP_NODELAY                   yes
  n) f! z% ^0 G5 X  pRLIMIT_MEMLOCK                yes
) _% b7 y3 X7 T$ R  V, Zpwritev/preadv                yes
$ p8 \2 e$ L7 v, w4 ZIPv6 helpers                  yes
7 V; k. ]$ i4 k: gRados Block Device engine     no
8 r, t4 Y8 ?. I3 F. Tsetvbuf                       yes, q+ k% p- \0 X% N
Gluster API engine            no  o/ L: y5 q$ U! F
Gluster API use fadvise       no
+ k; c/ r7 A' b# o/ q: _8 f" {s390_z196_facilities          no

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2022-6-20 13:46:01 | 显示全部楼层
[root@test1hhd fio-2.1.10]# make
7 x$ j6 l6 m! F8 [) j2 i, ]FIO_VERSION = fio-2.1.10! X$ n: Z% d: {$ `7 H3 F
    CC gettime.o
" `$ j7 c" V7 C3 A3 n) K    CC ioengines.o
2 O' K1 U5 f7 n/ \    CC init.o4 F# M, N. @* o
    CC stat.o, S) E0 Q6 ]9 B
    CC log.o
; r& B2 n: A7 A4 I# m    CC time.o
/ |0 V; Q! V/ P    CC filesetup.o0 y* t6 \2 c6 E3 }* q8 O. x5 X; o
    CC eta.o2 p4 f- N5 a# V2 Y/ p
    CC verify.o3 d- ]( q( o. V5 W& n
    CC memory.o3 o, N/ Y7 F5 \9 B/ @0 U+ r
    CC io_u.o
+ E5 L, h' T; w! X: y" S    CC parse.o
/ E2 z$ A% v6 ?    CC mutex.o
, G( [/ ^. Y2 g$ _' R# L# G) s$ `  ^    CC options.o
& Z8 U6 Q; U! f5 Z6 u' \) A7 i% J    CC lib/rbtree.o8 G8 o7 X8 D7 Q( D* |6 p. A( r
    CC smalloc.o" y% T) i! ^. h: h+ R
    CC filehash.o9 d* A0 f! h4 E1 \# R" A
    CC profile.o
: W: ^3 q( _6 @5 h( c+ u    CC debug.o
% J3 K8 }% P) D5 F% @  s$ {    CC lib/rand.o! r4 U, g4 O  l. D& ~2 T+ }! }5 w: {
    CC lib/num2str.o
+ ]) q+ U' x, r; w' X6 }4 P    CC lib/ieee754.o/ Q/ @- A9 F7 b7 D% j1 ]; {
    CC crc/crc16.o2 N' i. p6 J( D9 G/ D
    CC crc/sha512.o0 c  ^9 ]6 L4 a2 _" |
    CC crc/crc7.o/ l1 O) `4 z3 d$ j: F. U( x, {
    CC crc/sha1.o
9 C8 r1 g4 S2 w* u4 W    CC crc/crc32c.o
$ ?5 A. \6 d5 n    CC crc/crc32.o
: v! H5 F1 r! m" g" ?$ ?% D3 }    CC crc/crc32c-intel.o
5 |  s% Y3 `; t1 j% ]% I  h7 o8 n    CC crc/xxhash.o! g* P. I  E% D# r
    CC crc/test.o
5 Q! R9 N0 V# l! |. V    CC crc/sha256.o
% ^6 L% E  E) H# \( u    CC crc/md5.o8 K6 d' h* i2 H2 L
    CC crc/crc64.o4 [2 q: B; Z+ o+ [9 p4 X3 Y
    CC engines/cpu.o
7 `- p8 J: L4 \& B    CC engines/mmap.o
' O1 a+ X6 ]! z9 U2 f    CC engines/sync.o$ X  p. ^" V; ~0 y* S% k$ \+ d
    CC engines/null.o
; H; f$ {) P1 `( I' L" c    CC engines/net.o
1 @9 p# Q  |% |5 L) f8 b    CC memalign.o, `% j% k! N; v7 S" T
    CC server.o5 ~0 l1 l- X  ]$ ^/ ?
    CC client.o
( _$ u. e& L( s( f    CC iolog.o
+ v' t( T4 d1 p  o9 }- ?    CC backend.o5 c. ?. I0 r  S7 o, r  }- f8 C
    CC libfio.o
( ?) y  b; x: z& [' w  |    CC flow.o: d0 n4 S6 F( l5 f  l- A) }
    CC cconv.o
# d8 e- U' u( C: q    CC lib/prio_tree.o
0 `' ~* w9 [- X# I    CC json.o$ ]. y- K2 S$ |* R9 U: O6 h
    CC lib/zipf.o* }7 Q$ @0 B0 p/ E8 K2 r1 w
    CC lib/axmap.o: s# ?  ^8 o6 C$ W( L* v: w3 Y) F" D
    CC lib/lfsr.o* v3 H' O( x/ n: C6 o* y
    CC gettime-thread.o$ }" T' C: E9 k; I
    CC helpers.o
! o* d1 t4 [' T) M7 \; p5 E    CC lib/flist_sort.o) j8 E8 |4 X! a! ~
    CC lib/hweight.o) \9 l, c; A) x  S. a
    CC lib/getrusage.o
3 i5 _5 x1 ~# a0 I    CC idletime.o
& ?' a8 {  V+ o    CC td_error.o
) H- m" Q) W  o' O* b! X) D    CC profiles/tiobench.o" S; v9 ]7 W7 K+ p4 |: a
    CC profiles/act.o0 r: i, r% K6 w+ `) _1 @* U
    CC io_u_queue.o( p9 n/ H3 j4 z7 ^
    CC filelock.o
; G' T; w5 Z0 _$ N6 B    CC engines/posixaio.o
2 {. A4 }/ Y/ `4 ^1 a8 `    CC engines/falloc.o" P) u& }1 J: c, a
    CC engines/e4defrag.o
; z  `2 v  t+ J# E8 \1 c    CC engines/splice.o+ i/ q" y0 }$ q) I$ h& T
    CC diskutil.o0 o  U- f8 y* h# I& M' k  {/ i7 L
    CC fifo.o
4 y" C* |! f" F7 |+ J    CC blktrace.o' W+ {+ ?, j/ c9 l/ c) b
    CC cgroup.o$ T3 L& S) M% d# |9 j6 F/ j& N1 G+ T
    CC trim.o4 T1 @9 g4 c4 I4 e' A2 N
    CC engines/sg.o
- f1 a; S4 j, V( }- K% ?4 a. z    CC engines/binject.o
9 A" C, c; R! u8 y6 U) K    CC fio.o
, D, \. u6 U! a. M. j% V    LINK fio
/ e6 z; O1 M0 L8 y0 c6 R! s[root@test1hhd fio-2.1.10]#  make install
, p; i5 A! j3 H6 F7 rinstall -m 755 -d /usr/local/bin
1 G1 n0 V5 r* r: Einstall fio tools/fio_generate_plots tools/plot/fio2gnuplot tools/genfio /usr/local/bin; {% u* [4 T6 U6 K6 y: [$ s
install -m 755 -d /usr/local/man/man1
1 R% d4 g2 T9 ]7 d% G6 U# tinstall -m 644 fio.1 /usr/local/man/man1" r8 m, a, }( K  m: K
install -m 644 tools/fio_generate_plots.1 /usr/local/man/man1; k7 J8 a. g; B2 G
install -m 644 tools/plot/fio2gnuplot.1 /usr/local/man/man1
, q+ B; v/ u; ?, Iinstall -m 755 -d /usr/local/share/fio
2 m2 i) L/ e; U" h; winstall -m 644 tools/plot/*gpm /usr/local/share/fio/

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2022-6-20 13:51:38 | 显示全部楼层
[root@test1hhd ~]# fio -filename=/dev/vda  -direct=1 -iodepth 1 -thread -rw=randread -ioengine=psync -bs=4k -size=1000G -numjobs=50 -runtime=180 -group_reporting -name=rand_100read_4k
! ?7 _/ t9 z* C! e2 y0 brand_100read_4k: (g=0): rw=randread, bs=4K-4K/4K-4K/4K-4K, ioengine=psync, iodepth=1
) n( d8 V' |/ z" A$ W% A0 O...
/ w) b! Y: |0 R  u+ Yfio-2.1.10$ m5 n1 G& w  p& J+ z" S. R
Starting 50 threads
/ A& w' b% M5 ~Jobs: 50 (f=50): [rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr] [11.0% done] [12671KB/0KB/0KB /s] [3167/0/0 iops] [eta 02m:41sJobs: 50 (f=50): [rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr] [11.6% done] [14601KB/0KB/0KB /s] [3650/0/0 iops] [eta 02m:40sJobs: 50 (f=50): [rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr] [12.2% done] [7948KB/0KB/0KB /s] [1987/0/0 iops] [eta 02m:39s]Jobs: 6 (f=6): [___rr___r_________________r__________________r___r] [2.2% done] [163KB/0KB/0KB /s] [40/0/0 iops] [eta 02h:12m:01s]]
# S* _1 s9 g' g) w3 n$ [rand_100read_4k: (groupid=0, jobs=50): err= 0: pid=19880: Mon Jun 20 13:42:03 2022
7 ~3 C- }. F% Z0 ~2 \8 `  read : io=840436KB, bw=4634.1KB/s, iops=1158, runt=181327msec
. H% f, f6 F! W, p    clat (usec): min=308, max=3703.3K, avg=42907.91, stdev=175774.03
! X. J: H0 P* L. q) E     lat (usec): min=308, max=3703.3K, avg=42908.22, stdev=175774.04, D/ q! g* L! y# [( W' B
    clat percentiles (usec):
, _, s: z/ a  a; a5 C     |  1.00th=[  402],  5.00th=[  450], 10.00th=[  482], 20.00th=[  532],
7 u8 q" d* G" x8 }4 [4 n7 K; I     | 30.00th=[  572], 40.00th=[  612], 50.00th=[  684], 60.00th=[ 1688],& k3 A% N; ^; J
     | 70.00th=[ 7776], 80.00th=[30848], 90.00th=[93696], 95.00th=[195584],4 `% M3 |7 [% w- X$ |! ]1 L  x
     | 99.00th=[700416], 99.50th=[1335296], 99.90th=[2473984], 99.95th=[2867200],
( |" `/ d% U- B     | 99.99th=[3293184]) w* W, T0 c! U7 I' F
    bw (KB  /s): min=    1, max=  810, per=2.59%, avg=119.98, stdev=103.34
! n1 @: i8 `/ e, z. ^" D    lat (usec) : 500=13.52%, 750=41.62%, 1000=3.46%" Z" y) `' O# ?0 I3 K# \$ b% X
    lat (msec) : 2=1.79%, 4=4.13%, 10=6.84%, 20=4.77%, 50=8.64%
( W* X9 s* O( u+ P/ y    lat (msec) : 100=5.68%, 250=5.93%, 500=2.12%, 750=0.58%, 1000=0.24%* Y$ P  _7 N2 q" D$ t6 S% v1 [1 i
    lat (msec) : 2000=0.49%, >=2000=0.20%/ I( [6 K  `- R
  cpu          : usr=0.04%, sys=0.06%, ctx=210142, majf=0, minf=59$ d$ t3 P: t" q8 P+ }& a/ q8 I
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
. o% }) R" ~. X- Y$ q; e     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
5 R& b0 l; w& @, Y+ p4 Q$ D     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
, a" W" ?4 }7 R" t* C5 O! h  W     issued    : total=r=210109/w=0/d=0, short=r=0/w=0/d=0
- T) S* s' x) f1 z0 G& p, p( J, j# o0 o     latency   : target=0, window=0, percentile=100.00%, depth=1' K4 I( x# t' o: j& D
+ n. |% [/ r% K1 H
Run status group 0 (all jobs):
7 E0 Y7 M. l6 G. C   READ: io=840436KB, aggrb=4634KB/s, minb=4634KB/s, maxb=4634KB/s, mint=181327msec, maxt=181327msec
$ H0 W" n+ r5 U. c+ K, u! y4 ^+ Q1 f" I5 k
Disk stats (read/write):, g- G/ P* Q# t7 b& }+ @
  vda: ios=210103/28, merge=0/2, ticks=8996207/20602, in_queue=8914609, util=98.70%

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2022-6-20 14:13:58 | 显示全部楼层
fio -filename=/dev/vda  -direct=1 -iodepth 1 -thread -rw=randread -ioengine=psync -bs=4k -size=1000G -numjobs=50 -runtime=180 -group_reporting -name=rand_100read_4k8 A( k4 O' m- [8 c
fio -filename=/dev/vda -direct=1 -iodepth 1 -thread -rw=randwrite -ioengine=psync -bs=4k -size=1000G -numjobs=50 -runtime=180 -group_reporting -name=rand_100write_4k1 h: @+ Y" y( D2 y, O
- n' P6 U; b( o" c# A1 r7 ]3 W% X
fio -filename=/dev/vda -direct=1 -iodepth 1 -thread -rw=read -ioengine=psync -bs=4k -size=1000G -numjobs=50 -runtime=180 -group_reporting -name=sqe_100read_4k
) M5 K/ a1 w: L8 d
  N6 Y7 g& k1 ~. p
( {5 ^4 V0 Z7 W1 e8 o  }1 F; O! H
测试场景:
  100%随机,100%读, 4K
2 {. h0 h) z% V# s( N) b; Q' m  fio -filename=/dev/vda -direct=1 -iodepth 1 -thread -rw=randread -ioengine=psync -bs=4k -size=1000G -numjobs=50 -runtime=180 -group_reporting -name=rand_100read_4k
  100%随机,100%写, 4K3 a8 ~9 I1 N; s. W$ a1 o# c5 e& }
  fio -filename=/dev/vda -direct=1 -iodepth 1 -thread -rw=randwrite -ioengine=psync -bs=4k -size=1000G -numjobs=50 -runtime=180 -group_reporting -name=rand_100write_4k
  100%顺序,100%读 ,4K7 G6 u; y% ?8 t0 u
  fio -filename=/dev/vda -direct=1 -iodepth 1 -thread -rw=read -ioengine=psync -bs=4k -size=1000G -numjobs=50 -runtime=180 -group_reporting -name=sqe_100read_4k
  100%顺序,100%写 ,4K/ U; C" `6 A5 k6 K# r% o
  fio -filename=/dev/vda -direct=1 -iodepth 1 -thread -rw=write -ioengine=psync -bs=4k -size=1000G -numjobs=50 -runtime=180 -group_reporting -name=sqe_100write_4k
  100%随机,70%读,30%写 4K" \7 ?+ [  |, w
  fio -filename=/dev/vda -direct=1 -iodepth 1 -thread -rw=randrw -rwmixread=70 -ioengine=psync -bs=4k -size=1000G -numjobs=50 -runtime=180 -group_reporting -name=randrw_70read_4k

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2022-6-20 14:32:51 | 显示全部楼层
[root@testssd ~]# fio -ioengine=libaio -bs=16k -direct=1 -thread -rw=read -size=1G -filename=test.img -name="test" -iodepth=1 -time_based -runtime=60 -numjobs=16 -group_reporting5 ]" K7 o# D( v/ \5 _; c. }& P% V) L
fio: engine libaio not loadable
+ ]- Z% ^# x2 ?: {fio: failed to load engine libaio
8 H8 B* B7 o6 C8 d: M[root@testssd ~]# fio -filename=/dev/vda -ioengine=libaio -bs=16k -direct=1 -thread -rw=read -size=1G -filename=test.img -name="test" -iodepth=1 -time_based -runtime=60 -numjobs=16 -group_reporting) O+ t9 g% Y- |7 E
fio: engine libaio not loadable2 S5 G7 Y  W* m3 R5 T1 T. _  F
fio: failed to load engine libaio
8 k( ]# H0 h; y[root@testssd ~]# fio -filename=/dev/vda  -bs=16k -direct=1 -thread -rw=read -size=1G -filename=test.img -name="test" -iodepth=1 -time_based -runtime=60 -numjobs=16 -group_reporting
: r. W, ?5 _& E! `# Atest: (g=0): rw=read, bs=16K-16K/16K-16K/16K-16K, ioengine=sync, iodepth=1& @$ \5 x% p5 @/ W5 r( ~
...9 @0 `1 O. O8 b
fio-2.1.10/ O5 W/ V' g6 o0 Z; S
Starting 16 threads
' i% k7 C% ~% q& Ztest: Laying out IO file(s) (1 file(s) / 512MB)
4 T3 E' P9 p- _* Q8 ZJobs: 16 (f=32): [RRRRRRRRRRRRRRRR] [100.0% done] [141.7MB/0KB/0KB /s] [9027/0/0 iops] [eta 00m:00s]
* c2 T( l( ~. O$ N$ C% Z8 g- Wtest: (groupid=0, jobs=16): err= 0: pid=21845: Mon Jun 20 14:19:25 2022
6 Q- Q) }, F7 j1 ^' C. W% [  read : io=8328.9MB, bw=142137KB/s, iops=8883, runt= 60004msec
4 f" L& B9 I5 ]1 V  i$ B    clat (usec): min=215, max=62700, avg=1798.77, stdev=1583.64
; Z" P9 o( J: I7 N& p# K. A     lat (usec): min=215, max=62700, avg=1798.97, stdev=1583.65* [" j# v5 |! Y, k# E
    clat percentiles (usec):
# [+ e$ b* N/ M0 c) O2 A     |  1.00th=[  306],  5.00th=[  362], 10.00th=[  458], 20.00th=[  724],0 V" [& Y3 s2 U! Y- W6 [9 I# S
     | 30.00th=[ 1096], 40.00th=[ 1640], 50.00th=[ 1864], 60.00th=[ 2024],; z+ g) T: h; W( C0 I% l3 A4 d
     | 70.00th=[ 2224], 80.00th=[ 2320], 90.00th=[ 2608], 95.00th=[ 2928],9 b) E2 H& g- R
     | 99.00th=[ 6944], 99.50th=[10432], 99.90th=[22656], 99.95th=[26240],
4 T8 E" x" O3 i7 @# P     | 99.99th=[34560]# t. O  r1 w9 B/ Y6 m
    bw (KB  /s): min= 2331, max=19523, per=6.25%, avg=8879.79, stdev=3417.386 p5 K, C& V+ F/ k
    lat (usec) : 250=0.01%, 500=11.32%, 750=9.70%, 1000=7.54%
! ]+ \$ Q' Y+ k# K! u7 a7 t" ?/ h    lat (msec) : 2=30.34%, 4=39.02%, 10=1.53%, 20=0.39%, 50=0.14%
3 k* ^+ [% v6 G/ M8 ^- ~    lat (msec) : 100=0.01%: L1 a; D% j2 T1 ^% l: @
  cpu          : usr=0.29%, sys=1.34%, ctx=533068, majf=0, minf=82
" Y; b  Y8 j4 U% b+ }' b, f  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%; l& }7 |# |7 R
     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%2 E9 r* u% q- d4 P  W8 I
     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
' {* g" \6 |% J: q: C+ B. Q+ T& t     issued    : total=r=533048/w=0/d=0, short=r=0/w=0/d=0) n7 q; D+ w8 r  o0 z, S' N, [
     latency   : target=0, window=0, percentile=100.00%, depth=1( |- S8 b; n1 f
  N( u. y7 i5 E7 o- ~) g' ~
Run status group 0 (all jobs):
/ {0 E. [' d$ @' p/ y( C) _5 S# w   READ: io=8328.9MB, aggrb=142136KB/s, minb=142136KB/s, maxb=142136KB/s, mint=60004msec, maxt=60004msec$ x% W! D0 i0 [' `8 J! J" a5 ^

( D" w& k$ z# LDisk stats (read/write):
/ ]' Q; B; {" m- r0 B9 Q9 j8 `  vda: ios=529229/11, merge=784/1, ticks=938227/67, in_queue=936843, util=99.83%/ D& u2 P( O% a& H# C' R* [
  dm-0: ios=265320/10, merge=0/0, ticks=475542/77, in_queue=476458, util=98.64%
6 v* W9 t9 H& V, [; U5 I6 c[root@testssd ~]# fio   -bs=16k -direct=1 -thread -rw=read -size=1G -filename=test.img -name="test" -iodepth=1 -time_based -runtime=60 -numjobs=16 -group_reporting
7 a6 T6 Q$ G( H: X: rtest: (g=0): rw=read, bs=16K-16K/16K-16K/16K-16K, ioengine=sync, iodepth=1
& V: s! E2 ?6 ~  M...
9 I, Z8 y6 @9 D7 `  Zfio-2.1.10
$ R, T) {$ A/ k2 }Starting 16 threads' J' W2 e7 X: p. ?$ ?$ z+ y
test: Laying out IO file(s) (1 file(s) / 1024MB), H1 v0 A6 w" F3 x" w
Jobs: 16 (f=16): [RRRRRRRRRRRRRRRR] [100.0% done] [139.3MB/0KB/0KB /s] [8914/0/0 iops] [eta 00m:00s]
& B' ^. G- e  X8 K' ]% ]* A; @, r* U' dtest: (groupid=0, jobs=16): err= 0: pid=21868: Mon Jun 20 14:23:39 2022! }* T! D( F4 c& d  V  [+ T
  read : io=8815.7MB, bw=150436KB/s, iops=9402, runt= 60003msec: g9 e% h) V9 F0 r, Q- H
    clat (usec): min=255, max=44491, avg=1695.99, stdev=1232.95
' e! X0 A1 t4 v     lat (usec): min=255, max=44492, avg=1696.20, stdev=1232.95
. Q) c6 v! h+ s8 k- I; r! T0 b    clat percentiles (usec):
* w3 _- h. Q6 [, Q; P     |  1.00th=[  426],  5.00th=[  532], 10.00th=[  636], 20.00th=[  820],4 J' W/ `2 }9 k# \8 r' D
     | 30.00th=[  948], 40.00th=[ 1176], 50.00th=[ 1688], 60.00th=[ 2192],& X$ z) U. \* y4 u
     | 70.00th=[ 2256], 80.00th=[ 2288], 90.00th=[ 2448], 95.00th=[ 2832],5 L- o) c$ W# ?% o
     | 99.00th=[ 4960], 99.50th=[ 7968], 99.90th=[15808], 99.95th=[21120],
0 Z0 K' t& t- |% T3 ^3 N' e% W     | 99.99th=[31360]
, B" z2 N5 ~; R# Z& i7 f    bw (KB  /s): min= 3937, max=24768, per=6.26%, avg=9414.93, stdev=3580.20
* [# K+ f5 l+ U0 {# U" l% x    lat (usec) : 500=3.42%, 750=12.21%, 1000=17.97%
4 s1 i1 @$ q& z$ y    lat (msec) : 2=21.95%, 4=43.18%, 10=0.98%, 20=0.22%, 50=0.06%/ U3 f5 [  ]  A2 t
  cpu          : usr=0.28%, sys=1.52%, ctx=564232, majf=0, minf=82
- |) n0 c1 g; p' f( ^, A  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%( p* Z4 |* P. L
     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
1 d1 Q& c3 M# g1 T" i/ N     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
/ O- T( N4 K. u2 C% l6 m) Q     issued    : total=r=564164/w=0/d=0, short=r=0/w=0/d=09 K& `1 k' A. g2 O' Y# b1 @
     latency   : target=0, window=0, percentile=100.00%, depth=1
  _2 W& d7 a1 w1 N4 j* r4 s
! z5 w' Z; W( p9 pRun status group 0 (all jobs):' n% B: j7 `8 A3 e( g1 t4 v  _
   READ: io=8815.7MB, aggrb=150436KB/s, minb=150436KB/s, maxb=150436KB/s, mint=60003msec, maxt=60003msec/ o( J8 ]$ S# B0 l% B1 i+ ]/ Y
1 K" H$ w) N5 {8 c5 q; [
Disk stats (read/write):/ b" o2 U2 c' `2 Z" y
    dm-0: ios=563996/9, merge=0/0, ticks=941286/41, in_queue=942042, util=99.74%, aggrios=562960/10, aggrmerge=899/1, aggrticks=939104/36, aggrin_queue=938630, aggrutil=99.65%5 D+ j9 v1 o9 o& m% n# R0 h
  vda: ios=562960/10, merge=899/1, ticks=939104/36, in_queue=938630, util=99.65%
8 ]3 @; U6 q: F[root@testssd ~]#

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2022-6-30 09:18:07 | 显示全部楼层
测试延迟
$ _2 U* G/ [, S& l1 S( L4 V' k  Q( _8 ?& O* t
​ 队列深度为1,bs设置为4k,也就是模拟单个队列读写的延迟测试( i+ F0 u8 S: F; ^- }4 }  F
. A) {; d  r& A- g1 {' o
吞吐# N/ A; V5 k0 W( r& }% u

) T, K# E7 o  s" M5 _( R8 K2 J​ 队列深度为32,bs设置为128k,测试最大能力去跑满整个磁盘带宽
9 |3 S- ]  ^' G: `3 p+ H* f  B# d5 y
iops1 e5 J9 v+ v6 P- e6 Z/ S2 F

( k4 t% {0 T$ x( `1 U' N​ 队列深度为32,bs设置为4k,要在最短的时间内多去读磁盘& J4 J+ |, ~1 {4 G
# T# {/ ^9 d; s- k* A! ~
小文件通常测试随机读写,大文件通常测试顺序读写。
: e( b, U! X. Q  d, m' {$ U% q) m# L: Q# C0 E+ ~
测试顺序读IOPS
, L1 Q& g. i- W: Q3 M+ O" \/ i# L( ~5 ]
fio -name=Seq_Read_IOPS_Test -group_reporting -direct=1 -iodepth=128 -rw=read -ioengine=libaio -refill_buffers -norandommap -randrepeat=0 -bs=4k -size=10G -numjobs=1 -runtime=600 -filename=/dev/[device] 6 ~* J5 h. M5 h  ?) u5 B' n2 K
测试顺序写IOPS
# _( a: F0 ^6 b( N) T/ Z8 r0 m8 x. b$ F" D2 z. B
fio -name=Seq_Write_IOPS_Test -group_reporting  -direct=1 -iodepth=128 -rw=write -ioengine=libaio -refill_buffers -norandommap -randrepeat=0 -bs=4k -size=10G -numjobs=1 -runtime=600 -filename=/dev/[device] 1 u' H4 L; F3 c+ l3 ^) q4 {
测试随机写IOPS! e: |% _6 g6 l) N" B

4 ?! @1 `# a, a+ Kfio -name=Rand_Write_IOPS_Test -group_reporting -direct=1 -iodepth=128 -rw=randwrite -ioengine=libaio -refill_buffers -norandommap -randrepeat=0 -bs=4k -size=10G -numjobs=1 -runtime=600 -filename=/dev/[device]
" K5 v6 h: j1 w8 k: L% A6 M测试随机读IOPS
# k2 W! i7 g& B) P$ b
0 ^3 S, k: H5 cfio -name=Rand_Read_IOPS_Test -group_reporting -direct=1 -iodepth=128 -rw=randread -ioengine=libaio -refill_buffers -norandommap -randrepeat=0 -bs=4k -size=10G -numjobs=1 -runtime=600 -filename=/dev/[device]
) a; U, C+ Y, V, q! U% b2 {9 t# y2 G测试混合读写
' L! a) `! [4 J5 T9 W5 J. u6 W2 o7 ^5 Y7 x8 ~0 }
fio -name=Read_Write_IOPS_Test -group_reporting -direct=1 -iodepth=128 -rw=randrw -rwmixread=70 -refill_buffers -norandommap -randrepeat=0 -ioengine=libaio -bs=4k -size=10G -numjobs=1 -runtime=600 -ioscheduler=noop2 }! \- B$ o9 A0 }- J
测试写吞吐量$ i4 _" O: k% @
0 s5 J+ H, c! F. G8 R. v, M; H
fio -name=Write_BandWidth_Test -group_reporting -direct=1 -iodepth=32 -rw=write -ioengine=libaio -refill_buffers -norandommap -randrepeat=0 -bs=1024k -size=10G -numjobs=1 -runtime=600 -filename=/dev/[device] 3 j: c# }; D8 n& Y7 U% r. T
测试读吞吐量6 S; i- v9 s& y7 M# ?) H8 }5 C7 m
8 a3 K+ j; a/ d3 R
fio -name=Read_BandWidth_Test -group_reporting -direct=1 -iodepth=32 -rw=read -ioengine=libaio -refill_buffers -norandommap -randrepeat=0 -bs=1024k -size=10G -numjobs=1 -runtime=600 -filename=/dev/[device]
, b( g& f2 D5 D1 m0 K测试结果输出指标
4 l9 x+ @0 i. Q+ Q. u( aIOPS:每秒读/写次数,单位为次(计数)。存储设备的底层驱动类型决定了不同的 IOPS。 --> iops4 J/ y- N: w0 a; m+ h$ x
吞吐量:每秒的读写数据量,单位为MB/s。 --> bw
' ~4 {0 V- z) H9 @8 b, N; G时延:I/O 操作的发送时间到接收确认所经过的时间,单位为秒。 --> lat (msec)2 s+ T8 B7 R3 L) l7 i* q
runt:总运行时间
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 01:55 , Processed in 0.042943 second(s), 33 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表