Change transparent_page in docker

I have a container that requires / sys / kernel / mm / transparent _hugepage / enabled to be set to "never". The host has this parameter set to a different value that I cannot change due to other applications running on the host. Can't start container with different transparent_hugepage values ​​from host? Both host and container are using CentOS 6.6.

+3


source to share


1 answer


I assume you mean Redis, but unfortunately this is not possible. Even if you give a container access to change kernel parameters (via --privileged

or --cap-add

), it will change for that container, host, and all other containers.

The kernel is shared between the host and all containers, so they all need to agree on the same kernel parameters. The only exceptions to this rule are those options in the kernel or group resource management groups:

  • PID: process identifiers
  • UTS: Hostnames
  • Network: network parameters such as TCP backlog etc.
  • Mount: Installed file systems
  • User: UID / GIDs
  • IPC: Inter-Process Control chit-chat is isolated.


(more about groups: http://en.wikipedia.org/wiki/Cgroups )

Your particular request is related to a kernel memory management parameter that is applied globally.

+4


source







All Articles