Description
I would like the Kubelet to support a flag like the following:
--container-memory-swap-limit-factor=0.1 (defaults to 0, meaning no memory-swap)
To control the default amount of MemorySwap that is given to a container as a percentage of their requested memory limit.
See https://docs.docker.com/reference/run/#runtime-constraints-on-cpu-and-memory for the third-row which is the behavior we show today when the user sets a memory-limit, but the kubelet does not specify memory-swap
(specify memory without memory-swap) The container is not allowed to use more than L bytes of memory, swap plus memory usage is double of that.
We think using memory-swap at all is a big step to take, and if the administrator wanted to allow for memory swap, it should not default to 2L where (L is the memory specified).
For affected area of Kubelet, see:
https://github.com/GoogleCloudPlatform/kubernetes/blob/master/pkg/kubelet/dockertools/manager.go#L442
For value we should explicitly set, see:
https://github.com/GoogleCloudPlatform/kubernetes/blob/master/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/container.go#L177