google / gvisor-containerd-shim

containerd shim for gVisor
https://gvisor.dev
Apache License 2.0
79 stars 30 forks source link

CRI: Support oom_score_adj #34

Closed ianlewis closed 4 years ago

ianlewis commented 5 years ago

Support the oom_score_adj CRI option. oom_score_adj should be set on the gVisor sandbox based on the oom_score_adj set on each container in the pod.

ianlewis commented 5 years ago

My current thinking is that the shim should set the oom_score_adj on the gVisor sandbox equal to the lowest oom_score_adj in the container besides the pause container. This will provide behavior closest to what is intended by Kubernetes pod qosClass.

https://kubernetes.io/docs/tasks/configure-pod-container/quality-service-pod/

ianlewis commented 5 years ago

Related: https://github.com/google/gvisor/issues/512

ianlewis commented 4 years ago

oom_score_adj logic was supported fully in runsc: https://github.com/google/gvisor/commit/0bfffbcb0163cc7ebb0cbf47fa91247d208502be

ianlewis commented 4 years ago

runsc handles oom_score_adj so I think this can be closed.