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?


First off, editing sysctl.conf doesn't change the value until you either reboot, or execute:

sysctl -p

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.

mem_bytes=`awk '/MemTotal:/ { printf "%0.f",$2 * 1024}' /proc/meminfo`
mem_max=`expr $mem_bytes / 2` 
page_size=`getconf PAGE_SIZE`
shmall=`expr $mem_bytes / $page_size`
echo \# Maximum shared segment size in bytes
echo kernel.shmmax = $mem_max
echo \# Maximum number of shared memory segments in pages
echo kernel.shmall = $shmall

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.


OK, I think I know why. This is 32-bit version of Linux. Seems maximum value for shmmax in this case is 2GB.


My cobbled-together notes for Oracle show the same instructions. The only thing I do differently is first I run echo 5319303168 > /proc/sys/kernel/shmmax. I know that's the running config and the other settings would be to make it survive a reboot.

What version of Oracle? I'm following my 9i instructions and am not sure I run a version of 9i on 4.x. I'd have to look at the 10g installs since I haven't done one of them.

  • Oracle for what it's worth. Just tried updating directly, doesn't work either: [root@hklfcgis01 ~]# echo 5319303168 > /proc/sys/kernel/shmmax [root@hklfcgis01 ~]# cat /proc/sys/kernel/shmmax 1024335872 – Patrick Aug 28 '09 at 2:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.