Docker Shared Memory (/dev/sdh)
Posted by Kyle Pericak in development
Docker supports shared memory. The default is only 64MB though which is TINY.
The small size became a problem during a containerized OpenStack upgrade.
This will be a really short post because I haven't done much playing with the shared memory yet, I just think its really neat.
Change the /dev/shm size on the system
This lets you change the size of shared memory on a host.
mount -o remount,size=1G /dev/shm
Update Docker Daemon's Default Shared Memory Size
This will update the default across the whole Docker service.
vi /etc/docker/daemon.json
{
"default-shm-size": "512M"
}
Set a Containers Shared Memory Size
Here's how to change it for a specific container at runtime.
docker run -it --shm-size=512M