Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Kubelet needs to allow configuration of container memory-swap #7294

Closed
@derekwaynecarr

Description

@derekwaynecarr

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/isolationpriority/awaiting-more-evidenceLowest priority. Possibly useful, but not yet enough support to actually get it done.sig/nodeCategorizes an issue or PR as relevant to SIG Node.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions