fix: Set nice value in btrfs-dedup script to ensure anything it spawns is handled appropriately

This commit is contained in:
Kyle Gospodnetich 2024-09-16 09:53:28 -07:00
parent 6f9a43268a
commit b01a7c42a5
3 changed files with 2 additions and 14 deletions

View File

@ -358,6 +358,7 @@ RUN --mount=type=cache,dst=/var/cache/rpm-ostree \
python3-pip \
libadwaita \
duperemove \
cpulimit \
sqlite \
xwininfo \
xrandr \

View File

@ -309,7 +309,7 @@ fi
cmd rm -f "$DUPEREMOVE_DB"
fi
# shellcheck disable=SC2086
cmd duperemove --hashfile="$DUPEREMOVE_DB" --exclude="$TARGET/$RMLINT_DB" --exclude="$TARGET/$DUPEREMOVE_DB" --exclude="$TARGET/@swapfile/swapfile" ${DUPEREMOVE_ARGS} "$TARGET"/ &
cmd cpulimit -l 50 nice -19 ionice -c 3 duperemove --cpu-threads=2 --io-threads=2 --hashfile="$DUPEREMOVE_DB" --exclude="$TARGET/$RMLINT_DB" --exclude="$TARGET/$DUPEREMOVE_DB" --exclude="$TARGET/@swapfile/swapfile" ${DUPEREMOVE_ARGS} "$TARGET"/ &
worker_waiter
cmd cp -a "$DUPEREMOVE_DB" "$TARGET"/
cmd rm -f "$DUPEREMOVE_DB"

View File

@ -6,16 +6,3 @@ EnvironmentFile=-/etc/conf.d/btrfs-dedup
ExecStart=/usr/bin/btrfs-dedup %f
ExecReload=/usr/bin/btrfs-dedup --powerchange
PIDFile=/run/btrfs-dedup/%i.pid
MemoryAccounting=yes
MemoryHigh=1G
MemoryMax=2G
MemorySwapMax=500M
CPUAccounting=true
Nice=19
CPUSchedulingPolicy=batch
IOSchedulingClass=best-effort
IOSchedulingPriority=7
OOMScoreAdjust=1000
CPUWeight=30
CPUQuota=50%
IOWeight=30