Skip to content

Suggest adding UseHierarchy to LinuxMemory #984

@Callisto13

Description

@Callisto13

Hi!

We would like to ensure that a process inherits memory limits from the parent if the parent cgroup has limits set.
This would involve writing 1 to memory.use_hierarchy in the parent cgroup, and we plan to submit a PR to runc which does this if a boolean property is set on the spec.
We suggest adding the following property to the LinuxMemory type in specs-go/config.go.

// LinuxMemory for Linux cgroup 'memory' resource management
type LinuxMemory struct {
  // Memory limit (in bytes).
  Limit *int64 `json:"limit,omitempty"`
  ...
  // Use Hierarchy for children to inherit parent memory limits
  UseHierarchy bool `json:"useHierarchy,omitempty"`
}

Interested to hear your thoughts! Thanks :)

cc @ostenbom

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