在RHEL6.7上开启大页内存

环境:
RHEL 6.7 x64bit
DB:11.2.0.4.0

以下是hugepage没有启用时,数据库实例启动时的alert日志:
************************ Large Pages Information *******************
Per process system memlock (soft) limit = 64 KB


Total Shared Global Region in Large Pages = 0 KB (0%)


Large Pages used by this instance: 0 (0 KB)
Large Pages unused system wide = 0 (0 KB)
Large Pages configured system wide = 0 (0 KB)
Large Page size = 2048 KB


RECOMMENDATION:
  Total System Global Area size is 1506 MB. For optimal performance,
  prior to the next instance restart:
  1. Increase the number of unused large pages by
 at least 753 (page size 2048 KB, total size 1506 MB) system wide to
  get 100% of the System Global Area allocated with large pages
  2. Large pages are automatically locked into physical memory.
 Increase the per process memlock (soft) limit to at least 1514 MB to lock
 100% System Global Area's large pages into physical memory
********************************************************************


根据如上信息,
在/etc/sysctl.conf中加入:
vm.nr_hugepages = 753

在:/etc/security/limits.conf中加入:
*   soft   memlock    1550336
*   hard   memlock    1550336
注:1550336=1514MB*1024


重启os以后,startup 时的数据库实例日志以下:
************************ Large Pages Information *******************
Per process system memlock (soft) limit = 1514 MB


Total Shared Global Region in Large Pages = 1506 MB (100%)


Large Pages used by this instance: 753 (1506 MB)
Large Pages unused system wide = 0 (0 KB)
Large Pages configured system wide = 753 (1506 MB)
Large Page size = 2048 KB
********************************************************************