Skip to content

Commit

Permalink
github: Adds tune-disk-performance action
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Parrott <[email protected]>
  • Loading branch information
tomponline committed Sep 12, 2024
1 parent 0e928a2 commit d054230
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/actions/tune-disk-performance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Tune disk performance
description: Optimize ext4 FSes for performance, not reliability

runs:
using: composite
steps:
- name: Tune disk performance
run: |
set -eux
# optimize ext4 FSes for performance, not reliability
for fs in $(findmnt --noheading --type ext4 --list --uniq | awk '{print $1}'); do
# nombcache and data=writeback cannot be changed on remount
sudo mount -o remount,noatime,barrier=0,commit=6000 "${fs}" || true
done
# disable dpkg from calling sync()
echo "force-unsafe-io" | sudo tee /etc/dpkg/dpkg.cfg.d/force-unsafe-io

0 comments on commit d054230

Please sign in to comment.