-
Notifications
You must be signed in to change notification settings - Fork 1
Cgroup
HOA PHAN edited this page Mar 4, 2024
·
8 revisions
Cgroups V2: Before You Jump In
if your system support cgroupv2, you should see both:
bash-4.4# grep cgroup /proc/filesystems
nodev cgroup
nodev cgroup2
systemd core: refuse cgroupv1 unless SYSTEMD_CGROUP_ENABLE_LEGACY_FORCE
Feature | cgroup v1 | cgroup v2 |
---|---|---|
Hierarchical Structure | Hierarchical structure with independent controller hierarchies | Unified hierarchy shared by all controllers |
Mount Points | Controllers mounted under /sys/fs/cgroup/ | Controllers typically mounted under /sys/fs/cgroup |
File System | Utilizes cgroupfs pseudo file system | Utilizes normal file system with directories and files |
Controllers | Each controller manages specific resources independently | Controllers are more unified and flexible |
Resource Distribution | Complex distribution due to separate hierarchies | Unified and consistent resource distribution |
Backward Compatibility | Maintains backward compatibility with older kernels | Requires newer kernel, may lack compatibility |
Features | Limited features and flexibility | More features and flexibility, including per-thread cgroups |
https://bugs.openjdk.org/browse/JDK-8230305
https://kubernetes.io/docs/concepts/architecture/cgroups/
https://github.com/containerd/cgroups
https://github.com/KimMachineGun/automemlimit
https://github.com/google/cadvisor
https://github.com/kubernetes/kubernetes/tree/master/vendor/github.com/containerd/cgroups