Shared Memory Cheat Sheet

Listing all shared memories
ipcs -a
Deleting all shared memories with pattern “0xae”
for i in `ipcs -m | sed "s/ .*$//" | grep 0xae`;do sudo ipcrm -M $i;done
Getting current system setting
sudo /sbin/sysctl kernel.shmmax # max for each block
sudo /sbin/sysctl kernel.shmall # max for total for the system
Setting current system setting
sudo /sbin/sysctl -w kernel.shmmax=107374182400
sudo /sbin/sysctl -w kernel.shmall=107374182400
Persisting in /etc/sysctl.conf
vi /etc/sysctl.conf
kernel.shmmax = 1073741824
kernel.shmall = 4294967296