Created
May 25, 2018 13:52
-
-
Save tfiskgul/6f4e468fb99e46eb15c41b9a616c629d to your computer and use it in GitHub Desktop.
systemd background io slice for defragmentation, scrub, deduplication etc
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
[Unit] | |
Description=Background slice with much lower system (particularly IO) impact | |
Before=slices.target | |
[Slice] | |
# CPU | |
# cgroup v1. The allowed range is 2 to 262144. Defaults to 1024. | |
CPUShares=10 | |
# IO, cgroup v1. | |
BlockIOAccounting=yes | |
BlockIOWeight=10 | |
# FIXME: Make this dynamic with a generator | |
BlockIOReadBandwidth=/dev/sda 2M | |
BlockIOReadBandwidth=/dev/sdb 2M | |
BlockIOReadBandwidth=/dev/sdc 2M | |
# These limits only apply to synchronous writes (O_SYNC) | |
BlockIOWriteBandwidth=/dev/sda 2M | |
BlockIOWriteBandwidth=/dev/sdb 2M | |
BlockIOWriteBandwidth=/dev/sdc 2M |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment