Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

share|improve this question

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

This question came from our site for pro webmasters.

2 Answers 2

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:

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.

share|improve this answer

Your Answer

 
discard

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