# lssubsys -a
# systemd-cgls
/apache2
# cat /sys/fs/cgroup/system.slice/apache2.service/memory.high
# echo 2000000 > /sys/fs/cgroup/system.slice/apache2.service/memory.high
# time curl 127.0.0.1
# systemctl edit --force --full my.slice
[Unit]
Description=My Slice
Before=slices.target
[Slice]
MemoryAccounting=true
MemoryLimit=64M
MemoryHigh=64M
CPUAccounting=true
CPUQuota=5%
TasksMax=4096
# systemctl edit apache2.service
[Service]
Slice=my.slice
# systemctl daemon-reload
# systemctl restart apache2.service
# systemd-cgls
/apache2
# cat /sys/fs/cgroup/my.slice/memory.high
# cat /sys/fs/cgroup/my.slice/cpu.max