diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f10b6ca7ea94d..c06bcea4d965d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -80,6 +80,9 @@ jobs: - name: collect CPU statistics run: src/ci/scripts/collect-cpu-stats.sh if: success() && !env.SKIP_JOB + - name: remount root filesystem + run: src/ci/scripts/tune-rootfs.sh + if: success() && !env.SKIP_JOB - name: show the current environment run: src/ci/scripts/dump-environment.sh if: success() && !env.SKIP_JOB @@ -441,6 +444,9 @@ jobs: - name: collect CPU statistics run: src/ci/scripts/collect-cpu-stats.sh if: success() && !env.SKIP_JOB + - name: remount root filesystem + run: src/ci/scripts/tune-rootfs.sh + if: success() && !env.SKIP_JOB - name: show the current environment run: src/ci/scripts/dump-environment.sh if: success() && !env.SKIP_JOB @@ -548,6 +554,9 @@ jobs: - name: collect CPU statistics run: src/ci/scripts/collect-cpu-stats.sh if: success() && !env.SKIP_JOB + - name: remount root filesystem + run: src/ci/scripts/tune-rootfs.sh + if: success() && !env.SKIP_JOB - name: show the current environment run: src/ci/scripts/dump-environment.sh if: success() && !env.SKIP_JOB diff --git a/src/ci/github-actions/ci.yml b/src/ci/github-actions/ci.yml index 9eea6243dfa57..bc6a3c0a86528 100644 --- a/src/ci/github-actions/ci.yml +++ b/src/ci/github-actions/ci.yml @@ -137,6 +137,10 @@ x--expand-yaml-anchors--remove: run: src/ci/scripts/collect-cpu-stats.sh <<: *step + - name: remount root filesystem + run: src/ci/scripts/tune-rootfs.sh + <<: *step + - name: show the current environment run: src/ci/scripts/dump-environment.sh <<: *step diff --git a/src/ci/scripts/tune-rootfs.sh b/src/ci/scripts/tune-rootfs.sh new file mode 100755 index 0000000000000..e5c02c07fc656 --- /dev/null +++ b/src/ci/scripts/tune-rootfs.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +set -euo pipefail +IFS=$'\n\t' + +source "$(cd "$(dirname "$0")" && pwd)/../shared.sh" + +if isLinux && [[ $(findmnt -n /) =~ "ext4" ]] ; then + # noauto_da_alloc since auto_da_alloc causes sync IO for some common file creation patters + # lazytime avoids sync IO when (rel)atime updates are applied + # nodiscard because the ext4 doesn't support async discard (unlike xfs or btrfs) + sudo mount -oremount,lazytime,nodiscard,noauto_da_alloc / + + mount +fi