From 714f4e72b58af0b0036bae45effd2b9d650ac364 Mon Sep 17 00:00:00 2001 From: Nitin Garg <113666283+gargnitingoogle@users.noreply.github.com> Date: Tue, 21 Nov 2023 09:42:12 +0530 Subject: [PATCH] Fix clat-percentile accuracy in fio (#1503) * Fix clat-percentile accuracy in fio 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. * address comments --- perfmetrics/scripts/fio/install_fio.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/perfmetrics/scripts/fio/install_fio.sh b/perfmetrics/scripts/fio/install_fio.sh index dc4052c9fd..c25c00ed29 100755 --- a/perfmetrics/scripts/fio/install_fio.sh +++ b/perfmetrics/scripts/fio/install_fio.sh @@ -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 = 17.17 seconds. +# (with default value of FIO_IO_U_PLAT_GROUP_NR = 29). This change increases it upto 32, to allow +# latencies upto 137.44s 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.36 && \ +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