Unless told otherwise, fio sets kb_base to 1024: https://fio.readthedocs.io/en/latest/fio_doc.html#units
I don't see this being set anywhere in YABs, and the function return_speed states fio disk test which always returns a result in KB/s
|
# format_speed |
|
# Purpose: This method is a convenience function to format the output of the fio disk tests which |
|
# always returns a result in KB/s. If result is >= 1 GB/s, use GB/s. If result is < 1 GB/s |
|
# and >= 1 MB/s, then use MB/s. Otherwise, use KB/s. |
|
# Parameters: |
|
# 1. RAW - the raw disk speed result (in KB/s) |
|
# Returns: |
|
# Formatted disk speed in GB/s, MB/s, or KB/s |
|
function format_speed { |
|
RAW=$1 # disk speed in KB/s |
|
RESULT=$RAW |
|
local DENOM=1 |
|
local UNIT="KB/s" |
|
|
|
# ensure raw value is not null, if it is, return blank |
|
if [ -z "$RAW" ]; then |
|
echo "" |
The lines in the script that invoke fio do not set kb_base:
|
DISK_TEST=$(timeout 35 "$FIO_CMD" --name=rand_rw_"$BS" --ioengine=libaio --rw=randrw --rwmixread=50 --bs="$BS" --iodepth=64 --numjobs=2 --size="$FIO_SIZE" --runtime=30 --gtod_reduce=1 --direct=1 --filename="$DISK_PATH/test.fio" --group_reporting --minimal 2> /dev/null | grep rand_rw_"$BS") |
Here is an example removing --minimal and variables from the script, using the binary from this repository:
$ ./bin/fio/fio_x64 --name=rand_rw_4k --ioengine=libaio --rw=randrw --rwmixread=50 --bs=4k --iodepth=64 --numjobs=2 --size=2G --runtime=30 --gtod_reduce=1 --direct=1 --filename="./test.fio" --group_reporting
rand_rw_4k: (g=0): rw=randrw, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=64
...
fio-3.39
Starting 2 processes
Jobs: 2 (f=2)
rand_rw_4k: (groupid=0, jobs=2): err= 0: pid=3766877: Mon Feb 9 01:00:35 2026
read: IOPS=257k, BW=1003MiB/s (1051MB/s)(2045MiB/2040msec)
bw ( KiB/s): min=1016910, max=1047344, per=100.00%, avg=1031459.50, stdev=5912.57, samples=8
iops : min=254227, max=261836, avg=257864.75, stdev=1478.21, samples=8
write: IOPS=257k, BW=1005MiB/s (1054MB/s)(2051MiB/2040msec); 0 zone resets
bw ( KiB/s): min=1016483, max=1045792, per=100.00%, avg=1034544.75, stdev=5867.49, samples=8
iops : min=254120, max=261448, avg=258636.00, stdev=1467.04, samples=8
cpu : usr=11.92%, sys=67.42%, ctx=395101, majf=0, minf=16
IO depths : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=0.1%, >=64=100.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.1%, >=64=0.0%
issued rwts: total=523597,524979,0,0 short=0,0,0,0 dropped=0,0,0,0
latency : target=0, window=0, percentile=100.00%, depth=64
Run status group 0 (all jobs):
READ: bw=1003MiB/s (1051MB/s), 1003MiB/s-1003MiB/s (1051MB/s-1051MB/s), io=2045MiB (2145MB), run=2040-2040msec
WRITE: bw=1005MiB/s (1054MB/s), 1005MiB/s-1005MiB/s (1054MB/s-1054MB/s), io=2051MiB (2150MB), run=2040-2040msec
Disk stats (read/write):
dm-0: ios=491296/492396, sectors=3930368/3939264, merge=0/0, ticks=142160/5523, in_queue=147683, util=95.04%, aggrios=523597/524991, aggsectors=4188776/4200248, aggrmerge=0/22, aggrticks=150004/6568, aggrin_queue=156574, aggrutil=73.46%
nvme0n1: ios=523597/524991, sectors=4188776/4200248, merge=0/22, ticks=150004/6568, in_queue=156574, util=73.46%
By settings --kb_base=1000, this changes to favor KB/s (Had I set --minimal):
$ ./bin/fio/fio_x64 --name=rand_rw_4k --i
oengine=libaio --rw=randrw --rwmixread=50 --bs=4k --iodepth=64 --numjobs=2 --size=2G --
runtime=30 --gtod_reduce=1 --direct=1 --filename="./test.fio" --group_reporting --kb_ba
se=1000
rand_rw_4k: (g=0): rw=randrw, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=64
...
fio-3.39
Starting 2 processes
Jobs: 2 (f=2): [m(2)][100.0%][r=439MB/s,w=440MB/s][r=110k,w=110k IOPS][eta 00m:00s]
rand_rw_4k: (groupid=0, jobs=2): err= 0: pid=3767275: Mon Feb 9 01:01:59 2026
read: IOPS=96.0k, BW=393MB/s (375MiB/s)(2145MB/5453msec)
bw ( kB/s): min=313984, max=446192, per=98.85%, avg=379651.20, stdev=22193.78, samples=20
iops : min=78496, max=111548, avg=94912.80, stdev=5548.45, samples=20
write: IOPS=96.3k, BW=394MB/s (376MiB/s)(2150MB/5453msec); 0 zone resets
bw ( kB/s): min=315816, max=447768, per=98.81%, avg=380522.40, stdev=22291.91, samples=20
iops : min=78954, max=111942, avg=95130.60, stdev=5572.98, samples=20
cpu : usr=6.28%, sys=26.79%, ctx=644705, majf=0, minf=16
IO depths : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=0.1%, >=64=100.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.1%, >=64=0.0%
issued rwts: total=523597,524979,0,0 short=0,0,0,0 dropped=0,0,0,0
latency : target=0, window=0, percentile=100.00%, depth=64
Run status group 0 (all jobs):
READ: bw=393MB/s (375MiB/s), 393MB/s-393MB/s (375MiB/s-375MiB/s), io=2145MB (2045MiB), run=5453-5453msec
WRITE: bw=394MB/s (376MiB/s), 394MB/s-394MB/s (376MiB/s-376MiB/s), io=2150MB (2051MiB), run=5453-5453msec
Disk stats (read/write):
dm-0: ios=516830/518432, sectors=4134640/4147744, merge=0/0, ticks=625137/51100, in_queue=676237, util=98.22%, aggrios=523597/525003, aggsectors=4188776/4200648, aggrmerge=0/42, aggrticks=630702/52816, aggrin_queue=683529, aggrutil=72.70%
nvme0n1: ios=523597/525003, sectors=4188776/4200648, merge=0/42, ticks=630702/52816, in_queue=683529, util=72.70%
It's pretty confusing (and there are multiple issues in fios lifespan about inconsistency with this) and it's especially unhelpful when terse output uses variables with _kb suffixes.
Here is another issue in fio where this is discussed: axboe/fio#1094
It gets even better here, I'm not even sure if kb_base does anything for terse output, there are comments declaring KiB/s (My c is very rusty so don't 100% trust this observation..): https://github.com/axboe/fio/blob/6783ccc569c8e427cb3cfe4e8b37e18fa0601d9f/stat.c#L1340
Unless told otherwise, fio sets kb_base to 1024: https://fio.readthedocs.io/en/latest/fio_doc.html#units
I don't see this being set anywhere in YABs, and the function return_speed states
fio disk test which always returns a result in KB/syet-another-bench-script/yabs.sh
Lines 384 to 400 in 7328d7c
The lines in the script that invoke
fiodo not set kb_base:yet-another-bench-script/yabs.sh
Line 474 in 7328d7c
Here is an example removing --minimal and variables from the script, using the binary from this repository:
By settings --kb_base=1000, this changes to favor KB/s (Had I set --minimal):
It's pretty confusing (and there are multiple issues in fios lifespan about inconsistency with this) and it's especially unhelpful when terse output uses variables with _kb suffixes.
Here is another issue in fio where this is discussed: axboe/fio#1094
It gets even better here, I'm not even sure if kb_base does anything for terse output, there are comments declaring KiB/s (My c is very rusty so don't 100% trust this observation..): https://github.com/axboe/fio/blob/6783ccc569c8e427cb3cfe4e8b37e18fa0601d9f/stat.c#L1340