[Unit]
Description=Slice used to run companion programs to Scylla. Memory, CPU and IO restricted
Before=slices.target

[Slice]
MemoryAccounting=true
IOAccounting=true
CPUAccounting=true

CPUWeight=10
IOWeight=10

# MemoryHigh is the throttle point
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
