Skip to content

Support OomGroupKill in cgroup2 memory events stats #274

@sparrc

Description

@sparrc

oom_group_kill cgroup events have been added to the linux kernel around a year ago: torvalds/linux@b6bf9ab

This is an event which tracks how many times the entire cgroup is "group" killed, in addition to the single process oom kills tracked by the existing oom_kill event. See https://docs.kernel.org/admin-guide/cgroup-v2.html#controllers for details about oom grouping:

memory.oom.group

    A read-write single value file which exists on non-root cgroups. The default value is "0".

    Determines whether the cgroup should be treated as an indivisible workload by the OOM killer. If set, all tasks belonging to the cgroup or to its descendants (if the memory cgroup is not a leaf cgroup) are killed together or not at all. This can be used to avoid partial kills to guarantee workload integrity.

...

I believe support for this event will need to be added to these three places (see existing oom_kill event for example):
https://github.com/containerd/cgroups/blob/main/cgroup2/stats/metrics.proto
https://github.com/containerd/cgroups/blob/main/cgroup2/stats/metrics.pb.txt
https://github.com/containerd/cgroups/blob/main/cgroup2/manager.go

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions