[Unit] Description=StartOS service containers Before=startd.service [Slice] # Every service container's cgroup is created under this slice by lxc # (see core/src/lxc/config.template). startd applies a RAM-dependent # MemoryMax / MemoryHigh to it at boot (core system::limit_container_memory) — # total RAM minus a fixed reservation for the host management plane — so the # *aggregate* footprint of all service containers is bounded. # # ManagedOOM* opts the slice into systemd-oomd: under sustained memory PSI # pressure (or swap exhaustion) oomd kills the heaviest *container* cgroup in # this slice, turning what used to be a whole-host swap-death wedge into a # single failed install. The host plane is spared — system.slice / user.slice # carry MemoryMin reservations (projects/start-os/debian/postinst) and startd.service # sets ManagedOOMPreference=avoid. MemoryAccounting=yes ManagedOOMMemoryPressure=kill ManagedOOMMemoryPressureLimit=60% ManagedOOMSwap=kill