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

cat /proc/sys/kernel/shmmax
68719476736

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

link|improve this question
feedback

migrated from webmasters.stackexchange.com May 27 '11 at 5:21

This question came from our site for pro webmasters.

2 Answers

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

link|improve this answer
feedback

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

kernel.shmmax=1610612736

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown