fio
;nmon
;lsblk
найти тестируемое устройство;#!/bin/sh BASEDIR=/home/admin #<---- Укажите рабочую директорию, где будут храниться отчёты INIDIR=$BASEDIR/ini LOGDIR=$BASEDIR/log DEV=/dev/sdb #<---- Укажите девайс который будем тестировать IODEPTH=16 RUNTIME=300 TPAUSE=30 STOR="sdb" #<---- Укажите девайс который будем тестировать echo "stor $STOR" > $INIDIR/nmon.gr # --------------------- /usr/bin/nmon -f -t -s 5 -c 5000 -g $INIDIR/nmon.gr -m $LOGDIR/fio fiocmdlc="--filename=$DEV --iodepth=$IODEPTH --runtime=$RUNTIME " for fiocmdl in " --blocksize=4k --output=$LOGDIR/rand_read_4.out $INIDIR/rand_read.ini"\ " --blocksize=8k --output=$LOGDIR/rand_read_8.out $INIDIR/rand_read.ini"\ " --blocksize=16k --output=$LOGDIR/rand_read_16.out $INIDIR/rand_read.ini"\ " --blocksize=256k --output=$LOGDIR/rand_read_256.out $INIDIR/rand_read.ini"\ " --blocksize=4k --output=$LOGDIR/rand_write_4.out $INIDIR/rand_write.ini"\ " --blocksize=8k --output=$LOGDIR/rand_write_8.out $INIDIR/rand_write.ini"\ " --blocksize=16k --output=$LOGDIR/rand_write_16.out $INIDIR/rand_write.ini"\ " --blocksize=256k --output=$LOGDIR/rand_write_256.out $INIDIR/rand_write.ini"\ " --blocksize=4k --output=$LOGDIR/rand_read_write_4.out $INIDIR/rand_read_write.ini"\ " --blocksize=8k --output=$LOGDIR/rand_read_write_8.out $INIDIR/rand_read_write.ini"\ " --blocksize=16k --output=$LOGDIR/rand_read_write_16.out $INIDIR/rand_read_write.ini"\ " --blocksize=256k --output=$LOGDIR/rand_read_write_256.out $INIDIR/rand_read_write.ini"\ " --blocksize=4k --output=$LOGDIR/read_4.out $INIDIR/read.ini"\ " --blocksize=8k --output=$LOGDIR/read_8.out $INIDIR/read.ini"\ " --blocksize=16k --output=$LOGDIR/read_16.out $INIDIR/read.ini"\ " --blocksize=256k --output=$LOGDIR/read_256.out $INIDIR/read.ini"\ " --blocksize=4k --output=$LOGDIR/read_write_4.out $INIDIR/read_write.ini"\ " --blocksize=8k --output=$LOGDIR/read_write_8.out $INIDIR/read_write.ini"\ " --blocksize=16k --output=$LOGDIR/read_write_16.out $INIDIR/read_write.ini"\ " --blocksize=256k --output=$LOGDIR/read_write_256.out $INIDIR/read_write.ini"\ " --blocksize=4k --output=$LOGDIR/write_4.out $INIDIR/write.ini"\ " --blocksize=8k --output=$LOGDIR/write_8.out $INIDIR/write.ini"\ " --blocksize=16k --output=$LOGDIR/write_16.out $INIDIR/write.ini"\ " --blocksize=256k --output=$LOGDIR/write_256.out $INIDIR/write.ini"; do echo " ----- $fiocmdlc $fiocmdl" >> $LOGDIR/fio/test.log fio $fiocmdlc $fiocmdl >> $LOGDIR/fio/test.log echo " ----- endtest" >> $LOGDIR/fio/test.log sleep $TPAUSE done pkill nmon # ---------------------
[writetest] rw=write direct=1 buffered=0 ioengine=libaio
[readtest] rw=read direct=1 buffered=0 ioengine=libaio
[writetest] rw=rw direct=1 buffered=0 ioengine=libaio
[writetest] rw=randwrite direct=1 buffered=0 ioengine=libaio
[readtest] rw=randread direct=1 buffered=0 ioengine=libaio
[writetest] rw=randrw direct=1 buffered=0 ioengine=libaio
bench.sh
Сводные результаты тестов представлены на данной странице: Результаты тестов fio
fio
;nmon
;lsblk
найти тестируемое устройство;#!/bin/sh BASEDIR=/home/admin #<---- Укажите рабочую директорию, где будут храниться отчёты INIDIR=$BASEDIR/ini LOGDIR=$BASEDIR/log DEV=/dev/sdb #<---- Укажите девайс который будем тестировать IODEPTH=16 RUNTIME=300 TPAUSE=30 STOR="sdb" #<---- Укажите девайс который будем тестировать echo "stor $STOR" > $INIDIR/nmon.gr # --------------------- /usr/bin/nmon -f -t -s 5 -c 5000 -g $INIDIR/nmon.gr -m $LOGDIR/fio fiocfg="--filename=/dev/sdb --iodepth=$IODEPTH --runtime=$RUNTIME " for fiorun in \ " --blocksize=4k --output=$LOGDIR/rand_write_4.out $INIDIR/rand_write.ini" \ " --blocksize=8k --output=$LOGDIR/rand_write_8.out $INIDIR/rand_write.ini" \ " --blocksize=16k --output=$LOGDIR/rand_write_16.out $INIDIR/rand_write.ini" \ " --blocksize=256k --output=$LOGDIR/rand_write_256.out $INIDIR/rand_write.ini" \ " --blocksize=4k --output=$LOGDIR/rand_read_write_4.out $INIDIR/rand_read_write.ini" \ " --blocksize=8k --output=$LOGDIR/rand_read_write_8.out $INIDIR/rand_read_write.ini" \ " --blocksize=16k --output=$LOGDIR/rand_read_write_16.out $INIDIR/rand_read_write.ini" \ " --blocksize=256k --output=$LOGDIR/rand_read_write_256.out $INIDIR/rand_read_write.ini" \ " --blocksize=4k --output=$LOGDIR/rand_read_4.out $INIDIR/rand_read.ini" \ " --blocksize=8k --output=$LOGDIR/rand_read_8.out $INIDIR/rand_read.ini" \ " --blocksize=16k --output=$LOGDIR/rand_read_16.out $INIDIR/rand_read.ini" \ " --blocksize=256k --output=$LOGDIR/rand_read_256.out $INIDIR/rand_read.ini" \ " --blocksize=4k --output=$LOGDIR/write_4.out $INIDIR/write.ini" \ " --blocksize=8k --output=$LOGDIR/write_8.out $INIDIR/write.ini" \ " --blocksize=16k --output=$LOGDIR/write_16.out $INIDIR/write.ini" \ " --blocksize=256k --output=$LOGDIR/write_256.out $INIDIR/write.ini" \ " --blocksize=4k --output=$LOGDIR/read_write_4.out $INIDIR/read_write.ini" \ " --blocksize=8k --output=$LOGDIR/read_write_8.out $INIDIR/read_write.ini" \ " --blocksize=16k --output=$LOGDIR/read_write_16.out $INIDIR/read_write.ini" \ " --blocksize=256k --output=$LOGDIR/read_write_256.out $INIDIR/read_write.ini" \ " --blocksize=4k --output=$LOGDIR/read_4.out $INIDIR/read.ini" \ " --blocksize=8k --output=$LOGDIR/read_8.out $INIDIR/read.ini" \ " --blocksize=16k --output=$LOGDIR/read_16.out $INIDIR/read.ini" \ " --blocksize=256k --output=$LOGDIR/read_256.out $INIDIR/read.ini" ; do echo " ----- $fiocfg $fiorun" >> $LOGDIR/fio/test.log fio $fiocfg $fiorun >> $LOGDIR/fio/test.log echo " ----- endtest" >> $LOGDIR/fio/test.log sleep $TPAUSE done pkill nmon # ---------------------
[writetest] rw=write direct=1 buffered=0 ioengine=libaio
[readtest] rw=read direct=1 buffered=0 ioengine=libaio
[writetest] rw=rw direct=1 buffered=0 ioengine=libaio
[writetest] rw=randwrite direct=1 buffered=0 ioengine=libaio
[readtest] rw=randread direct=1 buffered=0 ioengine=libaio
[writetest] rw=randrw direct=1 buffered=0 ioengine=libaio
bench.sh
[global] ioengine=libaio direct=1 group_reporting time_based runtime=1h buffered=0 random_generator=tausworthe64 norandommap disable_clat=1 disable_slat=1 log_avg_msec=5000 [ NVMe_1 ] description=Random read/write 80/20 rw=randrw rwmixread=80 bs=8k filename=/dev/vdb iodepth=16 numjobs=8 [ NVMe_2 ] description=Random read/write 80/20 rw=randrw rwmixread=80 bs=8k filename=/dev/vdc iodepth=16 numjobs=8 [ HDD_1 ] description=Read/write 80/20 rw=rw rwmixread=80 bs=256k filename=/dev/vdd iodepth=1 numjobs=1 [ HDD_2 ] description=Read/write 80/20 rw=rw rwmixread=80 bs=256k filename=/dev/vde iodepth=1 numjobs=1 [ HDD_3 ] description=Read/write 80/20 rw=rw rwmixread=80 bs=256k filename=/dev/vdf iodepth=1 numjobs=1
fio /var/fio.rtf -output-format=json --output=/var/log/storage1/fio.json --write_lat_log=/var/log/storage1/lat.json --write_bw_log=/var/log/storage1/bw.json —write_iops_log=/var/log/storage1/iops.json