You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Addition of "--shm-size" not working with Docker 1.11.0 and Debian 8 Jessie #24040
--shm-size=512m is not working for me as build args, either as run args.
docker run -it --shm-size=102400 ubuntu:14.04.4
root@141a66888d0a:/# cat /proc/mounts | grep shm
shm /dev/shm tmpfs rw,nosuid,nodev,noexec,relatime,size=100k 0 0
root@141a66888d0a:/# ipcs -lm
------ Shared Memory Limits --------
max number of segments = 4096
max seg size (kbytes) = 32768
max total shared memory (kbytes) = 8388608
min seg size (bytes) = 1
Install details
docker version
Client:
Version: 1.11.0
API version: 1.23
Go version: go1.5.4
Git commit: 4dc5990
Built: Wed Apr 13 18:17:17 2016
OS/Arch: linux/amd64
Server:
Version: 1.11.0
API version: 1.23
Go version: go1.5.4
Git commit: 4dc5990
Built: Wed Apr 13 18:17:17 2016
OS/Arch: linux/amd64
uname -a
Linux master-bhs-01 3.14.32-xxxx-grs-ipv6-64 #7 SMP Wed Jan 27 18:05:09 CET 2016 x86_64 GNU/Linux
I was trying to configure multiple postgresql < 9.3 database at once. issue
The --shm-size only affects the size of the /dev/shm mount, which is used for the posix shared memory APIs, not the sysv shared memory that ipcs shows. These limits need to be set with sysctl. In docker 1.12 there is a --sysctl parameter to docker run that can be used to set these, eg docker run --sysctl kernel.shmmni=8192 ubuntu ipcs -lm. However for recent Postgres you do want to set the posix shm size, which works fine, as this is what it uses, not the sysv shared memory:
Activity
justincormack commentedon Jul 4, 2016
The
--shm-sizeonly affects the size of the/dev/shmmount, which is used for the posix shared memory APIs, not the sysv shared memory thatipcsshows. These limits need to be set withsysctl. In docker 1.12 there is a--sysctlparameter todocker runthat can be used to set these, egdocker run --sysctl kernel.shmmni=8192 ubuntu ipcs -lm. However for recent Postgres you do want to set the posix shm size, which works fine, as this is what it uses, not the sysv shared memory:thaJeztah commentedon Jul 6, 2016
I'll close this issue, as it looks there's no bug here, but feel free to continue the discussion