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

fio测试IO工具

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2022-6-20 11:37:25 | 显示全部楼层 |阅读模式
fio测试IO工具
: d9 h4 z7 d5 a  [
下载地址:

5 w& s& S) V4 {3 D' ^8 |2 j' v8 Q5 x. A* Z9 K! B* _
% U  _3 t& n: e, a1 Y+ x
* |% V) ]6 T, u, P: N
/ [+ ]- q$ q* F, J8 e* }

. \6 e  o2 [& W- v9 P  a
fio-2.1.10.tar.gz

2 w" k9 g0 w1 G( d

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2022-6-20 11:49:00 | 显示全部楼层
[root@testssd ~]# tar -zxvf fio-2.1.10.tar.gz     解压fio& N4 I: O; l% T
fio-2.1.10/
. ~2 Z& z; t5 V" P9 s( K9 H% t% M0 n0 B8 k* X: r4 z
安装gcc gcc-c++  make 9 v8 E( }1 a& h5 N( F
# yum install -y gcc gcc-c++ make # c4 d$ D; C7 R# W$ S

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2022-6-20 13:42:09 | 显示全部楼层
[root@test1hhd fio-2.1.10]# ./configure
2 \) W( @5 M9 wOperating system              Linux
9 O  B5 w& Q7 e5 hCPU                           x86_64  F3 p. V" b+ W
Big endian                    no+ h6 h0 f5 G$ [+ v; z
Compiler                      gcc
) X/ |! {) i7 s" ~( X. x) zCross compile                 no
1 F- O5 h/ R1 z" M0 Z) F# L8 e* C4 x8 M) v  ?
Wordsize                      64, r1 I6 T- {7 J0 s) Z' t
zlib                          no) v( `  _8 A$ l0 l% T: U3 n: o, _7 c
Linux AIO support             no% h% t+ b4 }( S* T5 p
POSIX AIO support             yes8 O0 v! i$ A, q6 p9 x. _, ]
POSIX AIO support needs -lrt  yes
  e5 G' J; q& D$ vPOSIX AIO fsync               yes) `, u' h& k% g4 ]
Solaris AIO support           no
  d5 }8 u% }0 s9 o5 K__sync_fetch_and_add          yes/ c( A5 z0 S& u5 i: D  r5 X
libverbs                      no
4 p7 ~: ]  b3 F2 d( e- ~rdmacm                        no
# n( P# _5 B3 P1 ?3 x: \" G) nLinux fallocate               yes
# h7 C6 o1 Q% B, g  ~+ t2 ?( TPOSIX fadvise                 yes2 J- c! `% n( w3 K
POSIX fallocate               yes
4 V1 |! Q* f7 _4 I" ^. q  \sched_setaffinity(3 arg)      yes, f* ~4 z* I3 a* N) u: s4 ^
sched_setaffinity(2 arg)      no. h% H1 g, i  [, j! |
clock_gettime                 yes
- {/ q/ h% U: ~CLOCK_MONOTONIC               yes) g8 {' q/ l' l9 D8 u& h7 ~- K
CLOCK_MONOTONIC_PRECISE       no
7 H7 ?4 ?' k$ C" Mgettimeofday                  yes9 r( M6 u0 Q& g' U" j
fdatasync                     yes6 a; u) e1 S) @! z1 t  h( p" k+ I
sync_file_range               yes
8 ~/ b5 Q3 Z* V4 g. z7 n# _EXT4 move extent              yes
. Y& g. u' \" q$ ~3 ^" w& ~/ WLinux splice(2)               yes& x* v0 f4 T; ~/ C9 z4 u2 @
GUASI                         no
) M  L; a) l' s9 h( ?9 f! h" Q% JFusion-io atomic engine       no5 B# B; F  {/ m
libnuma                       no
" ]+ z3 X# |5 N& j7 E2 ?: jstrsep                        yes
; U/ m0 Y2 j& P$ G& Zstrcasestr                    yes9 g* s+ m$ ?; `* \, F  D5 F* b
getopt_long_only()            yes
  O+ n/ N0 V  k& ~4 ]inet_aton                     yes  d1 `# Y" H1 f6 Y. i" c9 x" p
socklen_t                     yes
( U3 J& K3 y  @6 Y2 T6 R+ v6 D__thread                      yes+ [) z5 N) v0 R3 s3 ~
gtk 2.18 or higher            no
6 ]; N2 }* t4 Y) N9 n# ^# ERUSAGE_THREAD                 yes
) a1 ]! |9 O& k+ I* B9 e9 T: ZSCHED_IDLE                    yes& `; M% U5 q, p5 y7 A# }! p/ v8 C! z2 C
TCP_NODELAY                   yes
5 {% H  M2 Q( {$ x8 L2 U8 [RLIMIT_MEMLOCK                yes0 `) T; z. S6 M, C- ^) f
pwritev/preadv                yes
7 h/ z$ ^- q; w+ W! SIPv6 helpers                  yes
9 ^5 j! l. o0 ]$ `5 {$ d! g3 A; ?3 URados Block Device engine     no8 B  V4 z" T; {% s" h
setvbuf                       yes
' N) Y0 X: @# D) uGluster API engine            no. E) M' Y% F+ c: F. j/ T- n9 C
Gluster API use fadvise       no3 m# s+ L0 V, `; n  n9 }* @
s390_z196_facilities          no

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2022-6-20 13:46:01 | 显示全部楼层
[root@test1hhd fio-2.1.10]# make # H! Q, H' f( V' ^6 F! ?6 E5 q6 K
FIO_VERSION = fio-2.1.10- S9 G  F/ L, Y# T
    CC gettime.o5 w7 b- y" m# J$ O
    CC ioengines.o
" X- F. t0 c1 p    CC init.o
+ p1 x! R2 B2 u  e: u: S" W    CC stat.o
9 W* ]/ {! V$ v" C    CC log.o8 c" j1 i) e- ~+ t2 c) S7 k
    CC time.o/ O' r# s- f+ p) g' d' x" ]" E
    CC filesetup.o
4 M- E' U4 x1 ~8 e6 c  j9 n1 ~    CC eta.o! i( F2 ~% w7 ~( p6 |) ]
    CC verify.o  y9 e& u, b- V  J8 I1 F% B$ i
    CC memory.o/ k6 ]/ R; o4 Q' E( g( G
    CC io_u.o
" D" x+ Y  ^+ Y- S8 z$ o    CC parse.o, j: G8 r2 Y+ [
    CC mutex.o* V, w0 s  m: P) p& R* ~
    CC options.o) l) C' {& e3 J* Y& s+ O* B1 o
    CC lib/rbtree.o" ]0 {/ N4 z3 V9 `* u
    CC smalloc.o; b" B& L7 A4 {6 G
    CC filehash.o  C" c+ F1 Y  d4 a( g8 O6 S1 v
    CC profile.o4 Q8 @0 ]0 K0 i. f5 j  ^0 o5 J
    CC debug.o
& Y* P: P' A! V+ [: a1 l' {1 t    CC lib/rand.o+ h' h* f. Y6 J5 c& x: G
    CC lib/num2str.o
4 M: a$ C  h2 b$ I    CC lib/ieee754.o
4 i# E0 [* d: b9 ~    CC crc/crc16.o
: n7 A! T. t5 _8 L. w' z    CC crc/sha512.o7 j" ]4 x: ~3 V8 ^2 I5 i5 S
    CC crc/crc7.o6 z8 U- z3 h  h& r# l7 W' p
    CC crc/sha1.o6 p8 R6 w4 H3 I. v) T5 C& m2 v
    CC crc/crc32c.o
: S1 @" ]9 s: y2 c    CC crc/crc32.o; u5 G5 C* D5 |
    CC crc/crc32c-intel.o- I3 o' m0 g6 `1 O
    CC crc/xxhash.o
$ S+ u) Q2 O- {- i  n4 f    CC crc/test.o
0 p" l, v  q# k1 }8 A    CC crc/sha256.o0 D! D3 N; U9 ~: Y
    CC crc/md5.o9 a. H$ y  F; w; U
    CC crc/crc64.o5 I; _% Q* L! }$ G( Q& X) k' e
    CC engines/cpu.o4 x, d7 l# Q/ r( r% p3 p
    CC engines/mmap.o
% n/ O  k$ e2 }' P. A3 J    CC engines/sync.o
* I" f/ U  W; M! @8 v# i& t3 _    CC engines/null.o
- d1 z3 y  p- l/ c9 H/ E: Z    CC engines/net.o
0 e! G( d3 C0 [* w+ t    CC memalign.o
4 @  F; I) q% A+ O2 c    CC server.o% s" ~9 ~# i/ C
    CC client.o
3 U, h; C) n: Y  ~% Y4 A    CC iolog.o
" N$ a9 y& `& P. T/ C& A    CC backend.o
" a4 h- r% b" O2 F7 r+ [+ l    CC libfio.o
. l) U6 C1 F4 }' d5 f5 a  |    CC flow.o
- m5 P, U0 P( f" Y) f    CC cconv.o
4 q5 K/ @# a, d- Q* {7 ^    CC lib/prio_tree.o
7 b" m) L; E$ \; B    CC json.o" ~5 i' b; n7 d4 s
    CC lib/zipf.o& ?: T, `% r1 C
    CC lib/axmap.o
& `+ z; e' I6 z    CC lib/lfsr.o9 Q1 q9 g& d6 w2 P1 f+ i
    CC gettime-thread.o
0 ~: |9 L/ y. L- d; U    CC helpers.o9 Q3 c# r% a, [! G
    CC lib/flist_sort.o
8 D4 R3 @9 C* f, L, D. f7 R) ^/ Y    CC lib/hweight.o
( x" M5 `- Z5 v; _    CC lib/getrusage.o1 @# ~6 U; b% w0 B2 Z0 M3 b
    CC idletime.o7 g0 w- ]. L) ?6 B* F5 E) j
    CC td_error.o
7 S' b. g& r7 p# \) |# `: L, |/ a    CC profiles/tiobench.o
$ O, i# I7 O$ M# |- B    CC profiles/act.o
: c6 W0 F3 n) }# Y7 x2 l    CC io_u_queue.o1 d9 j" g9 P. N3 N. X0 ]
    CC filelock.o
+ j' c% R1 H/ L0 ~3 u' y    CC engines/posixaio.o. o# J( e( o. q& R' A/ T
    CC engines/falloc.o( c4 {; i$ i" Y( e; g
    CC engines/e4defrag.o
2 D; X  ~% W6 M- o2 w7 g    CC engines/splice.o
6 H5 `7 q" O! J1 b    CC diskutil.o
/ x% z4 L3 a# Y. ^3 E  M    CC fifo.o. y' @2 Y  i. P; A: s  p1 r+ @
    CC blktrace.o9 L" v! c  h: t" d! z* U
    CC cgroup.o
: I% J" f5 w& L" H    CC trim.o
( L+ m1 O+ S( L7 L    CC engines/sg.o
( O; n- t8 R  U0 |3 r    CC engines/binject.o8 s& G8 x2 q: R. w1 T* B  _
    CC fio.o- l$ k1 \$ X) B6 ^# p; Y9 C, ?. F6 k& D
    LINK fio
% H6 a* I3 y. i; t[root@test1hhd fio-2.1.10]#  make install ! k/ Z& v4 a& z
install -m 755 -d /usr/local/bin
" f: r6 B( M) o8 I6 x4 f9 S- H# pinstall fio tools/fio_generate_plots tools/plot/fio2gnuplot tools/genfio /usr/local/bin
! N5 X7 [+ R7 o! I% t: }, Rinstall -m 755 -d /usr/local/man/man1
$ z, z9 j+ l, N8 W$ \0 iinstall -m 644 fio.1 /usr/local/man/man1
$ W5 V" `. z) p6 `install -m 644 tools/fio_generate_plots.1 /usr/local/man/man1
! C: n" h0 M1 E0 B* Sinstall -m 644 tools/plot/fio2gnuplot.1 /usr/local/man/man1% M1 y3 C% c% T) Z/ g; J
install -m 755 -d /usr/local/share/fio
* W' W8 D6 i, j7 R, hinstall -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
+ s1 D# J! m! w2 W6 S, w! s; q+ t: Wrand_100read_4k: (g=0): rw=randread, bs=4K-4K/4K-4K/4K-4K, ioengine=psync, iodepth=1% Q* T) K6 L! v& w: O9 |# i
...2 [! [- W3 i' I2 p. j) \9 ?; B8 x
fio-2.1.10$ N9 H% W" H; i5 f3 U
Starting 50 threads, {- L5 ^  b# Y, i( k% p, F# r# a
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]] + k) Q# U" e8 ?6 _
rand_100read_4k: (groupid=0, jobs=50): err= 0: pid=19880: Mon Jun 20 13:42:03 2022
' J; F4 b% \0 U& Q% ?, s  read : io=840436KB, bw=4634.1KB/s, iops=1158, runt=181327msec
5 h. F7 U& k/ c  w6 c* ^2 K1 X( d2 c    clat (usec): min=308, max=3703.3K, avg=42907.91, stdev=175774.03
# X3 w' d3 w0 V. o. A6 e( ?     lat (usec): min=308, max=3703.3K, avg=42908.22, stdev=175774.04
  [, x  i1 U1 h% p2 t  N- V4 ^    clat percentiles (usec):
5 W1 b* e8 d+ r5 e) K" ^# e     |  1.00th=[  402],  5.00th=[  450], 10.00th=[  482], 20.00th=[  532],* v  u- f; J1 w2 p
     | 30.00th=[  572], 40.00th=[  612], 50.00th=[  684], 60.00th=[ 1688],$ b; z* ^. }8 Q# \
     | 70.00th=[ 7776], 80.00th=[30848], 90.00th=[93696], 95.00th=[195584],& [. U1 ~1 [0 J9 G" r. a' T
     | 99.00th=[700416], 99.50th=[1335296], 99.90th=[2473984], 99.95th=[2867200],
9 E& M( i" R  g( h- H) T     | 99.99th=[3293184]  X% z5 A, L4 Q
    bw (KB  /s): min=    1, max=  810, per=2.59%, avg=119.98, stdev=103.34
, H) W- o+ H; o' e( u    lat (usec) : 500=13.52%, 750=41.62%, 1000=3.46%/ a! n) t' d+ I) ]* |: Q
    lat (msec) : 2=1.79%, 4=4.13%, 10=6.84%, 20=4.77%, 50=8.64%
% j7 J* n: s) {0 v% `9 @: Q( \    lat (msec) : 100=5.68%, 250=5.93%, 500=2.12%, 750=0.58%, 1000=0.24%
% W( C: r, y) B% v$ U, Q9 ]    lat (msec) : 2000=0.49%, >=2000=0.20%  y# {2 K2 s4 f8 G/ v' X6 ^
  cpu          : usr=0.04%, sys=0.06%, ctx=210142, majf=0, minf=598 g7 G* i* h6 g
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%2 i( R; R! \0 B# w- r1 {) B. @
     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
' B' w0 s8 Y  U& n, K) s( e     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%8 D8 [3 G" k9 H5 E3 t  }
     issued    : total=r=210109/w=0/d=0, short=r=0/w=0/d=0
6 i. C0 x+ ^- s( w3 ^: H     latency   : target=0, window=0, percentile=100.00%, depth=1
8 I/ f8 E" e8 f3 b
& _, B0 q* _+ X# C7 @7 ERun status group 0 (all jobs):( S  ^7 H2 v/ A/ A7 j# J2 Q
   READ: io=840436KB, aggrb=4634KB/s, minb=4634KB/s, maxb=4634KB/s, mint=181327msec, maxt=181327msec6 ]0 M7 s4 m0 i+ q. b  i

$ q" f) D. p. h7 H( K7 j" {Disk stats (read/write):
  y3 z0 n& h; g6 \' ]6 m, i. C( K  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_4k6 p% T6 B1 L8 r6 B
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
. I* c! v1 n4 v6 e
- o; N1 o: f! |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
" B, q) H2 l  i' U3 @: q- q
, @5 [6 g5 P& e# O4 Z) U# Y, }2 `* s& q* [. m5 K
测试场景:
  100%随机,100%读, 4K/ J  [% Y) ~! l3 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%写, 4K, Q4 R( S8 i0 h# R
  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
  X) c! J4 r; {" v  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
3 ]! D* n& F" s! B7 s5 W  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
9 R  F$ E. L* j  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_reporting4 v1 R/ ]) X9 A( J' F5 C) |
fio: engine libaio not loadable7 \& P* Y7 ]) E9 W
fio: failed to load engine libaio/ S1 c3 q) v  K4 ]) v2 \1 _- L
[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
9 X' f/ H: \& [1 o) ^2 W1 l% ^fio: engine libaio not loadable& F: K! @- Y9 `: E; ]+ J( M
fio: failed to load engine libaio
% p: \' o+ B0 f, k1 \5 c[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
" \  P  f1 h* d' ttest: (g=0): rw=read, bs=16K-16K/16K-16K/16K-16K, ioengine=sync, iodepth=1" D, _$ H6 ~+ d8 ?& G
...
% A, k# J. `8 A6 I' {fio-2.1.10
9 Z$ |& M% `3 a" [; ^  a& nStarting 16 threads
  I& E' v+ n2 `test: Laying out IO file(s) (1 file(s) / 512MB)
% u% w% A) U0 ^# H, x% gJobs: 16 (f=32): [RRRRRRRRRRRRRRRR] [100.0% done] [141.7MB/0KB/0KB /s] [9027/0/0 iops] [eta 00m:00s]
- p0 c% x: x+ `  E5 |test: (groupid=0, jobs=16): err= 0: pid=21845: Mon Jun 20 14:19:25 2022
* b( o' c* e0 a/ ?  read : io=8328.9MB, bw=142137KB/s, iops=8883, runt= 60004msec
# Y2 F& N: S7 p  ~& [3 k9 y& l& x    clat (usec): min=215, max=62700, avg=1798.77, stdev=1583.640 P) N9 r6 A# s8 N0 Z
     lat (usec): min=215, max=62700, avg=1798.97, stdev=1583.65+ }/ L1 Y6 v' X! w; X; W( U. t4 r
    clat percentiles (usec):4 h* R2 a- X: i( h. p4 B
     |  1.00th=[  306],  5.00th=[  362], 10.00th=[  458], 20.00th=[  724],
$ t: c( E0 m) M6 Q( L& w: S     | 30.00th=[ 1096], 40.00th=[ 1640], 50.00th=[ 1864], 60.00th=[ 2024],% }5 @3 [  L8 U: R! ~
     | 70.00th=[ 2224], 80.00th=[ 2320], 90.00th=[ 2608], 95.00th=[ 2928],; p. C  @& w+ a' n
     | 99.00th=[ 6944], 99.50th=[10432], 99.90th=[22656], 99.95th=[26240],6 Z: D5 C2 T$ C( j
     | 99.99th=[34560]
( F6 m, _5 i$ n6 x  S. i    bw (KB  /s): min= 2331, max=19523, per=6.25%, avg=8879.79, stdev=3417.38
! h( i+ \. V0 ^/ S    lat (usec) : 250=0.01%, 500=11.32%, 750=9.70%, 1000=7.54%
( j! v, W0 `9 I7 G    lat (msec) : 2=30.34%, 4=39.02%, 10=1.53%, 20=0.39%, 50=0.14%3 M( Z/ o5 Q+ ~5 \+ D
    lat (msec) : 100=0.01%, \( `8 |1 E$ }) \( W6 W: l
  cpu          : usr=0.29%, sys=1.34%, ctx=533068, majf=0, minf=82; l! c; j( `# t/ a9 [( i
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%, M- k5 m6 X. G8 H2 R4 a
     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
* g9 Z  f. ?3 F' x     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%* C  _2 f+ M3 s
     issued    : total=r=533048/w=0/d=0, short=r=0/w=0/d=0. f$ T* ^! q9 J- L% A5 O) z
     latency   : target=0, window=0, percentile=100.00%, depth=1, }+ T$ N1 h" b& ]' w8 ?+ f
) U- M1 a  e6 A, Z" v* ?, v# f
Run status group 0 (all jobs):+ \) `- f( _: Z" t  n' W. k
   READ: io=8328.9MB, aggrb=142136KB/s, minb=142136KB/s, maxb=142136KB/s, mint=60004msec, maxt=60004msec
* s8 o; H2 w- a' x0 h. ^: ~1 t
/ _5 ?: [8 \7 w8 e9 YDisk stats (read/write):
2 s# C/ r+ R( o: ]3 t4 Y5 J  vda: ios=529229/11, merge=784/1, ticks=938227/67, in_queue=936843, util=99.83%( l% n5 `: d; G0 ^5 c( R5 k3 j
  dm-0: ios=265320/10, merge=0/0, ticks=475542/77, in_queue=476458, util=98.64%
0 a2 O5 P* b- z0 `[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$ e3 W% a, A1 W/ @/ d
test: (g=0): rw=read, bs=16K-16K/16K-16K/16K-16K, ioengine=sync, iodepth=1, L- D0 C; b! I. p+ r( @
...
% P; e* q/ L/ i, _; pfio-2.1.106 f% e, c1 l8 J3 y, d# f
Starting 16 threads3 _! `9 k' Y' {& P8 k4 d' c
test: Laying out IO file(s) (1 file(s) / 1024MB)$ [: {) D/ Y+ _; A, @. f+ y* S) `
Jobs: 16 (f=16): [RRRRRRRRRRRRRRRR] [100.0% done] [139.3MB/0KB/0KB /s] [8914/0/0 iops] [eta 00m:00s]. h2 M& _" N" j3 r6 {; s  [( K
test: (groupid=0, jobs=16): err= 0: pid=21868: Mon Jun 20 14:23:39 2022
1 k# U, H# O' @7 D" I3 ^9 ~* k+ J  read : io=8815.7MB, bw=150436KB/s, iops=9402, runt= 60003msec
5 ^& ^1 N( ^* {! F3 c    clat (usec): min=255, max=44491, avg=1695.99, stdev=1232.959 @$ e, s1 r( U# |
     lat (usec): min=255, max=44492, avg=1696.20, stdev=1232.95% M7 d5 h3 K9 N% w! P) _4 M3 }
    clat percentiles (usec):9 L  C$ p; a8 N
     |  1.00th=[  426],  5.00th=[  532], 10.00th=[  636], 20.00th=[  820],! b3 h+ r0 f% s( {/ Z9 A
     | 30.00th=[  948], 40.00th=[ 1176], 50.00th=[ 1688], 60.00th=[ 2192],
% K6 Y( @) m, Q     | 70.00th=[ 2256], 80.00th=[ 2288], 90.00th=[ 2448], 95.00th=[ 2832],  C& B) K0 Z% J4 x8 [& o* X# Z
     | 99.00th=[ 4960], 99.50th=[ 7968], 99.90th=[15808], 99.95th=[21120],
5 e: c, t6 _1 l/ q     | 99.99th=[31360]
) |; {" p# U+ t1 l) W' D    bw (KB  /s): min= 3937, max=24768, per=6.26%, avg=9414.93, stdev=3580.20# {; H% v- Z* M
    lat (usec) : 500=3.42%, 750=12.21%, 1000=17.97%
7 m: }. D5 U' f5 @  t1 }    lat (msec) : 2=21.95%, 4=43.18%, 10=0.98%, 20=0.22%, 50=0.06%* [& l8 I' h# n
  cpu          : usr=0.28%, sys=1.52%, ctx=564232, majf=0, minf=82
* \) J( M5 N; s5 w+ t/ N  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
/ E0 d+ \( F9 V: f. F3 v: ^     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
6 M2 T" x7 z- p& K0 `" W     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
  w4 ?5 q( G: \$ u     issued    : total=r=564164/w=0/d=0, short=r=0/w=0/d=0
( M5 Q% A+ ]7 P5 \4 c     latency   : target=0, window=0, percentile=100.00%, depth=12 T. q. R" Q$ i. g: p

- p: b& E1 D) ^; [" c1 z9 ARun status group 0 (all jobs):; Z: |0 A+ O# h+ _
   READ: io=8815.7MB, aggrb=150436KB/s, minb=150436KB/s, maxb=150436KB/s, mint=60003msec, maxt=60003msec
* V. m5 F1 v$ i5 G+ C& [& d1 n& |- f' `. f* H$ O' b
Disk stats (read/write):8 `  r4 G# c1 `
    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%
+ A9 E! r* e5 |! H2 j  vda: ios=562960/10, merge=899/1, ticks=939104/36, in_queue=938630, util=99.65%
& {4 A. O' M1 v( E( M, j2 q[root@testssd ~]#

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2022-6-30 09:18:07 | 显示全部楼层
测试延迟
  X# D, e2 `; Y" Q* P, u) }& X/ z$ m; D! v
​ 队列深度为1,bs设置为4k,也就是模拟单个队列读写的延迟测试3 T8 r7 R# x+ V" f% p

/ h8 B% x/ |6 v/ z6 D$ T吞吐
5 W/ r* L% W# I/ g( j9 J
# V) ^9 I) g/ E​ 队列深度为32,bs设置为128k,测试最大能力去跑满整个磁盘带宽1 `' o5 r9 I1 {0 \
: }8 `* D( ?+ w  N3 c# A/ C
iops
5 k+ y$ o* W  b9 ~
( v0 `: B0 |$ S- O( i9 P​ 队列深度为32,bs设置为4k,要在最短的时间内多去读磁盘" c$ _8 t2 z9 ?0 X
/ B/ i* }9 L& W
小文件通常测试随机读写,大文件通常测试顺序读写。
! O1 }/ n: `; z; W
$ o' Q2 C% L4 ]& B+ J8 H# C测试顺序读IOPS
! ~1 C- n. V: k- e/ l
9 r( U! [2 b( C" n0 Ofio -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]
( p5 a7 y& v) R  z7 S+ Y/ l9 K- d1 O测试顺序写IOPS
' \2 Y* a+ `" E- f& H( I
1 c% _8 {8 I0 `1 K4 Hfio -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] 5 V/ A- `9 K6 ^+ k1 z! \$ x
测试随机写IOPS
$ K  e: M3 X6 P# `! M" V: [( ?! z6 z9 i
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] 1 K1 M3 d* s! z0 H' D
测试随机读IOPS
% h" t* A: Q( Z; Y9 Y
7 A& F+ H0 \- U$ Bfio -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] ( J3 D1 f1 j& P7 o* z
测试混合读写
% `4 A1 z* K. D$ z/ k
" j1 E; \) }8 ifio -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* A0 h, n5 J* e" c( q" `
测试写吞吐量7 A2 P5 ]3 b/ J# }, a

, J3 U* m& q" @; ^% g+ O/ Gfio -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]
  x, B  u! P' \  f测试读吞吐量
3 q5 v4 M0 P- v# X. \" b$ @0 S
' b: G9 U) [# H' Wfio -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] ; j' r. c( @. T& M  T" p
测试结果输出指标- K: K9 i, z! F: t9 W0 B+ ^1 ]! ]
IOPS:每秒读/写次数,单位为次(计数)。存储设备的底层驱动类型决定了不同的 IOPS。 --> iops
8 ?6 L9 y% \$ e! h吞吐量:每秒的读写数据量,单位为MB/s。 --> bw* J" G1 S6 X, p4 N; e% `+ r
时延:I/O 操作的发送时间到接收确认所经过的时间,单位为秒。 --> lat (msec)
! B! q& `2 n5 e1 w8 I7 yrunt:总运行时间
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-12 03:04 , Processed in 0.034490 second(s), 30 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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