Saturday, March 28, 2020

Shared Memory Calculations and Configurations

System defined limits for shared memory calculations and configurations.


QUESTION 1
===========

What is the maximum value of SHMMAX for a 32-bit (x86) Linux system?


ANSWER 1
============

Oracle Global Customer Support officially recommends a " maximum" for SHMMAX of just less than 4Gb, 4294967295.

The maximum size of a shared memory segment is limited by the size of the available user address space. On 32-bit systems, this is a theoretical 4GB. The maximum possible value for SHMMAX is just less than 4Gb, or 4294967295. Setting SHMMAX to 4GB exactly will give you 0 bytes as max, as this value is interpreted as a 32-bit number and it wraps around.


QUESTION 2
===========

What is the maximum value of SHMMAX for a 64-bit (x86-64) Linux system?

ANSWER 2
===========

Oracle Global Customer Support officially recommends a " maximum" for SHMMAX of "1/2 of physical RAM".


check  /etc/sysctl.conf and edit /etc/sysctl.conf

and ensure the following lines are present:
kernel.shmall = 18350080
kernel.shmmax = 75161927680
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128

DBCA Error: ORA-27104: system-defined limits for shared memory was
misconfigured

 Fix: Increase kernel.shmmax & kernel.shmall based on your Server RAM. 
 Maximum SHMMAX values for Linux
x86 and x86-64

Example for x86_64 Server with 32GB RAM: (1/2 of physical RAM)

shmmax=34359738368 (=16*1024*1024*1024),
shmall=8388608 (=16*1024*1024*1024 / 4096) – 4096 is page size

restart or /sbin/sysctl.conf -p


 Oracle Metalink Note [ID 567506.1]