Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is this max shared memory in Linux too high? This one seems default value in CentOS 5.6

cat /proc/sys/kernel/shmmax

That's 64G. Shall I change it? How much shall I change to? My server is only 1.5G

share|improve this question

migrated from May 27 '11 at 5:21

This question came from our site for pro webmasters.

Unless you have a problem with processes allocating too much SHM, there's no need to change this.

share|improve this answer

It's probably harmless, but you can change it by adding this to /etc/sysctl.conf:


That sets it to 1.5GB permanently (the setting will be loaded after each boot). To adjust it on-the-fly:

sysctl -w kernel.shmmax=1610612736

Do note that even though 64GB would be pushing it for a 1.5GB system (popular recommendations for this setting seem to hover around 80-100% of installed RAM) I guess that for some particular workloads you could want to base this parameter on the total size of the memory subsystem which, thanks to swapping and virtual memory, can be much higher than installed RAM by itself.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.