作者:Ki丶ng-james-LBJ威_112 | 来源:互联网 | 2023-09-02 20:08
环境:RHEL6.7x64bitDB:11.2.0.4.0如下是hugepage没有启用时,数据库实例启动时的alert日志:************************Lar
环境:
RHEL 6.7 x64bit
DB:11.2.0.4.0
如下是hugepage没有启用时,数据库实例启动时的alert日志:
************************ Large Pages Information *******************
Per process system memlock (soft) limit = 64 KBTotal 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 KBRECOMMENDATION: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 byat least 753 (page size 2048 KB, total size 1506 MB) system wide toget 100% of the System Global Area allocated with large pages2. Large pages are automatically locked into physical memory.Increase the per process memlock (soft) limit to at least 1514 MB to lock100% 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 MBTotal 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
********************************************************************