易陆发现互联网技术论坛

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

fio测试IO工具

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

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

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

x
fio测试IO工具
1 S) e, ~, B5 u1 t1 x2 l
下载地址:

9 _6 i- X9 P: ?6 p1 _$ n
9 }7 B" y0 O2 }. m# M

7 P& @! V0 q' M5 f4 L* B$ o5 [
; R7 L3 o, }. ]& m4 }
- L$ f7 v' ]+ b  o, [( m. E0 @
! o- D; q3 v8 ^. n. s8 H' _
fio-2.1.10.tar.gz

, _  d4 V/ \- j, T$ p) ]

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
  n. A2 E; Y0 a; v4 Jfio-2.1.10/8 l$ ?1 S5 S2 F% ?* S4 a
6 `$ y' F8 N7 B: K% t3 U
安装gcc gcc-c++  make
* r: M% K2 b& T& X: Z5 t# yum install -y gcc gcc-c++ make , ^' |- F, g. Q
 楼主| 发表于 2022-6-20 13:42:09 | 显示全部楼层
[root@test1hhd fio-2.1.10]# ./configure
* S; M; Q) |! v7 T3 X/ b6 SOperating system              Linux
$ l! U8 T. |3 b9 U+ `) O% E1 YCPU                           x86_64
5 I3 T3 r! Q6 p& s. {; sBig endian                    no2 |8 S! `+ o  }; H% Z8 C
Compiler                      gcc
" t+ ?" @7 v% V# S& F, A/ ?Cross compile                 no9 o5 b7 t# l' p8 W# v) f
, Y7 [, m# Q8 f6 O6 U
Wordsize                      647 H5 g& _9 r6 [
zlib                          no
; V% Z5 Y) h; u0 x, @& i$ [Linux AIO support             no
2 K, T* g/ {) X( s' UPOSIX AIO support             yes
) B/ i& {, f, |* N: d/ MPOSIX AIO support needs -lrt  yes6 M7 h2 S2 J  w* C  s1 b5 A& M6 D
POSIX AIO fsync               yes& ?: C7 f, F3 E4 M' S5 R
Solaris AIO support           no
5 p4 \2 i2 c: }# {, p2 M' P__sync_fetch_and_add          yes/ W) ^, j/ r6 m' {& L( V4 J- M
libverbs                      no
7 y/ o! L* A5 V  K+ W6 vrdmacm                        no
3 m3 u. w4 u# |, v& l! MLinux fallocate               yes4 P9 W+ a1 o0 U
POSIX fadvise                 yes! I7 g( I/ J+ s5 ?- U9 h: r4 V) t
POSIX fallocate               yes
- \8 Q  E+ Q: ]) Xsched_setaffinity(3 arg)      yes/ G/ H* k; [4 S/ a9 u9 b9 U; e
sched_setaffinity(2 arg)      no# }/ _8 h( x0 k7 H  r
clock_gettime                 yes0 U* L, P' ]" G' B, N: ~: g6 a: Q
CLOCK_MONOTONIC               yes
5 `( g7 q1 N: W4 J8 v  S0 ?CLOCK_MONOTONIC_PRECISE       no
9 ^3 V# o; ]1 u3 k2 H5 f+ q) vgettimeofday                  yes) C# d: i( @3 x3 |5 z: `
fdatasync                     yes
' z" \' ?; x! }( u5 a4 Rsync_file_range               yes/ w" h1 G+ i; }. _
EXT4 move extent              yes9 I3 N$ y; `1 B3 J# y
Linux splice(2)               yes6 f& b. F- J  ?. H. \
GUASI                         no. t$ u  n0 j& T, u& |; V
Fusion-io atomic engine       no
/ ]/ h: X8 J5 W5 X, m: Ilibnuma                       no
. Z$ z8 q% ?. Cstrsep                        yes$ k9 _% t6 [. z
strcasestr                    yes
( h, T0 k+ {% bgetopt_long_only()            yes9 ]8 x7 \  J7 e% Q* w' |. `7 f
inet_aton                     yes
: I2 k) J+ `+ \: y3 u5 isocklen_t                     yes9 T! q% {0 K% @- `4 X
__thread                      yes
$ j) S  C& z) n! igtk 2.18 or higher            no% c, d* m% q0 l6 y0 B/ X, Z( L
RUSAGE_THREAD                 yes
  L+ N+ W" e' h6 _4 [% E* |+ ?SCHED_IDLE                    yes
0 ~) W1 K, P) yTCP_NODELAY                   yes, m# z0 r' x; s9 v* |7 X1 k/ n
RLIMIT_MEMLOCK                yes
, ?+ F) c) U% p( `9 _pwritev/preadv                yes. H. c# I5 z( T& `  G) ?% c, F
IPv6 helpers                  yes7 }: x6 u, s4 a8 [: |
Rados Block Device engine     no  L& {# z5 o2 v5 v) G+ {
setvbuf                       yes+ k' j$ Y7 H5 p+ S, E
Gluster API engine            no
1 Q+ d2 k% s: R7 o- g! Q6 ^Gluster API use fadvise       no
: u7 `% Q7 [- c* l7 J( as390_z196_facilities          no
 楼主| 发表于 2022-6-20 13:46:01 | 显示全部楼层
[root@test1hhd fio-2.1.10]# make
  T/ h  g/ C7 ~FIO_VERSION = fio-2.1.10
1 ~* S1 A! s6 ^  ]9 v    CC gettime.o
1 p/ S6 [4 O# N  ^* M3 h9 m    CC ioengines.o# H" V7 D% _" z1 V! y4 b
    CC init.o
0 z) A3 O( V8 B* J    CC stat.o
6 _. }, p: ~6 t; a) y1 }# ]    CC log.o( O( r/ D5 u' l, H! R0 E! S# l
    CC time.o
$ }- a/ ]" u3 ~/ C1 m    CC filesetup.o- J, ]; }; L. F
    CC eta.o  }6 {1 r" M4 U
    CC verify.o
8 q! }- s' j! l    CC memory.o
% {! \4 v+ y, B' }    CC io_u.o
9 x1 @1 N& G$ t) a3 ?/ K& |    CC parse.o
1 b  U7 c: w) @: ?! j5 R    CC mutex.o! H* X) p# [+ g9 B4 K
    CC options.o
# D5 q6 y* W3 ^  Q, g    CC lib/rbtree.o+ I* Y; z' G# s: E+ x3 R2 L
    CC smalloc.o
3 Z/ G* J8 B/ ^$ s- ?! l" S) w    CC filehash.o1 [! G9 H3 r1 ?: e/ O4 l
    CC profile.o1 \: P9 q+ i# |" M9 n
    CC debug.o
$ U- U; D2 }  c$ W3 S1 n" C    CC lib/rand.o
0 M! @' k( G7 S) g( {1 I    CC lib/num2str.o
/ b% r& V) C8 T0 F    CC lib/ieee754.o
, |; V. K5 o% y. R: \8 o! _    CC crc/crc16.o; p/ Q0 g: n; i+ X& Q8 n) {5 q$ @' h0 d
    CC crc/sha512.o9 l' f  z5 x% v0 K  D( x8 |8 T- }
    CC crc/crc7.o; O5 M0 L# B/ V( x* }5 y: f
    CC crc/sha1.o
+ D+ c2 E) G% y0 y: M  V    CC crc/crc32c.o
; C7 x! _% Y8 ?( f    CC crc/crc32.o
1 O' ~) y, N7 r& f9 Y    CC crc/crc32c-intel.o) Y# ]$ P* ]4 m( w) l
    CC crc/xxhash.o
- J8 v0 X' U- y- b$ H0 w0 ^1 o    CC crc/test.o
+ _/ E* U* h- t: R    CC crc/sha256.o0 m, @, W  J/ m7 X2 z2 a- Z
    CC crc/md5.o& e8 y2 d+ Y: B4 b0 V6 M% B
    CC crc/crc64.o$ n4 {9 l# L% ~
    CC engines/cpu.o5 J1 X" i. z1 w) d3 e% V) w" m1 K7 S$ l
    CC engines/mmap.o8 c$ U) M. w, Z8 ~
    CC engines/sync.o
* U1 ?" I/ N  p    CC engines/null.o  A  |1 i0 n" e" z- d# n5 `/ D( b
    CC engines/net.o
9 R' W# j  X# V- p- K    CC memalign.o" e( H1 l8 W* P7 X
    CC server.o
$ d9 H; ~! Y! Y0 l( r    CC client.o& p& p5 J. ~- j( x: r
    CC iolog.o. Y$ o/ E* D, {( N: F
    CC backend.o8 a% u2 M3 Y1 k) j: A- C! h
    CC libfio.o3 ~, p  I& B/ i6 [" N5 h. C, S; c
    CC flow.o- P2 l% e$ ^  P4 c$ E: C0 s+ {( x4 |
    CC cconv.o" o  k1 [2 ?+ u+ T' {- x
    CC lib/prio_tree.o* ], w0 t5 f. l: K7 j6 A  }
    CC json.o
: Y! [% r& q/ e2 p    CC lib/zipf.o
* T- A! ]: `5 z& g& x    CC lib/axmap.o
# p2 K5 M9 f# @$ L3 p9 J# V    CC lib/lfsr.o3 g3 W7 o7 [& V; Y% \
    CC gettime-thread.o
3 p2 b1 C  ?% X: C/ o& R! \$ X: i& [    CC helpers.o
" G7 N/ X, T/ ]* L    CC lib/flist_sort.o3 R/ @+ [( X" q
    CC lib/hweight.o! h; F( c5 a) B2 Y
    CC lib/getrusage.o/ F, U! @9 x* r% @- i- i& Q
    CC idletime.o
3 @1 a! [2 I3 a5 o* r" C* z    CC td_error.o
/ _- S* n+ j3 V: s    CC profiles/tiobench.o+ {3 s* n# Z* y; ~5 V% t# A
    CC profiles/act.o5 w2 I+ Z% n3 K! Y* N
    CC io_u_queue.o/ `  \4 f/ x2 c) q/ Z" B
    CC filelock.o# N2 u) C: ~* x8 x6 l
    CC engines/posixaio.o
! u0 V: T' ]9 Q# Y: E    CC engines/falloc.o
( j: G& p! U! C5 L+ s9 O    CC engines/e4defrag.o
7 y$ w; f5 [6 F- j3 ^6 ]    CC engines/splice.o' r4 s) z+ Z+ m& _
    CC diskutil.o
. }+ _1 H- B' X1 b# _    CC fifo.o% X3 D$ ?8 v7 P. H. m9 a# f' Z
    CC blktrace.o2 G/ K* }0 ]( n
    CC cgroup.o+ p& V, N! _7 O% W1 ?
    CC trim.o
5 g8 C2 H, N# ?    CC engines/sg.o
, Y! W" z0 o  f5 [    CC engines/binject.o
/ y/ w6 [2 K; i0 y" }/ h1 {    CC fio.o
; x' m$ s' D7 U1 V# i    LINK fio. U: ?8 I8 w7 d, j6 D7 H
[root@test1hhd fio-2.1.10]#  make install ( W8 m* Z# B" t* W) J! w1 H4 r0 }
install -m 755 -d /usr/local/bin5 r2 b# [% I' l. i6 K) x
install fio tools/fio_generate_plots tools/plot/fio2gnuplot tools/genfio /usr/local/bin
' a# ~* D/ c3 p4 A9 X, z, iinstall -m 755 -d /usr/local/man/man13 F0 N$ h& m$ Y
install -m 644 fio.1 /usr/local/man/man1
( e" a; ~1 R4 X( \1 p1 u" Yinstall -m 644 tools/fio_generate_plots.1 /usr/local/man/man16 D5 y8 z0 G7 K
install -m 644 tools/plot/fio2gnuplot.1 /usr/local/man/man1/ G* a5 C( u$ N# V8 f
install -m 755 -d /usr/local/share/fio
8 z3 r* D6 j0 p- Vinstall -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
' K2 t$ |( z* J1 ~4 T/ _7 g; qrand_100read_4k: (g=0): rw=randread, bs=4K-4K/4K-4K/4K-4K, ioengine=psync, iodepth=18 S- Z7 b  w: _1 r2 m& i+ H" F
...
0 I3 {' b. b: ffio-2.1.10
& `$ Y# ~; B0 Y4 _Starting 50 threads1 H9 R( k" y) _  j+ h( B# i
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]]
7 o% ]2 _6 u" Erand_100read_4k: (groupid=0, jobs=50): err= 0: pid=19880: Mon Jun 20 13:42:03 2022
  q4 g0 B4 F5 c( g  read : io=840436KB, bw=4634.1KB/s, iops=1158, runt=181327msec
- J/ W8 c  n$ V7 j    clat (usec): min=308, max=3703.3K, avg=42907.91, stdev=175774.03
0 }8 X+ a2 o5 O  ?: i     lat (usec): min=308, max=3703.3K, avg=42908.22, stdev=175774.04; M8 ]6 S& X7 d7 E# Y+ I
    clat percentiles (usec):! R9 e+ w5 Z4 B1 V7 H. q3 @
     |  1.00th=[  402],  5.00th=[  450], 10.00th=[  482], 20.00th=[  532],* i/ c2 ~3 z3 b" }9 k
     | 30.00th=[  572], 40.00th=[  612], 50.00th=[  684], 60.00th=[ 1688],8 `$ w5 t8 m; i
     | 70.00th=[ 7776], 80.00th=[30848], 90.00th=[93696], 95.00th=[195584]," @, G+ c) @( @1 H
     | 99.00th=[700416], 99.50th=[1335296], 99.90th=[2473984], 99.95th=[2867200],
; m( g' p5 _. u" E     | 99.99th=[3293184]
3 ~, h9 g3 Z4 ^    bw (KB  /s): min=    1, max=  810, per=2.59%, avg=119.98, stdev=103.34
0 D1 H5 C* R6 U4 C9 v    lat (usec) : 500=13.52%, 750=41.62%, 1000=3.46%( R$ {. R( b  L5 l* \3 s0 ?$ k
    lat (msec) : 2=1.79%, 4=4.13%, 10=6.84%, 20=4.77%, 50=8.64%
. v6 K5 S$ _/ z1 C) _) R, Y    lat (msec) : 100=5.68%, 250=5.93%, 500=2.12%, 750=0.58%, 1000=0.24%: h3 j0 t8 d. u5 W/ O
    lat (msec) : 2000=0.49%, >=2000=0.20%4 g, D4 `' ?0 r8 u/ n. }2 T& e) c) Q
  cpu          : usr=0.04%, sys=0.06%, ctx=210142, majf=0, minf=59
  b6 t- X$ F' r: |) ~% }  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
2 ~! N& V' r- a6 k+ z/ i     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
2 n7 |3 u  |* H4 d3 L6 |( `6 G     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%, ]0 q9 z  G% `1 L! Z
     issued    : total=r=210109/w=0/d=0, short=r=0/w=0/d=0
1 H0 n- a1 @* u! b, z     latency   : target=0, window=0, percentile=100.00%, depth=1
& H8 [4 z" N: [* s$ G7 V
; C4 ?/ @, T& B- t! w2 BRun status group 0 (all jobs):
3 E' Y. c( X2 ]& L) O# k' I   READ: io=840436KB, aggrb=4634KB/s, minb=4634KB/s, maxb=4634KB/s, mint=181327msec, maxt=181327msec
" t7 U  @  B# I4 x  Q( S  B
" e' J9 w* y4 i) fDisk stats (read/write):
7 Y. u# Q8 q& Q  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* x3 L" d2 Q% Y6 `2 H) D6 f
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
" B$ _9 Z4 _5 U* F2 M4 w- f
) D6 F* p5 l- 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_4k1 }6 m" z) [; S1 Q# }

9 b5 e6 D" N, {9 ^- s) u5 O% }6 E! p' C1 U
测试场景:
  100%随机,100%读, 4K
& J& T. f. h' a, K; f% t  P  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
0 B) |; o5 M' s9 |" N4 n. 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
) H. x- K( E( ^' 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%写 ,4K7 ?/ N1 }+ L; 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
( \# W# G" M$ A1 t7 k% a; l8 G! |5 |  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
% r5 `3 s5 T+ }: r3 e/ m5 Z9 q4 Zfio: engine libaio not loadable
/ h. e1 w- Y! }+ Q1 a0 Bfio: failed to load engine libaio5 Z! B0 b9 W$ D7 E6 t5 l" b2 g
[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
+ f! L+ C4 [6 cfio: engine libaio not loadable. Q$ B7 e$ t0 C3 P$ ]
fio: failed to load engine libaio/ L1 q8 m" p( s/ D# Y, Q( O" r$ Y" G
[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
% a) O, W. z' l. @7 }* s- E5 otest: (g=0): rw=read, bs=16K-16K/16K-16K/16K-16K, ioengine=sync, iodepth=1
' G: b  Z4 S1 z...
% X- E1 F% s1 A, mfio-2.1.10# L0 n/ M9 h' L: l. q! Q+ K
Starting 16 threads9 S' p: k. X- B+ u' b
test: Laying out IO file(s) (1 file(s) / 512MB)
4 C* l% h& q2 T! n6 F$ V  tJobs: 16 (f=32): [RRRRRRRRRRRRRRRR] [100.0% done] [141.7MB/0KB/0KB /s] [9027/0/0 iops] [eta 00m:00s]  w, ^% }: e$ o, n& L5 k+ q
test: (groupid=0, jobs=16): err= 0: pid=21845: Mon Jun 20 14:19:25 2022
0 Q# B  y1 f2 B5 q1 D; d  read : io=8328.9MB, bw=142137KB/s, iops=8883, runt= 60004msec$ s- r' {  o. T& a  K" V% ]
    clat (usec): min=215, max=62700, avg=1798.77, stdev=1583.64( k- g* q4 i2 [: A# B! A% j
     lat (usec): min=215, max=62700, avg=1798.97, stdev=1583.65
- N( [  N8 ]$ C- B    clat percentiles (usec):3 {7 ]  z; i/ F" r  O3 X1 b
     |  1.00th=[  306],  5.00th=[  362], 10.00th=[  458], 20.00th=[  724],
( E/ g  H. c4 j+ ?, V     | 30.00th=[ 1096], 40.00th=[ 1640], 50.00th=[ 1864], 60.00th=[ 2024],
) P+ E0 y5 @$ F4 S     | 70.00th=[ 2224], 80.00th=[ 2320], 90.00th=[ 2608], 95.00th=[ 2928],$ g% z  a: {( \2 r& R7 b
     | 99.00th=[ 6944], 99.50th=[10432], 99.90th=[22656], 99.95th=[26240],  |0 Z) i0 D  J0 {
     | 99.99th=[34560]! ?4 f; l. v& M7 q2 ^  X8 b9 a
    bw (KB  /s): min= 2331, max=19523, per=6.25%, avg=8879.79, stdev=3417.38
' ]  _) ?6 [4 O% _    lat (usec) : 250=0.01%, 500=11.32%, 750=9.70%, 1000=7.54%$ C% ~( K( d4 D1 Q3 X' K& e" S$ D
    lat (msec) : 2=30.34%, 4=39.02%, 10=1.53%, 20=0.39%, 50=0.14%/ `& l9 E' w3 w) Q7 q% P
    lat (msec) : 100=0.01%1 d; i+ b( X1 E3 l& P$ x
  cpu          : usr=0.29%, sys=1.34%, ctx=533068, majf=0, minf=820 y4 t9 q- U; Y
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%" x; T4 A6 u. k2 f
     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
. l9 P9 D" e1 d. @! B  l     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
, O  j# E* K7 q# d" ~! d7 a     issued    : total=r=533048/w=0/d=0, short=r=0/w=0/d=0. s& q/ ?) U- C3 R* k$ J
     latency   : target=0, window=0, percentile=100.00%, depth=1
# H+ C( \/ i7 W# J+ z3 s
2 a. F: B9 X: y; VRun status group 0 (all jobs):
1 l, p, M2 K9 j2 Z0 H3 p   READ: io=8328.9MB, aggrb=142136KB/s, minb=142136KB/s, maxb=142136KB/s, mint=60004msec, maxt=60004msec
! C$ X; b- G- ]8 S) \) s
( c& A$ p$ T& w2 v$ A7 ADisk stats (read/write):$ b3 ~+ e: r* p+ j% g2 t3 S7 `4 }
  vda: ios=529229/11, merge=784/1, ticks=938227/67, in_queue=936843, util=99.83%1 i3 Q0 @0 z) T3 W4 `( ^& t1 A
  dm-0: ios=265320/10, merge=0/0, ticks=475542/77, in_queue=476458, util=98.64%
6 ]& @' b8 ?& z$ Z* |% _+ l: \# [[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
6 ^, B& i4 k/ v4 {3 g+ g. m: ~5 Xtest: (g=0): rw=read, bs=16K-16K/16K-16K/16K-16K, ioengine=sync, iodepth=16 }! T5 T' r& x2 t0 Q" \1 K5 e
...4 t" b- h! l3 C
fio-2.1.10
% l- ~/ b# @* o# H$ Q( z6 QStarting 16 threads- z' @& \; I9 F3 r5 [; O' h
test: Laying out IO file(s) (1 file(s) / 1024MB)# w, L  k+ y1 j; d0 Q) ?8 w8 B
Jobs: 16 (f=16): [RRRRRRRRRRRRRRRR] [100.0% done] [139.3MB/0KB/0KB /s] [8914/0/0 iops] [eta 00m:00s]$ R5 A, ~0 ^  t% N; G- Q" l9 h
test: (groupid=0, jobs=16): err= 0: pid=21868: Mon Jun 20 14:23:39 2022, e5 R0 H8 V9 N+ D
  read : io=8815.7MB, bw=150436KB/s, iops=9402, runt= 60003msec
. `' {8 |/ E: v( ?7 P7 R    clat (usec): min=255, max=44491, avg=1695.99, stdev=1232.95% e% z7 D$ T  k4 H' W
     lat (usec): min=255, max=44492, avg=1696.20, stdev=1232.95- a" |% }8 H# r- y8 n4 O7 U
    clat percentiles (usec):4 V2 g) C  L6 O) v' B5 S* Z
     |  1.00th=[  426],  5.00th=[  532], 10.00th=[  636], 20.00th=[  820],
7 D1 Z* V% m9 o9 j% s; ]+ Q     | 30.00th=[  948], 40.00th=[ 1176], 50.00th=[ 1688], 60.00th=[ 2192],
& W7 f2 M* n8 C5 R- G     | 70.00th=[ 2256], 80.00th=[ 2288], 90.00th=[ 2448], 95.00th=[ 2832],
1 k" B: p- H' h2 s     | 99.00th=[ 4960], 99.50th=[ 7968], 99.90th=[15808], 99.95th=[21120],
& ?. k( i* A+ ]; _% B* S& O     | 99.99th=[31360]
) k$ x" a2 B2 m! A# o& X; c    bw (KB  /s): min= 3937, max=24768, per=6.26%, avg=9414.93, stdev=3580.20
* _! l8 Z, C: |3 ^    lat (usec) : 500=3.42%, 750=12.21%, 1000=17.97%/ m. L, o& {+ Q6 `  S- H
    lat (msec) : 2=21.95%, 4=43.18%, 10=0.98%, 20=0.22%, 50=0.06%
& U6 B6 C0 f" G) l+ o  p3 D4 A0 H  cpu          : usr=0.28%, sys=1.52%, ctx=564232, majf=0, minf=82' ?% s3 n" b8 k/ O+ f
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%7 _5 j! b* l) \9 [
     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
; P1 a0 y9 M* X. C     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%3 l  X2 a' @$ V( \
     issued    : total=r=564164/w=0/d=0, short=r=0/w=0/d=02 A1 O7 d4 w  H  n0 D/ R4 n2 {
     latency   : target=0, window=0, percentile=100.00%, depth=1
' O) P# k8 `3 Y) m+ b
2 S- {6 \' j$ h7 _9 {/ p8 j; [Run status group 0 (all jobs):) O2 \- y) E, }5 C8 p2 K4 u  T: B
   READ: io=8815.7MB, aggrb=150436KB/s, minb=150436KB/s, maxb=150436KB/s, mint=60003msec, maxt=60003msec
. g$ Z, C4 r0 l! G3 s8 P
- m% \7 N$ I* X. qDisk stats (read/write):1 `. O2 Z' W$ T1 `4 n
    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%
1 U! e& m) i/ Y& q) @6 o5 ?  vda: ios=562960/10, merge=899/1, ticks=939104/36, in_queue=938630, util=99.65%/ W8 v/ N7 H% \, u/ E& j4 U
[root@testssd ~]#
 楼主| 发表于 2022-6-30 09:18:07 | 显示全部楼层
测试延迟" H: N, I) Q) f) D! q  ?- C& p

3 o- h2 P3 V2 h  ?' K! ]" Z​ 队列深度为1,bs设置为4k,也就是模拟单个队列读写的延迟测试
; u( s# @, _" w0 j' r5 W% T" ~# y2 C# {
吞吐! e4 [8 w# q  b  V) `

6 d7 y. C2 b. q  F​ 队列深度为32,bs设置为128k,测试最大能力去跑满整个磁盘带宽
1 L! w$ V. ]+ `: D- n9 L9 n* o3 U, ?: V- T4 Z- f6 s; G
iops4 ^% O6 Q: {, k! ~$ d, o

3 E3 u* c* A. J' B9 o. J% Z​ 队列深度为32,bs设置为4k,要在最短的时间内多去读磁盘
; e: z7 c" |) I- r0 A: j: m% X6 e* g1 _( b5 _4 A* A; X
小文件通常测试随机读写,大文件通常测试顺序读写。. p! R  W% R% n+ G% e; j7 }+ h  P
& @( Q* i$ ]9 J  G8 A6 W
测试顺序读IOPS% c* N4 b- v9 o! _. f8 \
% K3 {7 \& u6 d
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]
- J! ]& Q0 K6 y. |6 p0 H测试顺序写IOPS
  {9 E4 O7 s$ c- _" `
9 n" E9 S8 I9 A" J0 Y# T' J+ |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] & q1 t9 T" h( A# b5 l
测试随机写IOPS
( S% x( a5 P8 B  U( h3 H% u
) G$ L5 z2 B- A" mfio -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] ' i# q7 q! H( \/ ?; A" f6 n
测试随机读IOPS
, \: r! D3 c( s6 X/ W& R6 \! W5 c" j5 r; X
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] 8 r1 l+ J6 X/ r; _* p: @
测试混合读写
/ K8 u0 w7 f- M4 R6 s7 r
. x' d1 [& K' mfio -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=noop4 Y, ]" n! o# a
测试写吞吐量
6 {' N# U! H! s( b5 q$ {& r+ R
# O" _/ v( e  ]0 t8 Yfio -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]
: D, v% q8 B5 O0 ]4 W/ o测试读吞吐量0 I/ G$ Z6 W& _/ y9 l- p
' P/ a! K2 K0 l: J
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] " c/ I  D, G( B7 O  L" m& e6 {
测试结果输出指标
. o; v0 `* x- k  m% w9 ~IOPS:每秒读/写次数,单位为次(计数)。存储设备的底层驱动类型决定了不同的 IOPS。 --> iops' N- L& u0 m; r; \, P, A
吞吐量:每秒的读写数据量,单位为MB/s。 --> bw8 o& K, M- G8 U$ J
时延:I/O 操作的发送时间到接收确认所经过的时间,单位为秒。 --> lat (msec)- s; m8 s6 h( {; M5 T& R
runt:总运行时间
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

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

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

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

GMT+8, 2026-4-9 01:10 , Processed in 0.054853 second(s), 26 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

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