Cgroup Resource Controlとは?
cgroup resource controlは、プロセスをcontrol groupに配置し、各グループがどれだけCPU、メモリ、IOを使えるかに制限をかけるLinuxの仕組みです。kernelはグループごとに使用量を計測し、上限を超えたプロセスをthrottleしたりkillしたりできます。containerやサービスマネージャは、workloadを隔離するためにこれに依存します。
なぜ重要か
メモリ上限を持つcgroupに閉じ込められたCI jobは、その上限を超えるとkillされ、これがout-of-memory失敗への一つの経路です。cgroupを理解すると、job間の隔離と、runnerが課すリソースの上限の両方を説明できます。
関連ガイド
What Is a Linux Namespace?A Linux namespace gives a group of processes their own isolated view of a system resource, such as process ID…
What Is the OOM Killer?The OOM killer is the Linux mechanism that terminates a process to reclaim memory when the system runs critic…
What Is a Systemd Unit?A systemd unit is a configuration file describing a resource systemd manages, such as a service, socket, moun…