-
Notifications
You must be signed in to change notification settings - Fork 934
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
github: Adds tune-disk-performance action
Signed-off-by: Thomas Parrott <[email protected]>
- Loading branch information
1 parent
0e928a2
commit d054230
Showing
1 changed file
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |