We are running RHEL 4 Update 6 and I am going through an Oracle installation. As per the Oracle Installation Guide I am trying to update the shmmax value. As per the guide I have added the following line to /etc/sysctl.conf:
kernel.shmmax = 5319303168
However when I subsequently enter the following command to check:
/sbin/sysctl -a | grep shm
I can see the value is still 1024335872.
If I execute the following:
cat /proc/sys/kernel/shmmax
I can also see the value 1024335872.
I have tried rebooting the system, but that still doesn't work.
Any ideas how I can make this setting take effect?
Best Answer
First off, editing sysctl.conf doesn't change the value until you either reboot, or execute:
To have it reload the values.
You mention this is a 32-bit Linux. That puts constraints on how large you can set SHMMAX to and how big the Oracle SGA can be. See Installing Oracle9i on FC2 for more information about the limits you'll run into here. The largest generally useful setting is this:
And since the one you tried is >4GB that's why it failed altogether.
Many people seem to use some guide or Oracle's suggestions for a setting here as a magic number without actually considering whether the shared memory values really make sense for their system or not. I wrote the following little script to generate the settings for me on Linux. As written, it limits the shared memory block to 50% of total RAM, which might be light for your Oracle use; easy to adjust it to a higher percentage. I hate seeing people set this value to higher than the amount of RAM in their server.
The output from this can get written right to the end of the sysctl.conf, run "sysctl -p", and you're off with a reasonable yet safe setting.