Skip to content

Commit

Permalink
Fix clat-percentile accuracy in fio
Browse files Browse the repository at this point in the history
This fix is to address internal bug#309563824.
As recorded in this bug, fio by default supports
clat percentile values to be calculated accurately upto only
2^(FIO_IO_U_PLAT_GROUP_NR + 5) ns = 14 ms
(with default value of FIO_IO_U_PLAT_GROUP_NR = 29). This change increases it upto 32, to allow
latencies upto 112 ms to be calculated accurately.
  • Loading branch information
gargnitingoogle committed Nov 17, 2023
1 parent 00a6876 commit 3d79660
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions perfmetrics/scripts/fio/install_fio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,17 @@ echo "Installing fio ..."
sudo apt-get install -y libaio-dev

# We are building fio from source because of the issue: https://github.com/axboe/fio/issues/1668.
# The sed command below is to address internal bug#309563824.
# As recorded in this bug, fio by-default supports
# clat percentile values to be calculated accurately upto only
# 2^(FIO_IO_U_PLAT_GROUP_NR + 5) ns = 14 ms
# (with default value of FIO_IO_U_PLAT_GROUP_NR = 29). This change increases it upto 32, to allow
# latencies upto 112 ms to be calculated accurately.
sudo rm -rf "$FIO_SRC_DIR" && \
git clone https://github.com/axboe/fio.git "$FIO_SRC_DIR" && \
cd "$FIO_SRC_DIR" && \
git checkout fio-3.35 && \
sed -i 's/define \+FIO_IO_U_PLAT_GROUP_NR \+\([0-9]\+\)/define FIO_IO_U_PLAT_GROUP_NR 32/g' stat.h && \
./configure && make && sudo make install

# Now, print the installed fio version for verification
Expand Down

0 comments on commit 3d79660

Please sign in to comment.