dist: drop legacy control group parameters
Since we dropped CentOS7 support, now we can drop legacy control group parameters which is deprecated on systemd v252.
This commit is contained in:
7
dist/common/systemd/scylla-helper.slice
vendored
7
dist/common/systemd/scylla-helper.slice
vendored
@@ -15,10 +15,3 @@ MemoryHigh=4%
|
||||
# MemoryMax is the OOM point. As Scylla reserves 7% by default, the other two percent goes to
|
||||
# the kernel and other non contained processes
|
||||
MemoryMax=5%
|
||||
# Systemd deprecated settings BlockIOWeight, MemoryLimit and CPUShares. But they are still the ones used in RHEL7
|
||||
# Newer SystemD wants MemoryHigh/MemoryMax, IOWeight and CPUWeight instead. Luckily both newer and older SystemD seem to
|
||||
# ignore the unwanted option so safest to get both. Using just the old versions would work too but
|
||||
# seems less future proof. Using just the new versions does not work at all for RHEL7/
|
||||
MemoryLimit=5%
|
||||
CPUShares=10
|
||||
BlockIOWeight=10
|
||||
|
||||
@@ -41,18 +41,6 @@ if [ $MEMTOTAL_BYTES -lt 23008753371 ]; then
|
||||
[Slice]
|
||||
MemoryHigh=1200M
|
||||
MemoryMax=1400M
|
||||
MemoryLimit=1400M
|
||||
EOS
|
||||
|
||||
# On CentOS7, systemd does not support percentage-based parameter.
|
||||
# To apply memory parameter on CentOS7, we need to override the parameter
|
||||
# in bytes, instead of percentage.
|
||||
elif [ "$RHEL" -a "$VERSION_ID" = "7" ]; then
|
||||
MEMORY_LIMIT=$((MEMTOTAL_BYTES / 100 * 5))
|
||||
mkdir -p /etc/systemd/system/scylla-helper.slice.d/
|
||||
cat << EOS > /etc/systemd/system/scylla-helper.slice.d/memory.conf
|
||||
[Slice]
|
||||
MemoryLimit=$MEMORY_LIMIT
|
||||
EOS
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user