易陆发现互联网技术论坛

 找回密码
 开始注册
查看: 727|回复: 7
收起左侧

fio测试IO工具

[复制链接]
发表于 2022-6-20 11:37:25 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?开始注册

x
fio测试IO工具

( t2 h* {: I/ n9 c# [+ Z& _$ C
下载地址:

) `( [- r6 w% k; O1 ?9 k8 a
" w) m! S- @# G$ {2 p, K

! |5 r0 k% ^3 j
% [& e( y) \$ i

) {1 s# d3 L1 [

  j% O- Z4 k6 H, e8 P
fio-2.1.10.tar.gz

/ _0 q+ o1 a2 w1 j# e& K& i

fio-2.1.10.tar.gz

494.75 KB, 下载次数: 0

 楼主| 发表于 2022-6-20 11:49:00 | 显示全部楼层
[root@testssd ~]# tar -zxvf fio-2.1.10.tar.gz     解压fio" ?+ P( T. R6 E0 ?; D- S3 d
fio-2.1.10/
" c) `+ {7 T* k# n  g5 |. W# B4 H9 A9 t. _/ O% t
安装gcc gcc-c++  make
0 w% F) W3 C/ p6 k3 t# yum install -y gcc gcc-c++ make
7 c9 k: W7 j' @) I; a
 楼主| 发表于 2022-6-20 13:42:09 | 显示全部楼层
[root@test1hhd fio-2.1.10]# ./configure
* J. Z% m. X0 B1 `+ q# ?. o9 IOperating system              Linux
" |% m. U! s* ]* o2 g( u9 z3 BCPU                           x86_642 |9 A8 r& ]0 V# b, Z/ h' W# Q* b
Big endian                    no
/ M( |- j* L4 \: [4 b8 j4 o* ACompiler                      gcc: K: m% p: w5 B8 I' M; g  R3 i
Cross compile                 no
8 Q6 e$ l$ S& H. E
/ q% m; M- J' u  O+ S( hWordsize                      64
0 j3 Z$ a4 g; h; Gzlib                          no
9 c/ j0 T+ |, ILinux AIO support             no
& j# \4 ]! W: ~) ^4 zPOSIX AIO support             yes
5 y3 |& d4 ]" i& k  A1 uPOSIX AIO support needs -lrt  yes
: @4 {# B3 T# c; c+ _. OPOSIX AIO fsync               yes
! A$ O3 B6 E, V1 d! ESolaris AIO support           no
$ u) v" H: I8 ^7 u8 Z% x/ U7 G__sync_fetch_and_add          yes- b5 r+ V. j5 d' A
libverbs                      no% y3 \5 a$ I; R+ o7 R
rdmacm                        no
6 {  _6 e. _5 I" w! I6 Y) m0 O7 CLinux fallocate               yes
) R0 P8 {- [* w2 J0 ~0 tPOSIX fadvise                 yes7 K7 P% ^, t: \+ m* G
POSIX fallocate               yes
, I6 x/ z# |% V! f/ vsched_setaffinity(3 arg)      yes5 f/ n: c9 {6 l. g$ K
sched_setaffinity(2 arg)      no
) f' s8 m  x7 Y( n6 Xclock_gettime                 yes
3 Q; O( n% `* jCLOCK_MONOTONIC               yes
1 p* y% P. o7 `5 ?5 ?CLOCK_MONOTONIC_PRECISE       no
- n' E$ X! M$ t' C/ `! d4 {* Q- t, ogettimeofday                  yes" S8 E2 m* M" Y( s2 \
fdatasync                     yes
+ z# K; K2 m2 H+ ~sync_file_range               yes) }$ a% T2 N: Y* }- R1 E
EXT4 move extent              yes
4 T2 @6 q6 f9 B/ H) MLinux splice(2)               yes
7 ~" P. O& ]4 r" C0 U5 aGUASI                         no
' Y4 J, F% {. u/ ]) `Fusion-io atomic engine       no
9 N7 Z6 S& B4 \2 I8 W5 L' |libnuma                       no  v2 [% {) }, C* n% e7 p
strsep                        yes
4 X" q7 D2 M% f3 |strcasestr                    yes8 Q) M' w% d- x" s
getopt_long_only()            yes  p; _9 N! R6 c; t
inet_aton                     yes  o$ ?! [- X1 \% V8 t( W& H' s
socklen_t                     yes
% x6 \) K) r/ {, {  Q$ o__thread                      yes$ o: v. ?, v& L( e) l. _
gtk 2.18 or higher            no* h* c( S- o( O5 P7 H5 ]: a
RUSAGE_THREAD                 yes; [, Y; Z& n) R) j
SCHED_IDLE                    yes
7 S) F& W& z9 F- |/ vTCP_NODELAY                   yes0 n' A3 x' F2 E+ g6 h/ S
RLIMIT_MEMLOCK                yes
$ {& J' @; F4 i7 h" e1 Hpwritev/preadv                yes
6 f+ e& r. @4 h3 eIPv6 helpers                  yes4 b8 k1 P- H& w/ a4 S  H  l
Rados Block Device engine     no
! m! l; ^8 L! W7 T3 a% qsetvbuf                       yes
1 t0 s* [. R6 H9 U  }2 r% |7 WGluster API engine            no1 A4 h+ S4 L& ?. `6 J, L7 O
Gluster API use fadvise       no
/ M# _+ c& a. F& P% cs390_z196_facilities          no
 楼主| 发表于 2022-6-20 13:46:01 | 显示全部楼层
[root@test1hhd fio-2.1.10]# make 6 D+ n! D9 |" @, L9 {. M" [6 k
FIO_VERSION = fio-2.1.10. r" p2 i5 g( w1 q! z
    CC gettime.o7 C5 F1 ^  H4 O
    CC ioengines.o
6 \8 `5 y/ v- A4 N( Z    CC init.o" t+ p2 y0 h& A
    CC stat.o3 ]) |( g& o* W8 I9 I/ b4 K* s* r3 K- _
    CC log.o2 }) n% }# x" C. K
    CC time.o! m1 C. C( u/ K. c3 \8 @/ w( G
    CC filesetup.o
0 M5 F: b! s; |' r    CC eta.o
0 E6 G/ J: ]: w1 X    CC verify.o
( p/ q4 A: m: o0 Y    CC memory.o
( x/ e2 P* u1 @$ z5 T; _    CC io_u.o
+ J' i0 b0 D8 Q. o) [1 }    CC parse.o; X% O6 d9 t: @0 @! z
    CC mutex.o
, @5 n+ F) \3 D* I# p& L, Z6 C    CC options.o- k8 i: ~2 Z* ]. w6 H7 Q) _4 R, Z
    CC lib/rbtree.o4 Y! k; E3 E: T. v" s$ j. j- d
    CC smalloc.o
' s& d, {' i: d0 n( |# C    CC filehash.o% o0 N6 G; u; x& n
    CC profile.o
  I8 U: c2 v( h5 }* w( ^    CC debug.o6 X" R2 V  I/ a4 F$ P$ K
    CC lib/rand.o: P4 a- _5 u. ?0 D) I) g9 |
    CC lib/num2str.o
- [/ z2 y! D& }& c& A2 Q    CC lib/ieee754.o! ^( Q6 z8 y( s) D# L# `
    CC crc/crc16.o
  w" {' g& b. Y$ c$ X0 R4 B    CC crc/sha512.o# J3 ^7 o, T% i6 A
    CC crc/crc7.o
! N6 l5 S* L4 B; x+ |- l    CC crc/sha1.o
6 h- u3 t/ T% @0 o9 \" n    CC crc/crc32c.o
+ i( K/ p9 I* S0 C% v    CC crc/crc32.o
+ @2 k. G: r/ _/ ?7 C+ I* K) c! _    CC crc/crc32c-intel.o
, E" Z) v& S$ Y- B$ w6 _) A9 X    CC crc/xxhash.o
# k/ m( F9 l3 U6 m+ O3 k. A    CC crc/test.o) y  E. B' E$ t. e
    CC crc/sha256.o/ U8 W: F# e, g( f. _- B
    CC crc/md5.o
. I7 H9 k3 z" S- ^8 P# T+ v, I! C9 @% N    CC crc/crc64.o2 ^' G5 w) ]+ T7 B$ a8 O
    CC engines/cpu.o
+ x. \: k4 j( g! s. N+ _- u( r$ s    CC engines/mmap.o
& W" b6 Z3 x( i0 a) k  I5 }    CC engines/sync.o
& x+ z$ i/ Y& f6 s) G+ i    CC engines/null.o
! B" d% V# m, P- W* \    CC engines/net.o
+ E: K5 M9 k+ @( F3 ~    CC memalign.o. I& H$ w# h3 Y- J7 @+ u. d
    CC server.o% m* x8 o1 ]! _& k9 f
    CC client.o
+ k( H8 I+ R7 |& x( C$ c* m    CC iolog.o# C7 {7 x; g, E3 @
    CC backend.o. X% Y$ i8 d+ Y2 i% W
    CC libfio.o3 e5 D8 {% O( d2 O7 h7 O0 a! m
    CC flow.o
" n: n! X: D8 F    CC cconv.o; B% m9 R- Z" S2 L. {
    CC lib/prio_tree.o
) ]# P& V4 I; `, D; [- C; V1 J0 @    CC json.o3 [, d$ e, d$ p% V9 u
    CC lib/zipf.o
2 Q; O" w2 j3 v1 R" b! W# A    CC lib/axmap.o
5 `+ d& \4 v+ E" `& {. F) t: @    CC lib/lfsr.o0 |% J1 r  E: l* O( Q% Z
    CC gettime-thread.o
1 u5 G# G! e, |$ \    CC helpers.o
" `8 ?5 {" W. r! @7 z% T+ F7 Q- s    CC lib/flist_sort.o) O! J$ u7 ^2 }8 T
    CC lib/hweight.o9 Y: `9 W% f: X8 D
    CC lib/getrusage.o! _% h7 O8 ^* W6 ]
    CC idletime.o
8 O0 z+ j6 v3 b) E; |1 m    CC td_error.o
& d( P) g- \" a0 A& t; C    CC profiles/tiobench.o
9 g; M, E( P% R/ `: r6 W: J1 U) r    CC profiles/act.o
" W/ U) P  Q3 N" d  }  a0 a# E    CC io_u_queue.o) }! b6 B/ X. q* j: G
    CC filelock.o: P# c0 Z( T/ X/ l0 \) S
    CC engines/posixaio.o8 t4 S9 x& B; P( ~
    CC engines/falloc.o
" p, W( Q- a" R7 I, ?# Q+ H8 K0 ^4 k    CC engines/e4defrag.o
9 j4 G1 T. w7 W8 |# h" ]2 k( R    CC engines/splice.o$ u2 ^7 s6 P& \0 [) Q8 f, E
    CC diskutil.o
% ~+ W, f" G5 ?& C2 G; L    CC fifo.o
" T. H! D# U' G3 J    CC blktrace.o0 J; K# m* I* `! a+ G2 E. m1 b
    CC cgroup.o
- Q& |% K  a- m" X/ b    CC trim.o7 b' G4 _2 g8 ]5 g& ^4 H& j- p  u
    CC engines/sg.o
4 r" F" W: x+ E8 g4 Q    CC engines/binject.o
1 P- x2 F- ~) B: l- k    CC fio.o
0 r& d; P* g0 @' J+ K    LINK fio' }, g# [5 F) ]
[root@test1hhd fio-2.1.10]#  make install
+ o7 k$ s2 X5 t  n8 c. x- q! }install -m 755 -d /usr/local/bin
1 m4 @+ e+ o5 P6 E$ xinstall fio tools/fio_generate_plots tools/plot/fio2gnuplot tools/genfio /usr/local/bin! d) ]* O" n6 j9 }4 b2 \/ Z, A
install -m 755 -d /usr/local/man/man1
3 I3 x' Y' t* h5 A0 linstall -m 644 fio.1 /usr/local/man/man16 T* y+ R. k; n; h
install -m 644 tools/fio_generate_plots.1 /usr/local/man/man1
0 J# M6 ~6 C& V0 M. N9 m9 `3 Minstall -m 644 tools/plot/fio2gnuplot.1 /usr/local/man/man1! Q/ p3 |6 M2 z" |, }; l
install -m 755 -d /usr/local/share/fio
- G' m' p& Q, m  V" G+ ninstall -m 644 tools/plot/*gpm /usr/local/share/fio/
 楼主| 发表于 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
, E9 [2 C9 K$ h% {7 W+ urand_100read_4k: (g=0): rw=randread, bs=4K-4K/4K-4K/4K-4K, ioengine=psync, iodepth=1
7 Y" l2 M5 i3 N- v% f# o6 ^8 R5 j...
. |% A6 a0 K. J; s: s% D8 ~fio-2.1.10
. b: M  }  z) f$ U% p8 R. [. [# UStarting 50 threads
  c5 r, j9 ~5 ?) M) O1 L! |- w$ [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]]
; u* a1 I& n9 E; L- Q# ]rand_100read_4k: (groupid=0, jobs=50): err= 0: pid=19880: Mon Jun 20 13:42:03 2022
2 ?, j8 S" t& R+ s/ E  read : io=840436KB, bw=4634.1KB/s, iops=1158, runt=181327msec
+ j$ Q; b3 c+ S* A) k% @. o# M    clat (usec): min=308, max=3703.3K, avg=42907.91, stdev=175774.03  e( m/ q0 V) K1 W
     lat (usec): min=308, max=3703.3K, avg=42908.22, stdev=175774.04
+ A/ f2 B; h# X5 s& O# U2 Z    clat percentiles (usec):8 T# L, h  F: I  p" c6 y! z1 Z
     |  1.00th=[  402],  5.00th=[  450], 10.00th=[  482], 20.00th=[  532],
, G+ Q; v9 {. A2 C& s     | 30.00th=[  572], 40.00th=[  612], 50.00th=[  684], 60.00th=[ 1688],
1 s6 p, e! W# [8 Y/ W     | 70.00th=[ 7776], 80.00th=[30848], 90.00th=[93696], 95.00th=[195584],7 R! e% w1 d8 i9 h3 w
     | 99.00th=[700416], 99.50th=[1335296], 99.90th=[2473984], 99.95th=[2867200],
/ e( g1 q+ v$ G" C: M9 e2 ^! W  L     | 99.99th=[3293184]; H6 W! Z9 U, D0 S
    bw (KB  /s): min=    1, max=  810, per=2.59%, avg=119.98, stdev=103.34* U5 L: K; t% t( V/ F# d
    lat (usec) : 500=13.52%, 750=41.62%, 1000=3.46%  i' [0 H% ~1 l" e' a
    lat (msec) : 2=1.79%, 4=4.13%, 10=6.84%, 20=4.77%, 50=8.64%" Q0 A8 v( k% J" k. ]: F( T5 `
    lat (msec) : 100=5.68%, 250=5.93%, 500=2.12%, 750=0.58%, 1000=0.24%
* X) @# j, ?2 R$ I' n    lat (msec) : 2000=0.49%, >=2000=0.20%9 q' S( _. i- Q# r
  cpu          : usr=0.04%, sys=0.06%, ctx=210142, majf=0, minf=59& V  l) g# S  _$ b2 [6 O4 [
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
' z9 @. l* f  q' V& |0 B     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
# e( c: F, l2 s# H     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
  G! j; `% @* l& \9 B6 r. ?9 p1 r     issued    : total=r=210109/w=0/d=0, short=r=0/w=0/d=0
1 t  g4 s# v# o) T8 [5 Q     latency   : target=0, window=0, percentile=100.00%, depth=1
9 y+ C5 W! m) K& p+ }! z7 h. b
; D' K, A7 W( MRun status group 0 (all jobs):9 z1 A6 _8 u1 o* Q$ G( Q$ K' H/ \
   READ: io=840436KB, aggrb=4634KB/s, minb=4634KB/s, maxb=4634KB/s, mint=181327msec, maxt=181327msec3 v+ j9 i5 o/ {8 o$ I. L

! A* d9 Z3 N, N* d0 d' r$ n: S5 C9 _Disk stats (read/write):. s4 R9 ]4 Y3 {. e
  vda: ios=210103/28, merge=0/2, ticks=8996207/20602, in_queue=8914609, util=98.70%
 楼主| 发表于 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_4k
) ]5 X" B8 p1 A) w 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% r# Z; {* a: B9 J2 O0 {

6 M  Z# G9 G# x% q: o/ x8 T* E9 jfio -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' e( a" {) i( a' f& A
& F# `+ A- y7 h. r
9 U0 T& d) C% g: T/ u! j
测试场景:
  100%随机,100%读, 4K/ T) ]& L! V% P$ X) K; L
  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%写, 4K/ F% M4 a1 k3 \% n3 g* a
  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%读 ,4K
: w3 f6 B0 R2 S7 o! ^  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  h3 V$ N( n3 x3 S; C: @. l
  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
( T! a% ?6 X2 f  I  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
 楼主| 发表于 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_reporting
1 _. E$ Q! ~  A$ ufio: engine libaio not loadable
' k9 B1 A9 v: y: f' t6 a. Hfio: failed to load engine libaio
, ~2 z% q1 P) H& F# V[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_reporting5 A$ F( y+ T$ l  Y, D7 T% ^% C7 O
fio: engine libaio not loadable! _8 A# r; `# ~) D, t8 G: j% m
fio: failed to load engine libaio3 k6 Q0 ?& Q0 _1 c- w& e8 P
[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
1 Z" M) S4 `- f2 _& T" _1 ltest: (g=0): rw=read, bs=16K-16K/16K-16K/16K-16K, ioengine=sync, iodepth=1
( I. e7 o0 d) z  K/ ?...
' h6 d. j" I% ?9 T( y) E( r8 Pfio-2.1.10
3 L; s0 ]* x0 S9 I' C% xStarting 16 threads
4 K; o& A/ u$ ^test: Laying out IO file(s) (1 file(s) / 512MB)$ h: d% F8 v& {7 B; K
Jobs: 16 (f=32): [RRRRRRRRRRRRRRRR] [100.0% done] [141.7MB/0KB/0KB /s] [9027/0/0 iops] [eta 00m:00s]
3 O! ?$ T9 W# B5 f/ mtest: (groupid=0, jobs=16): err= 0: pid=21845: Mon Jun 20 14:19:25 2022. M' ^2 H5 ?$ @) |
  read : io=8328.9MB, bw=142137KB/s, iops=8883, runt= 60004msec
6 y' {- L8 @2 Q7 ~    clat (usec): min=215, max=62700, avg=1798.77, stdev=1583.64
8 t* d4 V$ `1 Y# s: U     lat (usec): min=215, max=62700, avg=1798.97, stdev=1583.65
/ y. T  Q/ v1 X. A1 @7 i7 a    clat percentiles (usec):
! n9 g$ s  S4 i# {     |  1.00th=[  306],  5.00th=[  362], 10.00th=[  458], 20.00th=[  724],
% d" @3 @4 i6 O) \. E- Q( a% g     | 30.00th=[ 1096], 40.00th=[ 1640], 50.00th=[ 1864], 60.00th=[ 2024],
: O. X, Q& t0 e! J8 ~& X, k, f4 f     | 70.00th=[ 2224], 80.00th=[ 2320], 90.00th=[ 2608], 95.00th=[ 2928],
1 y$ T6 `5 b3 s     | 99.00th=[ 6944], 99.50th=[10432], 99.90th=[22656], 99.95th=[26240],+ C" P' I" g5 E4 _9 c
     | 99.99th=[34560]
* \6 ?6 W/ q4 ], u/ j( g  s7 @1 {    bw (KB  /s): min= 2331, max=19523, per=6.25%, avg=8879.79, stdev=3417.38# h2 I) J; d) u% z0 }/ X
    lat (usec) : 250=0.01%, 500=11.32%, 750=9.70%, 1000=7.54%0 K4 s  a3 w( F4 @5 m0 E, f
    lat (msec) : 2=30.34%, 4=39.02%, 10=1.53%, 20=0.39%, 50=0.14%
. u, w/ X6 v/ d( [1 X    lat (msec) : 100=0.01%, s# Y+ [; m$ @+ \! y
  cpu          : usr=0.29%, sys=1.34%, ctx=533068, majf=0, minf=827 G9 X2 A. a: _+ X$ O
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%. P8 P4 C7 u  d/ Y' x
     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%0 V% P! j; t; P* y
     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%0 I$ Z; s# g1 v9 B% N  c
     issued    : total=r=533048/w=0/d=0, short=r=0/w=0/d=0
0 H9 K2 t/ Y0 A, S     latency   : target=0, window=0, percentile=100.00%, depth=1
( }7 j/ Y$ Q- p! i* w6 X, A8 C# b8 M0 g
Run status group 0 (all jobs):
+ C6 u" h2 `: U  X   READ: io=8328.9MB, aggrb=142136KB/s, minb=142136KB/s, maxb=142136KB/s, mint=60004msec, maxt=60004msec
4 F% G  a% ]. h: z( q; p6 [
' n# l; b& n0 _  }. }Disk stats (read/write):# k+ V$ R% ], p, Q) C1 s! Z
  vda: ios=529229/11, merge=784/1, ticks=938227/67, in_queue=936843, util=99.83%
% z& Z2 K* l5 f! h  J$ d7 \  ^% v( P8 Q  dm-0: ios=265320/10, merge=0/0, ticks=475542/77, in_queue=476458, util=98.64%
+ F$ l, G% K+ f, m3 v* u! p& P7 v[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) c, }& i  E9 C  R6 o  C+ ]" o
test: (g=0): rw=read, bs=16K-16K/16K-16K/16K-16K, ioengine=sync, iodepth=1
6 e0 i- U) c  [! p4 s3 Q& D3 V  c...
$ h# w$ P" u. u7 I" pfio-2.1.10
/ O$ o* F6 J. q# N; x9 n3 }, XStarting 16 threads( `: v' G$ ]/ Y6 B, t2 P8 |0 B& ~
test: Laying out IO file(s) (1 file(s) / 1024MB)
" p5 H- L; j8 i' I1 cJobs: 16 (f=16): [RRRRRRRRRRRRRRRR] [100.0% done] [139.3MB/0KB/0KB /s] [8914/0/0 iops] [eta 00m:00s]- L8 h, Y2 q6 m" o' S( k0 T
test: (groupid=0, jobs=16): err= 0: pid=21868: Mon Jun 20 14:23:39 2022
/ ?8 ^- ~% m. H4 M5 L% B  read : io=8815.7MB, bw=150436KB/s, iops=9402, runt= 60003msec/ H0 W0 V  N0 ?8 V$ P
    clat (usec): min=255, max=44491, avg=1695.99, stdev=1232.951 @) B* n2 x; H, s* _
     lat (usec): min=255, max=44492, avg=1696.20, stdev=1232.95
5 j' q7 G2 s) O4 J0 `! B" N    clat percentiles (usec):* o5 ^2 j8 d: `  t% d4 }$ m
     |  1.00th=[  426],  5.00th=[  532], 10.00th=[  636], 20.00th=[  820],3 ?' O- V' c8 D. o
     | 30.00th=[  948], 40.00th=[ 1176], 50.00th=[ 1688], 60.00th=[ 2192],
+ s) c% k4 O$ ^' }3 C, I     | 70.00th=[ 2256], 80.00th=[ 2288], 90.00th=[ 2448], 95.00th=[ 2832],) X6 t2 ^. F6 v. r, K% X
     | 99.00th=[ 4960], 99.50th=[ 7968], 99.90th=[15808], 99.95th=[21120],
. J! q) P1 D, E" J7 c% Y     | 99.99th=[31360]
3 o  E! d9 R# D7 n, ~0 X    bw (KB  /s): min= 3937, max=24768, per=6.26%, avg=9414.93, stdev=3580.20
4 o$ I/ h6 I. N# u( b    lat (usec) : 500=3.42%, 750=12.21%, 1000=17.97%$ R* [  a7 ?6 ~8 j, h$ m8 L
    lat (msec) : 2=21.95%, 4=43.18%, 10=0.98%, 20=0.22%, 50=0.06%7 [3 Z5 t2 `' ?9 W& u7 C+ p
  cpu          : usr=0.28%, sys=1.52%, ctx=564232, majf=0, minf=82' `% E9 w$ v' {5 z, S
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%5 s3 R# n: x% E  G$ p. P
     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%$ ~: z( v& [( `& {, W
     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%$ u1 s: v* ?7 M) A# r7 S
     issued    : total=r=564164/w=0/d=0, short=r=0/w=0/d=0
. Q4 r' K, k! h3 M; X6 d     latency   : target=0, window=0, percentile=100.00%, depth=1, l6 M1 ]9 e' k. u0 a1 o0 Y- q
, B3 E, ], ]3 {3 v- M% O
Run status group 0 (all jobs):# E8 H' f' @  Z3 f5 V5 d+ P( r
   READ: io=8815.7MB, aggrb=150436KB/s, minb=150436KB/s, maxb=150436KB/s, mint=60003msec, maxt=60003msec8 b8 Q, Q/ i( Y) l  j0 m  S

+ G7 y# T; I: SDisk stats (read/write):
- k: R: Q6 x. K, z2 l    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%
. {, n0 V$ A8 W/ h; s4 g# Y+ a  vda: ios=562960/10, merge=899/1, ticks=939104/36, in_queue=938630, util=99.65%& A  U  @! O& j0 q; ?. s/ x
[root@testssd ~]#
 楼主| 发表于 2022-6-30 09:18:07 | 显示全部楼层
测试延迟
/ q( p7 k+ r" s. {* j. G2 o
3 _1 H0 t8 J( p+ |' |​ 队列深度为1,bs设置为4k,也就是模拟单个队列读写的延迟测试
4 y$ _8 @' R  @$ Y/ y2 V* }' d- Q4 y. }
吞吐: X7 J9 o! z0 D) X% K% W/ c9 o, ~
0 l0 J) l( g* I7 `1 G/ H
​ 队列深度为32,bs设置为128k,测试最大能力去跑满整个磁盘带宽
7 f5 b7 B) O$ M) ^, o, ], u9 _& P1 R, Z" A9 ?8 a$ x1 y0 w* O
iops
; V) a! r  [1 y* N5 f, j0 v: w. p& |2 A
​ 队列深度为32,bs设置为4k,要在最短的时间内多去读磁盘, z: [+ J1 q6 K2 u- J

  I6 @& d7 F! `: z/ \小文件通常测试随机读写,大文件通常测试顺序读写。7 v; ^9 z9 [2 X- Q
3 h# e: Y, Y. N+ C9 H
测试顺序读IOPS, E, P2 Z9 E0 m. I8 m( \
7 n' R6 R# ^% y7 ?8 @
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]
3 |. k3 n0 o: w. N. z测试顺序写IOPS; y2 N& @5 i3 a2 D7 O, r

$ n" V( s* X5 H5 M- jfio -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]
7 t- R* s: p/ Z% X测试随机写IOPS- g& x5 S1 R) M2 a. D

5 ^/ {. O% l+ W. g/ f) |fio -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]
+ h* a0 d, X: _+ P1 m2 L8 N测试随机读IOPS5 }5 M: ~% A, t, V8 u: ?
8 T$ S" }) I, ]' {; e# M
fio -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] : z- q. I% z' w: O- O1 l  v2 u
测试混合读写' t, |2 S/ r9 c+ h1 h* T* ?

7 a& U- `* {6 ?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=noop
" ]8 v( X! e/ p3 N5 H( t9 o% I测试写吞吐量
/ D1 P& q  f0 a7 v! Q( i9 G$ g4 f$ V6 m3 T
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] + ]/ t8 i' ^1 r) U
测试读吞吐量( h: q0 v# w6 f: f! R/ ]

+ l& `8 L$ |' \( _! Q" _( Cfio -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] ( X. I# V8 b0 r8 R
测试结果输出指标
, H, s% Z5 q( k+ E: y) P; QIOPS:每秒读/写次数,单位为次(计数)。存储设备的底层驱动类型决定了不同的 IOPS。 --> iops3 n) w  W1 Z! V/ w, l7 o6 D
吞吐量:每秒的读写数据量,单位为MB/s。 --> bw
$ I3 S( c: u( e( }  z  ?" @时延:I/O 操作的发送时间到接收确认所经过的时间,单位为秒。 --> lat (msec)( v9 B& q% `9 D; ?
runt:总运行时间
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

北京云银创陇科技有限公司以云计算运维,代码开发

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )点击这里给我发消息

GMT+8, 2026-4-8 21:37 , Processed in 0.065490 second(s), 26 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

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