Shared Memory Cheat Sheet

The Aerospike Knowledge Base has moved to https://support.aerospike.com. Content on https://discuss.aerospike.com is being migrated to either https://support.aerospike.com or https://docs.aerospike.com. Maintenance on articles stored in this repository ceased on December 31st 2022 and this article may be stale. If you have any questions, please do not hesitate to raise a case via https://support.aerospike.com.

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