在一台dell 2950 ,cpu 2.66 4核 × 2, 記憶體16G 上, RHEL 4.4 64位,oracle 10.2.0.3 64bit, 設定 sga_target > 6G 出錯。 SQL> startup ORA-27102: out of memory Linux-x86_64 Error: 12: Cannot allocate memory 檢查有幾個可能出現問題的地方:
- sga_max_size
-
Set shmall equal to shmmax divided by the page size.
FYI: The page size can be seen using the following command:
$ getconf PAGE_SIZE
-
The "ulimit -l" parameter is not set to allow the amount of memory (sga size) being requested to be locked.
oracle user execute: ulimit -l unlimited
Refer to the "man" page for ulimit –l
max locked memory (kbytes, -l) unlimited
也可以修改 vi /etc/security/limits.conf 增加: * soft memlock unlimited
* hard memlock unlimited * 也可修改為對應的安裝oracle 使用者 另外,需要檢查: cat /etc/sysctl.conf kernel.core_uses_pid = 1
kernel.shmmax=10737418240
kernel.sem=250 32000 100 128
# kernel.shmall=2500000
kernel.shmall=4194304