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 16, 2023
1 parent 2f2fc25 commit 747d22e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions perfmetrics/scripts/presubmit_test/pr_perf_test/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,18 @@ function install_requirements() {
# We are building fio from source because of issue: https://github.com/axboe/fio/issues/1640.
# The fix is not currently released in a package as of 20th Oct, 2023.
# TODO: install fio via package when release > 3.35 is available.
# 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.
echo Installing fio
sudo rm -rf "${KOKORO_ARTIFACTS_DIR}/github/fio"
git clone https://github.com/axboe/fio.git "${KOKORO_ARTIFACTS_DIR}/github/fio"
cd "${KOKORO_ARTIFACTS_DIR}/github/fio" && \
git checkout c5d8ce3fc736210ded83b126c71e3225c7ffd7c9 && \
sed -i 's/define \+FIO_IO_U_PLAT_GROUP_NR \+\([0-9]\+\)/define FIO_IO_U_PLAT_GROUP_NR 17/g' stat.h
./configure && make && sudo make install
fio --version
cd "${KOKORO_ARTIFACTS_DIR}/github/gcsfuse"
Expand Down
7 changes: 7 additions & 0 deletions perfmetrics/scripts/run_load_test_and_fetch_metrics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,17 @@ sudo apt-get install libaio-dev
# We are building fio from source because of issue: https://github.com/axboe/fio/issues/1640.
# The fix is not currently released in a package as of 20th Oct, 2023.
# TODO: install fio via package when release > 3.35 is available.
# 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 "${KOKORO_ARTIFACTS_DIR}/github/fio"
git clone https://github.com/axboe/fio.git "${KOKORO_ARTIFACTS_DIR}/github/fio"
cd "${KOKORO_ARTIFACTS_DIR}/github/fio" && \
git checkout c5d8ce3fc736210ded83b126c71e3225c7ffd7c9 && \
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

cd "${KOKORO_ARTIFACTS_DIR}/github/gcsfuse/perfmetrics/scripts"
Expand Down

0 comments on commit 747d22e

Please sign in to comment.