在一台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
* 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
kernel.shmmax=10737418240
kernel.sem=250 32000 100 128
# kernel.shmall=2500000
kernel.shmall=4194304