
Spin Infrastructure Adventures: Containers, Systemd, and CGroups - Shopify
7/15/2022
This post details a deep dive into a container resource management issue where systemd processes within Spin instances were not respecting Kubernetes pod memory limits. The investigation revealed that the default cgroupfs driver used by containerd on Google's Container Optimized OS (COS) was the root cause, leading to 'escaped' cgroups and unlimited resource consumption. Experiments with Docker and Podman highlighted that Podman's systemd cgroup driver correctly delegated resource management. The post identifies the upcoming change in COS to default to the systemd cgroup driver as the solution, and discusses the implications of bind-mounting /sys/fs/cgroup read-only.

