- Shared memory Size
Detailed Message
This is a prerequisite condition to test whether the OS kernel parameter "shmmax" is properly set.(more details)
Expected Value
:Current=4294967296; Configured=4294967296
Actual Value
:Current=2147483648; Configured=2147483648
shmmax & shmall
For Oracle 11g, the following kernel parameters have to be set to values greater than or equal to the recommended values which can be changed in the proc file system:
- shmmax
- The maximum size of a shared memory segment
- shmall[2]
- This parameter sets the total amount of shared memory pages that can be used system wide. Hence, shmall should always be at least
- ceil ( shmmax / PAGE_SIZE).
#echo "4294967296" >/proc/sys/kernel/shmmax
#echo "1048576" >/proc/sys/kernel/shmall
would set it to 4GB. Note that we also set shmall to be 1M pages. You can find the size of page by using:
# getconf PAGE_SIZE
4096
Also note that this needs to be done after each boot. So, you want to control this at boot by using sysctl. You can place entries in /etc/sysctl.conf like:
kernel.shmmax=4294967296
kernel.shmall=1048576
which will be processed at your next reboot and set it to 4GB, 4 * 1024*1024*1024. Larger values are supported. Check the manuals that came with your Linux distribution[3].
More Information
Oracle uses shared memory for implementing the SGA, which needs to be visible to all database sessions. On OTN, it recommends setting shmmax to be:
- SHMMAX= max value of shared memory segment = 0.5 * size of physical memory
For servers running Oracle Fusion Applications, shared memory are also needed for Java heap. It is recommended that your shared memory segment be larger than the Java heap size.
To determine your physical memory size, you use:
- #cat /proc/meminfo | grep MemTotal
MemTotal: 148425832 kB
- To view current settings, run command:
- # more /proc/sys/kernel/shmmax
- To set it to a new value for this running session, which takes effect immediately, run command:
- # echo 4294967296 > /proc/sys/kernel/shmmax
- To have the changes to survive reboot, modify the /etc/sysctl.conf file:
- kernel.shmmax = 4294967296
References
- Installing Oracle Database 11g Release 2
- Meaning of SHMALL kernel variable
- Verifying Kernel Parameters (Redhat)
- How I Simplified Oracle Database Installation on Oracle Linux (Good)
- Kernel Configuration
- Linux Tuning Parameters
No comments:
Post a Comment