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

fio测试IO工具

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2022-6-20 11:37:25 | 显示全部楼层 |阅读模式
fio测试IO工具
* @3 I. i5 j% |& c# F7 R3 r: y! T
下载地址:

: P  S9 I1 r. y  o- f. I
* ?1 l7 \  S$ n4 z4 K+ T: Z! G- Y
- a( a# ^  x; |/ n7 H: H* [) A

# M6 Y* ?( J1 ]( V
, Q: B! T& P: P" O  \( G0 s! b
2 X5 c, b- f% o- N0 Q
fio-2.1.10.tar.gz
  W+ c; u" b. g( c

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2022-6-20 11:49:00 | 显示全部楼层
[root@testssd ~]# tar -zxvf fio-2.1.10.tar.gz     解压fio" t1 D) b+ \2 c  Y  {
fio-2.1.10/
( [: z/ l) f" w. _0 O2 s4 f- |7 K* `5 n) |8 j; `/ I
安装gcc gcc-c++  make 2 e+ m8 g$ @2 V9 y
# yum install -y gcc gcc-c++ make
2 N- W. h# C/ W; ?

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2022-6-20 13:42:09 | 显示全部楼层
[root@test1hhd fio-2.1.10]# ./configure
4 }9 Y+ X# k" R: s$ @Operating system              Linux
. v  Y- T( i5 l$ i/ {: F5 v( W/ WCPU                           x86_64" Z' b$ r& Q2 K8 M% {) G
Big endian                    no( _2 x9 U' ?/ h
Compiler                      gcc7 c( o  ?" w+ \- V- w* t
Cross compile                 no
( v9 R# `2 h) O' V5 `- o( P, J) s
Wordsize                      64& f3 y  i% J- [9 `' R1 F. q9 a8 U
zlib                          no
: r4 w+ Q8 T, l# gLinux AIO support             no
9 o" Y. d7 W6 q( ]/ O  T' m+ pPOSIX AIO support             yes
$ q' Q- c) {3 A) mPOSIX AIO support needs -lrt  yes  a" ?) W8 S0 {6 e- S
POSIX AIO fsync               yes5 ]5 P- A7 a- |+ O& ?4 T& E) o- _
Solaris AIO support           no
% R' T: B( o) T$ \2 G__sync_fetch_and_add          yes; X8 s+ I3 |2 m# f5 y: Q
libverbs                      no
7 V- W5 L" C: \& c- I, g) |/ wrdmacm                        no* m0 t# X  d0 k
Linux fallocate               yes
8 P& f# n$ v  S& Q# IPOSIX fadvise                 yes* D. Y5 y' h  R" ~- @: z
POSIX fallocate               yes
$ h2 C( _$ f3 msched_setaffinity(3 arg)      yes
; _2 }% W& c' d. l* psched_setaffinity(2 arg)      no
5 y/ V' h& X+ k$ h% G3 P6 rclock_gettime                 yes- Z; G2 x6 Q- R
CLOCK_MONOTONIC               yes; z& ~. W* W* g8 c8 p3 D$ U
CLOCK_MONOTONIC_PRECISE       no. G2 b) j3 c1 l& J% F$ l
gettimeofday                  yes
9 [. e" g5 H$ z2 j( p4 G7 m" efdatasync                     yes( v% P) ?3 D# K2 [
sync_file_range               yes9 i" Q* o: X* E8 C" w
EXT4 move extent              yes9 y# J0 Y' j5 d& S& G* [, d
Linux splice(2)               yes0 h* p1 \, S( c, h- C
GUASI                         no
2 u8 j( R& W$ LFusion-io atomic engine       no
% X) z9 d- y! \* X/ d6 mlibnuma                       no
: O: h/ c% N( T4 V. mstrsep                        yes) X; o- L8 k  s: w- T
strcasestr                    yes: _1 h& ^: j' S( v& }! w( I1 N8 Y) i
getopt_long_only()            yes* A  y, I0 C, ^4 U2 m  k
inet_aton                     yes
4 y2 h- ~: K; jsocklen_t                     yes
; T# n* e0 g0 K8 v' O9 v) z__thread                      yes
$ G6 l; v2 [$ J/ fgtk 2.18 or higher            no
( z0 O- J7 A/ |8 S7 d" W4 ~RUSAGE_THREAD                 yes
  v7 \; N8 `' {. o. [; r; _SCHED_IDLE                    yes
4 m  ?, R  E: C, XTCP_NODELAY                   yes
; j1 o9 Y5 v$ V* f! P/ N6 ]* ~- v( cRLIMIT_MEMLOCK                yes
" f, M! I6 F5 l" x  l- lpwritev/preadv                yes$ Y; W$ i, K- u6 \
IPv6 helpers                  yes1 j2 S, s" @- |- Z& E8 z
Rados Block Device engine     no
( a4 e& Y) _9 Y) I1 ssetvbuf                       yes
  i/ Y' R2 r. H8 m4 \! U% cGluster API engine            no5 g: s6 M) O! f0 x- c
Gluster API use fadvise       no* n* O$ V, V0 w: e& a) R& [
s390_z196_facilities          no

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2022-6-20 13:46:01 | 显示全部楼层
[root@test1hhd fio-2.1.10]# make
, u, w) ]' Q4 C9 BFIO_VERSION = fio-2.1.10
9 K7 O1 i/ p3 y. `4 W    CC gettime.o
. E4 ~3 b) R' s8 F    CC ioengines.o
9 A& ?( C7 n% P2 y  J: l" k    CC init.o
+ x0 V$ H3 y5 B5 p; k    CC stat.o
* U( n$ h$ S4 @) {    CC log.o) J( w! C$ U; H/ W9 g9 F. k9 X
    CC time.o* N6 O/ l. z3 M/ d0 X* ]
    CC filesetup.o
' t+ a- p3 h' _' q    CC eta.o/ r( a, e3 ~: _3 r( S, f
    CC verify.o3 o+ ]( O( X% k
    CC memory.o, k5 j& W" j2 x% T4 K1 }/ t3 b
    CC io_u.o
& h* p+ |2 F. L2 @. M1 Z    CC parse.o$ W7 r" y+ r' O; F0 R, |1 q0 d9 v- i' }
    CC mutex.o
% d) ?7 B/ W1 I. h" s6 o) v    CC options.o( g* j9 c% u$ \
    CC lib/rbtree.o
6 M4 a9 Y; m6 p1 R! N. o, D    CC smalloc.o' P; M; F0 u, n6 G1 M, j
    CC filehash.o
& m9 U' y3 `# m* p' E/ Y* Y1 C) l    CC profile.o5 U' p2 `, N! ]# A; y" T
    CC debug.o' x5 b  |( H4 S  J) a6 i, b
    CC lib/rand.o
- @* K* }8 E# _  p6 S: s7 D    CC lib/num2str.o
4 l" {% c9 r9 v: G* H    CC lib/ieee754.o
* }1 |+ u' Z6 x# K    CC crc/crc16.o3 E' v! @% h" ?0 e
    CC crc/sha512.o( k2 x& A" r5 {; l
    CC crc/crc7.o5 A3 V3 A+ }: ~& F, h0 o$ v
    CC crc/sha1.o# `0 O- V4 p1 {: P( }% x' F& m
    CC crc/crc32c.o0 ?6 p9 {1 S: ~" {! I
    CC crc/crc32.o
! w9 M: g# x, m* U$ g    CC crc/crc32c-intel.o
  ~( Q# T' c# N  `' p; H5 I    CC crc/xxhash.o9 S6 }4 @( Q; m' ^- S$ C/ I1 P
    CC crc/test.o
4 N) U6 J7 A! i. D    CC crc/sha256.o
! e  ]" l+ O9 T) U% g2 B, t( b$ s    CC crc/md5.o+ I( j7 O3 Y8 ]2 g" d8 E
    CC crc/crc64.o, Z8 Z3 _, N7 h6 E2 p  U
    CC engines/cpu.o
. t0 _4 T! M, X+ W) g6 d. m$ `    CC engines/mmap.o/ r/ s* U; v1 F9 x4 M2 F. S8 R
    CC engines/sync.o$ z/ Z/ {4 }+ z
    CC engines/null.o
3 T1 r8 z4 [! b( q/ S* N" e    CC engines/net.o
( B, p4 C2 B; ?    CC memalign.o, i6 R" A, u7 C6 I" {* E$ B3 Q
    CC server.o( W/ D+ @3 t; {1 r3 V% G
    CC client.o
" A; Y! r6 Q: _' W' x+ @3 N    CC iolog.o
9 N% T$ K* w$ S. S( P    CC backend.o
6 o& B! p6 @! n    CC libfio.o
; b. x2 B! g3 N    CC flow.o
9 l1 j. m8 T8 V( ]    CC cconv.o$ p" a) j4 x( N+ n( K& x9 o) |) |
    CC lib/prio_tree.o( C6 r2 G7 `& m- ~$ ^! c
    CC json.o
* y7 `+ B& \" b5 t2 w" H    CC lib/zipf.o
8 d6 ]; {% w, V9 i% d2 g7 S! o    CC lib/axmap.o1 P0 u. i) Z& X0 U1 m0 G( p
    CC lib/lfsr.o
7 z, A: E; |% D) {9 {& j  f    CC gettime-thread.o5 w* Q/ a# ]" O- y$ X
    CC helpers.o) l" \3 d- Y) t: b
    CC lib/flist_sort.o
. _/ b5 y9 G$ |    CC lib/hweight.o& I0 e9 \/ G9 N. n
    CC lib/getrusage.o( R6 D  [! F* K, z* b7 q1 P
    CC idletime.o. ~! J$ `+ z2 l( G) C5 L; h! Y
    CC td_error.o
+ i( r! a6 e  m" n# P    CC profiles/tiobench.o& K' V; l1 k8 P& [
    CC profiles/act.o5 b" _" |3 R: O) Q0 e+ z1 N
    CC io_u_queue.o
/ D! t0 c) f5 A7 o    CC filelock.o
, [; [3 B' x8 R! y) M2 E    CC engines/posixaio.o
' H( f& Z, b( Z& i# r$ x0 }    CC engines/falloc.o
7 I( J( a; R( L- `6 K    CC engines/e4defrag.o5 r/ }& H1 _4 S
    CC engines/splice.o
0 u5 H+ |% F$ T    CC diskutil.o
$ \; ]! T' w2 z4 L    CC fifo.o! e% K1 w" e1 F7 P- }0 k* A7 h4 F" e
    CC blktrace.o
0 q" r1 ~/ v( }' F2 F' s    CC cgroup.o
* ^7 y( M, r# o* ]  N    CC trim.o
9 A' Z9 n/ \9 W! |+ j    CC engines/sg.o( _9 z3 ?# {) \: x& w! u! Y
    CC engines/binject.o7 n. G9 N3 v, u; A
    CC fio.o
) `$ F- M+ A6 Z2 N( W- h    LINK fio
6 Y; v) e/ `" H+ H/ v4 Z[root@test1hhd fio-2.1.10]#  make install # W" F6 m# h7 r$ \  ?. Z
install -m 755 -d /usr/local/bin
) z& {! s4 r$ \/ K) K! i  Oinstall fio tools/fio_generate_plots tools/plot/fio2gnuplot tools/genfio /usr/local/bin
* D/ @2 \+ a! j1 `% Iinstall -m 755 -d /usr/local/man/man16 c! t0 U# A7 R, `2 t6 w! j* r
install -m 644 fio.1 /usr/local/man/man1$ R2 k0 o; {7 p5 G2 z8 H
install -m 644 tools/fio_generate_plots.1 /usr/local/man/man1
4 j% r- f: S. h; n, `install -m 644 tools/plot/fio2gnuplot.1 /usr/local/man/man1
- A/ F9 V# h  [9 m/ t6 einstall -m 755 -d /usr/local/share/fio8 [/ V- }9 Y% w) ^( z3 d. B
install -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
% _! \1 u7 K: hrand_100read_4k: (g=0): rw=randread, bs=4K-4K/4K-4K/4K-4K, ioengine=psync, iodepth=1
5 p; E, N3 |4 ~6 O  `...
; X4 q" Y5 z8 n4 ffio-2.1.10
+ ^0 s, S' A# Z8 TStarting 50 threads5 C! C1 x7 P, W& v( [  E
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]] . b7 g% S5 E; u; M, p
rand_100read_4k: (groupid=0, jobs=50): err= 0: pid=19880: Mon Jun 20 13:42:03 20226 @% F: W" J+ F" G( D
  read : io=840436KB, bw=4634.1KB/s, iops=1158, runt=181327msec+ r' |  u3 Z* \! e7 e
    clat (usec): min=308, max=3703.3K, avg=42907.91, stdev=175774.03, k! E: n2 n0 u+ ?. i) h
     lat (usec): min=308, max=3703.3K, avg=42908.22, stdev=175774.04+ v0 j+ W+ S& v: U. d
    clat percentiles (usec):# w' `6 q' y1 `) q, {* S7 O  I
     |  1.00th=[  402],  5.00th=[  450], 10.00th=[  482], 20.00th=[  532],
5 C6 }: j' X" P+ U4 G2 r% D     | 30.00th=[  572], 40.00th=[  612], 50.00th=[  684], 60.00th=[ 1688],
/ U, J/ n0 m0 b4 @' K# K" H9 h     | 70.00th=[ 7776], 80.00th=[30848], 90.00th=[93696], 95.00th=[195584],
; x4 V1 O: V9 h0 m     | 99.00th=[700416], 99.50th=[1335296], 99.90th=[2473984], 99.95th=[2867200],' f% D& p0 d/ e: l7 J
     | 99.99th=[3293184]/ x. c# R6 q* Z6 C# o2 f' s1 ^
    bw (KB  /s): min=    1, max=  810, per=2.59%, avg=119.98, stdev=103.34
; Y- {, x8 ?! r( t7 F    lat (usec) : 500=13.52%, 750=41.62%, 1000=3.46%
" j. f4 ?3 n3 b+ f# f9 q  h    lat (msec) : 2=1.79%, 4=4.13%, 10=6.84%, 20=4.77%, 50=8.64%/ s2 n/ N1 M1 ^* _% h7 Z. N
    lat (msec) : 100=5.68%, 250=5.93%, 500=2.12%, 750=0.58%, 1000=0.24%
% F! `1 w! Z" C0 ?    lat (msec) : 2000=0.49%, >=2000=0.20%+ K/ L# B& P/ W* W& \1 j
  cpu          : usr=0.04%, sys=0.06%, ctx=210142, majf=0, minf=59
4 w# j/ D  c; D* d6 Y# }  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
0 b, b/ I( Q$ A     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
" c+ h: [; d+ z2 T. V6 D4 n( v1 o     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
9 o4 o7 p+ s+ j2 c/ t) r% B     issued    : total=r=210109/w=0/d=0, short=r=0/w=0/d=0
" T1 p( S- B5 C2 C     latency   : target=0, window=0, percentile=100.00%, depth=1! v, |  x! o& G$ @$ A, ?# w4 j

6 H$ Q# A3 k8 \# i/ Z! C/ bRun status group 0 (all jobs):. {7 m* ]! a0 J/ \
   READ: io=840436KB, aggrb=4634KB/s, minb=4634KB/s, maxb=4634KB/s, mint=181327msec, maxt=181327msec1 D' F! I3 b% t, P
2 d% l# I! Q; V( y. H0 }5 I# b2 K3 N
Disk stats (read/write):' o8 k& C9 n% h+ g
  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_4k( l% y6 J* \' k, b/ z
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_4k9 \. }; _( A" i; _% h  Q( Q0 J

( g0 a: Z6 @* |6 cfio -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
' \! X) N& }" p, O( M$ V  n* R
# d% I: f4 h6 _) s' J: g0 z  F5 G& z: H- @( ^
测试场景:
  100%随机,100%读, 4K
, \$ E  N$ i6 U- O6 K  i  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
4 B' [1 ?+ G6 V' i5 L' Y3 X  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; o: \5 B, s4 h3 v2 N0 o" t
  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
9 ]# m! _9 w! q8 [# P+ k  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
- ]4 m5 f* q; r; [- G. o4 `4 C  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_reporting
% e$ K% k, ~9 {: n- e8 A5 k) q" kfio: engine libaio not loadable
" H; E2 Z7 N5 N7 w5 W5 Gfio: failed to load engine libaio+ {) o2 J8 H  s) |; g, ]8 ?
[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_reporting2 ?* U( i6 ^! R) }% L
fio: engine libaio not loadable" x8 j5 b1 e2 X, y% g( Q
fio: failed to load engine libaio. {+ X; D3 }  e1 U. q
[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
( K$ E% m1 O+ P. Ltest: (g=0): rw=read, bs=16K-16K/16K-16K/16K-16K, ioengine=sync, iodepth=1
- F+ R& F4 Y5 A: M...
9 X4 G' F; x4 x/ J# A" a9 efio-2.1.10
) k' S% k% G/ }! K- f) z# cStarting 16 threads5 v. K6 K( r: p
test: Laying out IO file(s) (1 file(s) / 512MB)
0 O: J( q& q5 HJobs: 16 (f=32): [RRRRRRRRRRRRRRRR] [100.0% done] [141.7MB/0KB/0KB /s] [9027/0/0 iops] [eta 00m:00s]1 q# R$ R. T% J. \
test: (groupid=0, jobs=16): err= 0: pid=21845: Mon Jun 20 14:19:25 2022/ k# @/ v& h% }: N: R
  read : io=8328.9MB, bw=142137KB/s, iops=8883, runt= 60004msec. t% R3 R& ?# b6 z' Q
    clat (usec): min=215, max=62700, avg=1798.77, stdev=1583.64$ |3 E5 {5 s* z4 S5 p: t' }
     lat (usec): min=215, max=62700, avg=1798.97, stdev=1583.653 f% R) ?) o2 ^6 Z& ?
    clat percentiles (usec):
2 j% o& t9 m, P! z. ?- H     |  1.00th=[  306],  5.00th=[  362], 10.00th=[  458], 20.00th=[  724],% Q/ q; ~- W4 U
     | 30.00th=[ 1096], 40.00th=[ 1640], 50.00th=[ 1864], 60.00th=[ 2024],- o' q0 w& {: s! X
     | 70.00th=[ 2224], 80.00th=[ 2320], 90.00th=[ 2608], 95.00th=[ 2928],
# N& @5 G; s8 w. ~. `     | 99.00th=[ 6944], 99.50th=[10432], 99.90th=[22656], 99.95th=[26240],  x. O8 s; K1 ?. R; Q# e* d, l  e. M
     | 99.99th=[34560]$ d# p+ \8 x; I; g% M  F8 d6 J
    bw (KB  /s): min= 2331, max=19523, per=6.25%, avg=8879.79, stdev=3417.383 O; y6 \/ {; @* b8 s! I
    lat (usec) : 250=0.01%, 500=11.32%, 750=9.70%, 1000=7.54%# t! F  C* a8 `2 M1 ?* }4 n8 ^1 V* O
    lat (msec) : 2=30.34%, 4=39.02%, 10=1.53%, 20=0.39%, 50=0.14%9 r5 e9 B. m+ [5 [0 h; ?$ m
    lat (msec) : 100=0.01%
  I$ ]! W7 x' L1 R- c  cpu          : usr=0.29%, sys=1.34%, ctx=533068, majf=0, minf=82
2 J! p* O) T6 ?2 }0 R; u4 _  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
" O% @1 t' C. ?$ L# ^     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
. J1 ?! N9 z- T4 J6 x: S) [" p     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
; v4 [  ?8 \1 }: x  Q     issued    : total=r=533048/w=0/d=0, short=r=0/w=0/d=0
- P; h2 s) T8 K. E3 X" `9 z9 Z     latency   : target=0, window=0, percentile=100.00%, depth=1
. O! K7 V% Y' B' G9 o8 x
9 R4 L" P, y' l) v: KRun status group 0 (all jobs):
6 D  [- R; j! g$ F7 u; e' B" X. L  |   READ: io=8328.9MB, aggrb=142136KB/s, minb=142136KB/s, maxb=142136KB/s, mint=60004msec, maxt=60004msec1 l$ }( K7 I! V8 i% Z5 d( o

: i/ m# O5 F& t$ J5 W; tDisk stats (read/write):6 {. T- q1 {- R% G, c; O" d: X
  vda: ios=529229/11, merge=784/1, ticks=938227/67, in_queue=936843, util=99.83%# k( |9 d8 Y6 g; y0 e) N$ P$ N
  dm-0: ios=265320/10, merge=0/0, ticks=475542/77, in_queue=476458, util=98.64%
" A" ?/ w1 p5 z9 t7 I[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% g1 j' C, B- P5 Q+ O# R; e( k
test: (g=0): rw=read, bs=16K-16K/16K-16K/16K-16K, ioengine=sync, iodepth=1
" }; T4 l8 e; W0 a3 i...7 G' {4 A, Q- j1 |# n( i
fio-2.1.10
; n; F. U% ]% O( M  \# I  y, Z! e. @Starting 16 threads  [* r, @  R! Y
test: Laying out IO file(s) (1 file(s) / 1024MB)
* ]5 I8 ~2 T1 J' U5 ?) X4 ~Jobs: 16 (f=16): [RRRRRRRRRRRRRRRR] [100.0% done] [139.3MB/0KB/0KB /s] [8914/0/0 iops] [eta 00m:00s]- b% H9 h+ ]" D) w+ L
test: (groupid=0, jobs=16): err= 0: pid=21868: Mon Jun 20 14:23:39 2022
3 J) D4 {9 N; X9 r  read : io=8815.7MB, bw=150436KB/s, iops=9402, runt= 60003msec
$ A: q* E; N& P- [    clat (usec): min=255, max=44491, avg=1695.99, stdev=1232.95
3 [, J+ t( [- G1 M4 Y     lat (usec): min=255, max=44492, avg=1696.20, stdev=1232.95
2 T6 I) V5 Y2 t& o    clat percentiles (usec):: I* A& x: i. i- H4 ^
     |  1.00th=[  426],  5.00th=[  532], 10.00th=[  636], 20.00th=[  820],1 `- Y0 J! m2 v8 f4 c  ~6 J
     | 30.00th=[  948], 40.00th=[ 1176], 50.00th=[ 1688], 60.00th=[ 2192],( C0 F* P. I6 p( N. r7 o0 f
     | 70.00th=[ 2256], 80.00th=[ 2288], 90.00th=[ 2448], 95.00th=[ 2832],9 j4 K$ ?* M  M* a  M) _: A: v
     | 99.00th=[ 4960], 99.50th=[ 7968], 99.90th=[15808], 99.95th=[21120],
0 `* B5 e) X1 K1 \7 Y$ N     | 99.99th=[31360]
% A" ?& T( F9 }1 R7 \) o    bw (KB  /s): min= 3937, max=24768, per=6.26%, avg=9414.93, stdev=3580.204 U1 L) t  l3 Q
    lat (usec) : 500=3.42%, 750=12.21%, 1000=17.97%) h% k2 k+ K, \  l  _& C2 p( d/ ]
    lat (msec) : 2=21.95%, 4=43.18%, 10=0.98%, 20=0.22%, 50=0.06%
7 H# r& C# ~* v9 ^, W- y  cpu          : usr=0.28%, sys=1.52%, ctx=564232, majf=0, minf=82+ n0 V9 Q& i2 j
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
2 n6 r& O" @5 M5 Y' p6 w. N     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
. C, e% |5 j5 A     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
2 @- ^; v5 Y  j( @# T  @. s     issued    : total=r=564164/w=0/d=0, short=r=0/w=0/d=05 w- B% M' X6 T# |) L' v6 h
     latency   : target=0, window=0, percentile=100.00%, depth=1$ D1 R) O. a- G7 ]# v( r7 b3 B

% b" ?- {8 c/ {( m( eRun status group 0 (all jobs):
4 f" c0 U2 b4 v. o0 j8 H8 D   READ: io=8815.7MB, aggrb=150436KB/s, minb=150436KB/s, maxb=150436KB/s, mint=60003msec, maxt=60003msec/ _( T* W2 z' p& Q1 D1 h

4 u9 b  p4 s2 yDisk stats (read/write):: k# o7 A7 Y3 d3 b. d
    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 n/ {" E: ~: B$ j# l6 \3 \  vda: ios=562960/10, merge=899/1, ticks=939104/36, in_queue=938630, util=99.65%
& h7 K9 ^3 x4 u: f) N6 n[root@testssd ~]#

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2022-6-30 09:18:07 | 显示全部楼层
测试延迟
7 D' d6 B* b! |5 i4 K! E* q/ u% d3 O) Y
​ 队列深度为1,bs设置为4k,也就是模拟单个队列读写的延迟测试
, K! B1 J! e7 k3 z  g
! Y  _9 L/ E0 C- q吞吐5 S; a  \" l4 h/ Z7 K1 g! n, E2 [( `
: M" T" g0 w  _3 m+ z2 X; W2 n) u
​ 队列深度为32,bs设置为128k,测试最大能力去跑满整个磁盘带宽/ N3 @& Y+ h# X

0 S$ `! I8 G4 c- iiops
# E4 i; d# D+ F; Z+ O
) X* B/ E$ q5 u! G$ d- r& z6 ?( k​ 队列深度为32,bs设置为4k,要在最短的时间内多去读磁盘
- p6 y$ D$ O( R. S$ w! e" N
& J3 v; r0 ^  ]  X0 A) S' X小文件通常测试随机读写,大文件通常测试顺序读写。) O7 B# y5 n: {% u* M+ F, v

% z: l& v$ B( P8 Y( S测试顺序读IOPS) _& l. [0 U& Q" L
1 x4 n1 X- B( i8 W( E
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] ( u: {( u( ]) b% s
测试顺序写IOPS- t  v3 k: w6 h

$ f$ f& o0 _8 k) ?# h5 G3 i7 u  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]
+ k; x$ q% N2 [* R1 G) y, J测试随机写IOPS) }$ B8 P) n; N

& C+ a3 Y* g8 G; Z7 j# ~1 {" zfio -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] / L/ J1 h9 y# j
测试随机读IOPS
  y* N/ _' c8 ^
) [3 W# f0 {( |$ u1 ~; ffio -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] + x& }' |4 a5 Y+ X8 V) T! j$ u" ~
测试混合读写  `- p( d* \& f4 m4 X( _; I" |# J* u
- t% R2 Y% P' g  y. U- ]  q
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, `4 K9 V$ g/ C% R( T
测试写吞吐量8 j% s0 o6 |' q3 n! O# p
: h( ]! l+ W' F$ `  c8 y
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]
( j% _; d$ i/ z! x测试读吞吐量
. S. I! D. h4 N+ U- _/ O! x' U. k; c  R$ \; t. N- K# }. N8 `& K
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] , `$ Q9 G  M0 I6 d( P# o/ |
测试结果输出指标$ {3 z% I/ N5 V5 P3 i
IOPS:每秒读/写次数,单位为次(计数)。存储设备的底层驱动类型决定了不同的 IOPS。 --> iops/ U) B, v" i7 I1 Q5 N/ g0 L
吞吐量:每秒的读写数据量,单位为MB/s。 --> bw
; N! P. C' M, S- Q8 P时延:I/O 操作的发送时间到接收确认所经过的时间,单位为秒。 --> lat (msec)* X6 g2 `$ X1 X' t" H
runt:总运行时间
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-12 02:00 , Processed in 0.030467 second(s), 30 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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