FIO 是一個 benchmark 工具,可以計算硬碟速度、以及 IO

隨機寫入測試

fio --name fio_test_write --direct=1 --rw=randwrite --bs=4k --size=1G --numjobs=16 --runtime=180 --group_reporting --refill_buffers --ioengine=libaio --iodepth=16

隨機讀取測試

fio --name fio_test_read  --direct=1 --rw=randread  --bs=4k --size=1G --numjobs=16 --runtime=180 --group_reporting --refill_buffers --ioengine=libaio --iodepth=16

fio 參數說明

--direct=1                  # non-buffered I/O
--rw=randrw                 # 隨機寫與讀
                            #   read
                            #   write
                            #   rw
                            #   randread
                            #   randwrite
                            #   randrw
--bs=4k                     # block size 檔案寫入大小
--size=4g                   # 測試的大小
--numjobs=16                # 同一個 workload 同時多少個 IO 請求
--runtime=180               # timeout 時間 (秒),就算 --size 的大小還未到達,還是結束
--ioengine=libaio           # IO 引擎
                            #   libaio - async IO 
                            #   ...
--rwmixwrite=30             # 混合讀寫時,寫佔 30% loading
--rwmixread=100             # 混合讀寫時,讀佔 100% loading
--refill_buffers            # 把 Buffer 填滿就不會跑到 Buffer 的值
--group_reporting           # 總表顯示
--iodepth=16                # 同一時間有多少 IO 在作存取
--name=fio_test_write       # job 名稱,會在當下目錄產生暫存檔
Related posts 相關文章
使用 sysbench 壓力測試 mysql
More...
Seagate 說傳統硬碟容量 於 2030 達 100TB ?
More...
救援一顆變成 RAW 格式的硬碟
More...
可以督促你快點升級 PHP 7.4 的測試報告
More...

作者

留言

撰寫回覆或留言

發佈留言必須填寫的電子郵件地址不會公開。