dotfiles/.config/systemd/user/podman.slice
surtur 930e692a47
systemd(user): add podman unit, slice files
* podman user service (rootless) is autostarted (enabled)
2021-11-10 02:40:17 +01:00

18 lines
540 B
SYSTEMD

[Unit]
Description=Slice that limits podman resources
Before=slices.target
# refs:
# https://baykara.medium.com/docker-resource-management-via-cgroups-and-systemd-633b093a835c
# https://docs.docker.com/engine/reference/commandline/dockerd/#docker-runtime-execution-op>
[Slice]
CPUAccounting=yes
# 100% is an equivalent of full utilization on a single core
# we allow for 85% here - applies to all docker.service-spawn
# processes cumulatively
# CPUQuota=85%
CPUQuota=50%
MemoryAccounting=yes
MemoryHigh=10G
MemoryMax=12G
MemorySwapMax=1G