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:
Takuya ASADA
2023-12-11 18:38:05 +09:00
parent dcb5fd6fce
commit 6f1fff58ba
2 changed files with 0 additions and 19 deletions

View File

@@ -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

View File

@@ -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