Skip to content

bssplit is off by 8x #1325

@srosenberg

Description

@srosenberg

Please acknowledge the following before creating a ticket

Description of the bug:

block sizes specified in bssplit are multiplied by 8 as confirmed by blktrace in a sequential write job

Environment:

Ubuntu 20.04.2 LTS

fio version:

Built from master,

/usr/local/bin/fio -version
fio-3.29-7-g01686

Reproduction steps

Config file

cat fio.cfg

[global]
thread=1
ioengine=libaio
direct=1
fadvise_hint=0
group_reporting=1
randrepeat=0
verify=0
time_based=1
runtime=1m
ramp_time=2s
size=100%

[wr-bw]
rw=write
bs=4096
bssplit=4k/72:8k/18:12k/3:16k/7
iodepth=256
numjobs=1
stonewall

NOTE: our desired block size distribution is given by,

bssplit=4k/72:8k/18:12k/3:16k/7

Run

Start blktrace,

blktrace -d /dev/md0 -o blktrace_run.bin

Start fio,

/usr/local/bin/fio --filename="/dev/md0" fio.cfg

Analyze blktrace results

Parse out writes and compute their histogram,

blkparse blktrace_run.bin -a write|awk '/ Q / { if ($7 ~ /W/) print $10 }' |sort |uniq -c |sort -rn >run_writes.txt

Count total number of writes,

cat run_writes.txt|awk '{total += $1} END {print total}'
11230124

Output percentage of block sizes written,

cat run_writes.txt|awk 'BEGIN {total = 11230124; blockSize = 4096} {printf("%d (%f%%)\n", $2*blockSize, 100.0 *($1 / total))}'|head
32768 (72.003301%)
65536 (18.000451%)
131072 (6.994126%)
98304 (3.002122%)

N.B. Percentages are matching up but the block sizes are consistently off by 8x. (I've repeated this several times with different values of bssplit, each time I get the same distribution modulo the scaling of the block sizes by 8).

Metadata

Metadata

Assignees

No one assigned

    Labels

    needreporterinfoWaiting on information from the issue reporter

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions