使用Huge Pages后数据库启动失败

在配置Huge Pages后,启动数据库反应很慢,数据库无法正常打开。
检查告警日志,发现下面的错误:

Fri DEC 30 13:38:11 2011
Starting ORACLE instance (normal)
****************** Huge Pages Information *****************
Huge Pages memory pool detected (total: 34596 free: 34596)
Memlock LIMIT too small: 67584000000 TO accommodate segment SIZE: 68587356160
Huge Pages allocation failed (free: 34596 required: 32705)
Allocation will continue WITH DEFAULT/smaller page SIZE
**********************************************************

显然这是配置中设置的空间不足所致,手工修改limits.conf文件:

[oracle@hpc ~]$ more /etc/security/limits.conf 
# /etc/security/limits.conf
#
#Each line describes a LIMIT FOR a USER IN the form:
#
#<domain>        <type>  <item>  <value>
#
#Where:
#<domain> can be:
#        - an USER name
#        - a GROUP name, WITH @GROUP syntax
#        - the wildcard *, FOR DEFAULT entry
#        - the wildcard %, can be also used WITH %GROUP syntax,
#                 FOR maxlogin LIMIT
#
#<type> can have the two VALUES:
#        - "soft" FOR enforcing the soft limits
#        - "hard" FOR enforcing hard limits
#
#<item> can be one OF the following:
#        - core - limits the core file SIZE (KB)
#        - DATA - MAX DATA SIZE (KB)
#        - fsize - maximum filesize (KB)
#        - memlock - MAX locked-in-memory address SPACE (KB)
#        - nofile - MAX NUMBER OF OPEN files
#        - rss - MAX resident SET SIZE (KB)
#        - stack - MAX stack SIZE (KB)
#        - cpu - MAX CPU TIME (MIN)
#        - nproc - MAX NUMBER OF processes
#        - AS - address SPACE LIMIT (KB)
#        - maxlogins - MAX NUMBER OF logins FOR this USER
#        - maxsyslogins - MAX NUMBER OF logins ON the system
#        - priority - the priority TO run USER process WITH
#        - locks - MAX NUMBER OF file locks the USER can hold
#        - sigpending - MAX NUMBER OF pending signals
#        - msgqueue - MAX memory used BY POSIX message queues (bytes)
#        - nice - MAX nice priority allowed TO raise TO VALUES: [-20, 19]
#        - rtprio - MAX realtime priority
#
#<domain>      <type>  <item>         <value>
#
 
#*               soft    core            0
#*               hard    rss             10000
#@student        hard    nproc           20
#@faculty        soft    nproc           20
#@faculty        hard    nproc           50
#ftp             hard    nproc           0
#@student        -       maxlogins       4
 
# END OF file
oracle              soft    nproc   16384
oracle              hard    nproc   16384
oracle              soft    nofile  65536
oracle              hard    nofile  65536
oracle              soft    memlock 268435456
oracle              hard    memlock 268435456

不过修改后发现并未生效,启动数据库时现象依旧,错误信息依旧,记得配置这个参数是不需要重启服务器的,不过既然不生效,只好重启一下系统。
系统重启后,数据库启动正常,告警日志输出如下:

Starting ORACLE instance (normal)
****************** Huge Pages Information *****************
Huge Pages memory pool detected (total: 32768 free: 32768)
DFLT Huge Pages allocation successful (allocated: 32705)
***********************************************************

看来memlock参数的修改还是需要重启才能生效。

This entry was posted in ORACLE and tagged , , . Bookmark the permalink.

One Response to 使用Huge Pages后数据库启动失败

Leave a Reply

Your email address will not be published. Required fields are marked *