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
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
1tomemory.use_hierarchyin 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
LinuxMemorytype inspecs-go/config.go.Interested to hear your thoughts! Thanks :)
cc @ostenbom