Oracle使用共享内存和信号灯之间的通信过程以及SGA(系统全局区)。共享内存和信号量有一定的要求。当Oracle实例的时候,它分配的一定比例建立SGA的主内存。如果共享内存或信号灯设置不正确,那么它提供有关共享内存或信号灯的错误。
以下是运行一个小规模的Oracle数据库的共享内存和信号灯的推荐值。在Unix内核级别设置这些值。
以下是运行一个小规模的Oracle数据库的共享内存和信号灯的推荐值。在Unix内核级别设置这些值
Shared Memory Requirements on Unix:
UNIX操作系统的共享内存功能由Oracle.The系统全局区(SGA)的驻留在共享内存中,因此,必须提供给每个Oracle进程,以解决整个SGA共享内存。
共享内存和信号参数的定义
SHMMAX = The maximum size(in bytes) of a single shared memory segment.
SHMMIN = The minimum size(in bytes) of a single shared memory segment.
SHMMNI = The number of shared memory identifiers.
SHMSEG = The maximum number of shared memory segments that can be attached by
a process.
SEMMNS = The number of semaphores in the system.
SEMMNI = The number of semaphore set identifiers in the system; determines the
number of semaphore sets that can be created at any one time.
SEMMSL = The maximum number of sempahores that can be in one semaphore set.
它应该是大小相同的Oracle进程的最大数量
(The PROCESSES parameter in the init.ora file).
Recommended Semaphore and Shared Memory Parameters
Operating System Shared Memory Parameters Semaphore
---------------- ------------------------ ---------
Sun OS SHMSIZE = 32768 SEMMNS = 200
SHMMNI = 50 SEMMNI = 50
Solaris SHMMAX = 8388608(or larger than max SGA) SEMMNS = 200
SHMSEG = 20 SEMMSL = 50
SHMMNI = 100 SEMMNI = 70
HP/UX SHMMAX = 0x4000000 (64 Mb) SEMMNS = 128
SHMSEG = 12 SEMMNI = 10
Digital Unix SHMMAX = 4194304 SEMMNS = 60
(DEC Alpha OSF/1) SHMSEG = 32 SEMMSL = 25
Please see Note:169706.1 for current information on all supported platforms.
设置Shared Memory和信号量参数
共享内存和信号参数的值必须设置在您的操作系统(OS)内核配置文件。该文件的位置是特定端口。注:为你的系统上它的名称和位置1010913.6。
检查你当前的共享内存和信号量配置,可以使用如下命令:
% sysdef | more
Example on HP-UX (relevant sections only):
------------------------------------------
Semaphore Related Parameters
maximum value for semaphores(semaem)= 16384
Semaphore map(semmap)= 4098
number of semaphore identifiers(semmni) = 4096
total number of semaphores in the system(semmns) = 8192
number of semaphore undo structures(semmnu) = 1536
semaphore undo entries per process(semume) = 512
semaphore maximum value(semvmx) = 32767
Shared Memory Related Parameters
maximum shared memory segment size in bytes(shmmax) = 536870912
minimum shared memory segment size in bytes(shmmin) = 1
maximum shared memory segments in system (shmmni) = 512
maximum shared memory segments per process(shmseg) = 512
NOTE: The SHMMAX is quite large on this system as there are 8 instances
running on this system.
修改你的共享内存和信号量参数:
1. Shut down any running Oracle instances
2. Locate the kernel configuration file for your OS
3. Make the necessary changes using the system utilities or your
favorite editor. System utilities include:
OS Utility
--- -------
HP-UX SAMS
AIX SMIT
Solaris ADMINTOOL
4. Reconfigure the kernel.
5. Reboot your machine.
6. Restart your Oracle instances
Example on Solaris:
-------------------
The kernel parameters are maintained in the /etc/system file
or through use of project files.
set shmsys:shminfo_shmmax=8388608
set shmsys:shminfo_shmmin=1
set shmsys:shminfo_shmmni=100
set shmsys:shminfo_shmseg=20
set semsys:seminfo_semmns=200
set semsys:seminfo_semmni=70
Note:429191.1 - Kernel Setup for Solaris using Project Files
Oracle, Shared Memory, and SGA Size
有oracle的init.ora参数影响SGA的大小可以修改。这些设置这些参数,在与操作系统共享内存和信号参数,可以影响系统和Oracle的性能。