tmpfs devshm Oracle 11G

guocun09發表於2017-10-26

Automatic Memory Management

Starting with Oracle Database 11g, the Automatic Memory Management feature requires more shared memory (/dev/shm)and file descriptors. The size of the shared memory must be at least the greater of the MEMORY_MAX_TARGET and MEMORY_TARGET parameters for each Oracle instance on the computer. If the MEMORY_MAX_TARGET parameter or the MEMORY_TARGET parameter is set to a nonzero value, and an incorrect size is assigned to the shared memory, it results in an ORA-00845 error at startup. On Linux systems, if the operating system /dev/shm mount size is too small for the Oracle system global area (SGA) and program global area (PGA), it results in an ORA-00845 error.

The number of file descriptors for each Oracle instance must be at least 512*PROCESSES. The limit of descriptors for each process must be at least 512. If file descriptors are not sized correctly, you see an ORA-27123 error from various Oracle processes and potentially Linux Error EMFILE (Too many open files)in non-Oracle processes.

To determine the amount of shared memory available, enter the following command:

# df -h /dev/shm/

Note:

The MEMORY_MAX_TARGET and MEMORY_TARGET parameters cannot be used when the LOCK_SGA parameter is enabled, or with HugePages on Linux.

On the Initialization Parameters page, note the Memory Size (SGA and PGA), which sets the initialization parameter MEMORY_TARGET or MEMORY_MAX_TARGET. The initialization parameters cannot be greater than the shared memory file system on the operating system. For example, if the shared memory file system allocation on your system is 1 GB, but you set Memory Size (MEMORY_TARGET) to 2 GB, then the following error messages are displayed during database startup:

ORA-00845: MEMORY_TARGET not supported on this system

ORA-01078: Failure in processing system parameters

In addition, if you click All Initialization Parameters and the global database name is longer than eight characters, then the database name value (in the DB_NAME parameter) is truncated to the first eight characters, and the DB_UNIQUE_NAME parameter value is set to the global name.

The workaround, if you encounter the ORA-00845 error, is to increase the /dev/shm mountpoint size.

 

Linux中預設的tmpfs  /dev/shm是記憶體的一半

修改大小

#vi /etc/fstab

tmpfs                   /dev/shm                tmpfs   defaults        0 0

修改至

tmpfs                   /dev/shm                tmpfs   size=4500m      0 0

 

修改當前大小不重啟,重新mount

# mount -o remount /dev/shm

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/25583515/viewspace-2146432/,如需轉載,請註明出處,否則將追究法律責任。

相關文章