fio 工具探究 1

基本語法

./fio -filename=/mnt/sdcard/fiofile -direct=1 -rw=read -bs=8k -siz
e=1G -numjobs=8 -runtime=10  -group_reporting -name=fio_test

--help

/mnt/sdcard # ./fio --help
fio-2.20
./fio [options] [job options] <job file(s)>
  --debug=options   Enable debug logging. May be one/more of:
            process,file,io,mem,blktrace,verify,random,parse,
            diskutil,job,mutex,profile,time,net,rate,compress,
            steadystate,helperthread
  --parse-only      Parse options only, don't start any IO
  --output      Write output to file
  --bandwidth-log   Generate aggregate bandwidth logs
  --minimal     Minimal (terse) output
  --output-format=type  Output format (terse,json,json+,normal)
  --terse-version=type  Set terse version output format (default 3, or 2 or 4)
  --version     Print version info and exit
  --help        Print this page
  --cpuclock-test   Perform test/validation of CPU clock
  --crctest=type    Test speed of checksum functions
  --cmdhelp=cmd     Print command help, "all" for all of them
  --enghelp=engine  Print ioengine help, or list available ioengines
  --enghelp=engine,cmd  Print help for an ioengine cmd
  --showcmd     Turn a job file into command line options
  --eta=when        When ETA estimate should be printed
                    May be "always", "never" or "auto"
  --eta-newline=time    Force a new line for every 'time' period passed
  --status-interval=t   Force full status dump every 't' period passed
  --readonly        Turn on safety read-only checks, preventing writes
  --section=name    Only run specified section in job file, multiple sections can be specified
  --alloc-size=kb   Set smalloc pool to this size in kb (def 16384)
  --warnings-fatal  Fio parser warnings are fatal
  --max-jobs=nr     Maximum number of threads/processes to support
  --server=args     Start a backend fio server
  --daemonize=pidfile   Background fio server, write pid to file
  --client=hostname Talk to remote backend(s) fio server at hostname
  --remote-config=file  Tell fio server to load this local job file
  --idle-prof=option    Report cpu idleness on a system or percpu basis
            (option=system,percpu) or run unit work
            calibration only (option=calibrate)
  --inflate-log=log Inflate and output compressed log
  --trigger-file=file   Execute trigger cmd when file exists
  --trigger-timeout=t   Execute trigger af this time
  --trigger=cmd     Set this command as local trigger
  --trigger-remote=cmd  Set this command as remote trigger
  --aux-path=path   Use this path for fio state generated files

Fio was written by Jens Axboe <jens.axboe@oracle.com>
                   Jens Axboe <jaxboe@fusionio.com>
                   Jens Axboe <axboe@fb.com>

基本每太看懂 不過按照語法還是可以用的
基本語法中蛙粘,-rw=read/write/randread/randwrite 可以簡單測試讀寫性能俯渤。

結(jié)果

/mnt/sdcard # ./fio -filename=/mnt/sdcard/fiofile -direct=1 -rw=read -bs=8k -siz
e=1G -numjobs=8 -runtime=10  -group_reporting -name=fio_test
fio_test: (g=0): rw=read, bs=(R) 8192B-8192B, (W) 8192B-8192B, (T) 8192B-8192B, ioengine=psync, iodepth=1
...
fio-2.20
Starting 8 processes
Jobs: 8 (f=8): [R(8)][100.0%][r=14.8MiB/s,w=0KiB/s][r=1899,w=0 IOPS][eta 00m:00s]
fio_test: (groupid=0, jobs=8): err= 0: pid=4542: Wed Aug 12 17:53:16 2020
   read: IOPS=2177, BW=17.0MiB/s (17.8MB/s)(170MiB/10005msec)
    clat (usec): min=614, max=1000.1k, avg=3640.26, stdev=36487.91
     lat (usec): min=620, max=1000.1k, avg=3643.89, stdev=36488.06
    clat percentiles (usec):
     |  1.00th=[ 1032],  5.00th=[ 1080], 10.00th=[ 1096], 20.00th=[ 1144],
     | 30.00th=[ 1176], 40.00th=[ 1208], 50.00th=[ 1272], 60.00th=[ 1352],
     | 70.00th=[ 1432], 80.00th=[ 1512], 90.00th=[ 1592], 95.00th=[ 1656],
     | 99.00th=[ 9792], 99.50th=[74240], 99.90th=[659456], 99.95th=[897024],
     | 99.99th=[995328]
   bw (  KiB/s): min=   16, max= 6435, per=0.01%, avg=2483.22, stdev=2170.08
    lat (usec) : 750=0.01%, 1000=0.33%
    lat (msec) : 2=97.77%, 4=0.71%, 10=0.20%, 20=0.36%, 50=0.09%
    lat (msec) : 100=0.10%, 250=0.08%, 500=0.16%, 750=0.12%, 1000=0.06%
    lat (msec) : 2000=0.01%
  cpu          : usr=1.43%, sys=3.70%, ctx=21914, majf=0, minf=151
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     issued rwt: total=21785,0,0, short=0,0,0, dropped=0,0,0
     latency   : target=0, window=0, percentile=100.00%, depth=1

Run status group 0 (all jobs):
   READ: bw=17.0MiB/s (17.8MB/s), 17.0MiB/s-17.0MiB/s (17.8MB/s-17.8MB/s), io=170MiB (178MB), run=10005-10005msec

Disk stats (read/write):
  mmcblk1: ios=21118/5, merge=0/1, ticks=57616/3072, in_queue=61611, util=98.98%

一個簡單的-rw=read的測試結(jié)果更耻。

/mnt/sdcard # ./fio -filename=/mnt/sdcard/fiofile -direct=1 -rw=write -bs=8k -si
ze=1G -numjobs=8 -runtime=10  -group_reporting -name=fio_test
fio_test: (g=0): rw=write, bs=(R) 8192B-8192B, (W) 8192B-8192B, (T) 8192B-8192B, ioengine=psync, iodepth=1
...
fio-2.20
Starting 8 processes
Jobs: 8 (f=8): [W(8)][100.0%][r=0KiB/s,w=4472KiB/s][r=0,w=559 IOPS][eta 00m:00s]
fio_test: (groupid=0, jobs=8): err= 0: pid=4678: Wed Aug 12 18:01:38 2020
  write: IOPS=535, BW=4283KiB/s (4386kB/s)(41.9MiB/10016msec)
    clat (msec): min=1, max=371, avg=14.89, stdev=61.66
     lat (msec): min=1, max=371, avg=14.89, stdev=61.66
    clat percentiles (usec):
     |  1.00th=[ 1160],  5.00th=[ 1192], 10.00th=[ 1224], 20.00th=[ 1256],
     | 30.00th=[ 1320], 40.00th=[ 1448], 50.00th=[ 1784], 60.00th=[ 1848],
     | 70.00th=[ 1880], 80.00th=[ 1960], 90.00th=[ 2096], 95.00th=[14912],
     | 99.00th=[329728], 99.50th=[337920], 99.90th=[350208], 99.95th=[362496],
     | 99.99th=[370688]
   bw (  KiB/s): min=  304, max=  919, per=0.01%, avg=538.71, stdev=162.41
    lat (msec) : 2=83.61%, 4=10.16%, 10=0.65%, 20=1.01%, 50=0.19%
    lat (msec) : 100=0.06%, 250=0.19%, 500=4.14%
  cpu          : usr=0.38%, sys=1.71%, ctx=10964, majf=0, minf=155
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     issued rwt: total=0,5362,0, short=0,0,0, dropped=0,0,0
     latency   : target=0, window=0, percentile=100.00%, depth=1

Run status group 0 (all jobs):
  WRITE: bw=4283KiB/s (4386kB/s), 4283KiB/s-4283KiB/s (4386kB/s-4386kB/s), io=41.9MiB (43.9MB), run=10016-10016msec

Disk stats (read/write):
  mmcblk1: ios=0/5264, merge=0/1, ticks=0/8771, in_queue=8744, util=88.05%

個簡單的-rw=write的測試結(jié)果赐劣。

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個濱河市趟薄,隨后出現(xiàn)的幾起案子酗电,更是在濱河造成了極大的恐慌魄藕,老刑警劉巖,帶你破解...
    沈念sama閱讀 222,627評論 6 517
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件撵术,死亡現(xiàn)場離奇詭異背率,居然都是意外死亡,警方通過查閱死者的電腦和手機嫩与,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 95,180評論 3 399
  • 文/潘曉璐 我一進店門寝姿,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人蕴纳,你說我怎么就攤上這事会油「隽唬” “怎么了古毛?”我有些...
    開封第一講書人閱讀 169,346評論 0 362
  • 文/不壞的土叔 我叫張陵,是天一觀的道長都许。 經(jīng)常有香客問我稻薇,道長,這世上最難降的妖魔是什么胶征? 我笑而不...
    開封第一講書人閱讀 60,097評論 1 300
  • 正文 為了忘掉前任塞椎,我火速辦了婚禮,結(jié)果婚禮上睛低,老公的妹妹穿的比我還像新娘案狠。我一直安慰自己服傍,他們只是感情好,可當我...
    茶點故事閱讀 69,100評論 6 398
  • 文/花漫 我一把揭開白布骂铁。 她就那樣靜靜地躺著吹零,像睡著了一般。 火紅的嫁衣襯著肌膚如雪拉庵。 梳的紋絲不亂的頭發(fā)上灿椅,一...
    開封第一講書人閱讀 52,696評論 1 312
  • 那天,我揣著相機與錄音钞支,去河邊找鬼茫蛹。 笑死,一個胖子當著我的面吹牛烁挟,可吹牛的內(nèi)容都是我干的婴洼。 我是一名探鬼主播,決...
    沈念sama閱讀 41,165評論 3 422
  • 文/蒼蘭香墨 我猛地睜開眼撼嗓,長吁一口氣:“原來是場噩夢啊……” “哼窃蹋!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起静稻,我...
    開封第一講書人閱讀 40,108評論 0 277
  • 序言:老撾萬榮一對情侶失蹤警没,失蹤者是張志新(化名)和其女友劉穎,沒想到半個月后振湾,有當?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體杀迹,經(jīng)...
    沈念sama閱讀 46,646評論 1 319
  • 正文 獨居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 38,709評論 3 342
  • 正文 我和宋清朗相戀三年押搪,在試婚紗的時候發(fā)現(xiàn)自己被綠了树酪。 大學時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點故事閱讀 40,861評論 1 353
  • 序言:一個原本活蹦亂跳的男人離奇死亡大州,死狀恐怖续语,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情厦画,我是刑警寧澤疮茄,帶...
    沈念sama閱讀 36,527評論 5 351
  • 正文 年R本政府宣布,位于F島的核電站根暑,受9級特大地震影響力试,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜排嫌,卻給世界環(huán)境...
    茶點故事閱讀 42,196評論 3 336
  • 文/蒙蒙 一畸裳、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧淳地,春花似錦怖糊、人聲如沸帅容。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,698評論 0 25
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽丰嘉。三九已至,卻和暖如春嚷缭,著一層夾襖步出監(jiān)牢的瞬間饮亏,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 33,804評論 1 274
  • 我被黑心中介騙來泰國打工阅爽, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留路幸,地道東北人。 一個月前我還...
    沈念sama閱讀 49,287評論 3 379
  • 正文 我出身青樓付翁,卻偏偏與公主長得像简肴,于是被迫代替她去往敵國和親。 傳聞我的和親對象是個殘疾皇子百侧,可洞房花燭夜當晚...
    茶點故事閱讀 45,860評論 2 361