JonMagon / KDiskMark

A simple open-source disk benchmark tool for Linux distros
GNU General Public License v3.0
1.01k stars 44 forks source link

Alternative console test with only FIO (Linux/Windows) #119

Open Deoptim opened 1 year ago

Deoptim commented 1 year ago

File config.fio

[global]
ioengine=windowsaio
#ioengine=libaio
filesize=1g
#directory=G\:\
filename=.fio-diskmark
direct=1    #use O_DIRECT IO (negates buffered)
time_based  #keep running until runtime/timeout is met
runtime=30  #stop workload when this amount of time has passed
loops=1     #number of times to run the job
#refill_buffers #always writes new random data in the buffer
#randrepeat=0   #do not use repeatable random IO pattern
thread      #use threads instead of processes
stonewall   #insert a hard barrier between this job and previous

[Seq-Read-Q32T1]
startdelay=0
iodepth=32
numjobs=1
bs=1m
rw=read

[Seq-Write-Q32T1]
startdelay=35 #add 5s delay to the job time (based on runtime=30)
iodepth=32
numjobs=1
bs=1m
rw=write

[Rand-Read-4K-Q8T8]
startdelay=70
iodepth=8
numjobs=8
openfiles=8
bs=4k
rw=randread

[Rand-Write-4K-Q8T8]
startdelay=105
iodepth=8
numjobs=8
openfiles=8
bs=4k
rw=randwrite

[Rand-Read-4K-Q32T1]
startdelay=140
iodepth=32
numjobs=1
bs=4k
rw=randread

[Rand-Write-4K-Q32T1]
startdelay=175
iodepth=32
numjobs=1
bs=4k
rw=randwrite

[Rand-Read-4K-Q1T1]
startdelay=210
iodepth=1
numjobs=1
bs=4k
rw=randread

[Rand-Write-4K-Q1T1]
startdelay=245
iodepth=1
numjobs=1
bs=4k
rw=randwrite

Usage on Windows: Write(or uncomment) "ioengine=windowsaio" option in file config.fio Execute: fio --directory=D\:\ --output=log.txt config.fio (whre disk format must be with additional slash "D\:\" )

Usage on Linux: Write(or uncomment) "ioengine=libaio" option in file config.fio Execute: fio --directory=/mnt/D/ --output=log.txt config.fio

Output of test will be in log.txt file.

igorpupkinable commented 10 months ago

@Deoptim you may be interested this gist which pulls out results from the log and presents it in a user friendly format similar to CrystalDiskMark or KDiskMark.

Gist: https://gist.github.com/i3v/99f8ef6c757a5b8e9046b8a47f3a9d5b Original answer: https://unix.stackexchange.com/questions/93791/benchmark-ssd-on-linux-how-to-measure-the-same-things-as-crystaldiskmark-does-i/480191#480191

igorpupkinable commented 10 months ago

You need to add group_reporting option so Q8T8 jobs have a single entry in the report instead of 8 entries for each run.

https://github.com/axboe/fio/blob/master/HOWTO.rst#measurements-and-reporting