Skip to content

Instantly share code, notes, and snippets.

@YanhaoYang
Last active December 31, 2015 17:19
Show Gist options
  • Save YanhaoYang/8019540 to your computer and use it in GitHub Desktop.
Save YanhaoYang/8019540 to your computer and use it in GitHub Desktop.
Increase shared memory in Linux
# 16 GB shared memory
$ sysctl -w kernel.shmmax=17179869184
# A page is almost always 4096 bytes except in unusual kernel configurations with "huge pages" (use getconf PAGE_SIZE to verify).
$ sysctl -w kernel.shmall=4194304
To preserve the settings between reboots, in /etc/sysctl.conf:
kernel.shmmax=17179869184
kernel.shmall=4194304
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment