在大内存的服务器上部署 Oracle 时都需要配置 hugepage,配置后,可以通过/proc/meminfo 确认大页的生效情况,如下:
$ grep HugePages /proc/meminfo
AnonHugePages: 0 kB
HugePages_Total: 61461
HugePages_Free: 61461
HugePages_Rsvd: 0
HugePages_Surp: 0
也可以通过数据库的 alert log 日志确认大页的信息,比如在 11g 的 alert log 中会显示如下信息:
Tue Feb 10 15:40:58 2015
Starting ORACLE instance (normal)
************************ Large Pages Information *******************
Per process system memlock (soft) limit = 48 GB
Total Shared Global Region in Large Pages = 1026 MB (100%)
Large Pages used by this instance: 513 (1026 MB)
Large Pages unused system wide = 1 (2048 KB)
Large Pages configured system wide = 514 (1028 MB)
Large Page size = 2048 KB
********************************************************************
但是在 Oracle 12c 之后的版本,大页的信息有改变,如下:
**********************************************************************
Tue Feb 10 15:26:02 2015
Dump of system resources acquired for SHARED GLOBAL AREA (SGA)
Tue Feb 10 15:26:02 2015
Per process system memlock (soft) limit = 48G
Tue Feb 10 15:26:02 2015
Expected per process system memlock (soft) limit to lock
SHARED GLOBAL AREA (SGA) into memory: 1026M
Tue Feb 10 15:26:02 2015
Available system pagesizes:
4K, 2048K
Tue Feb 10 15:26:02 2015
Supported system pagesize(s):
Tue Feb 10 15:26:02 2015
PAGESIZE AVAILABLE_PAGES EXPECTED_PAGES ALLOCATED_PAGES ERROR(s)
Tue Feb 10 15:26:02 2015
4K Configured 5 5 NONE
Tue Feb 10 15:26:02 2015
2048K 514 513 513 NONE
Tue Feb 10 15:26:02 2015
**********************************************************************
如果大页的信息配置的不正确,也会给到提示信息,从而辅助我们进行修复:
**********************************************************************
2024-06-17T20:18:11.205055+08:00
Dump of system resources acquired for SHARED GLOBAL AREA (SGA)
2024-06-17T20:18:11.205120+08:00
Per process system memlock (soft) limit = 64K
2024-06-17T20:18:11.205156+08:00
Expected per process system memlock (soft) limit to lock
SHARED GLOBAL AREA (SGA) into memory: 120G
2024-06-17T20:18:11.205228+08:00
Available system pagesizes:
4K, 2048K
2024-06-17T20:18:11.205295+08:00
Supported system pagesize(s):
2024-06-17T20:18:11.205329+08:00
PAGESIZE AVAILABLE_PAGES EXPECTED_PAGES ALLOCATED_PAGES ERROR(s)
2024-06-17T20:18:11.205365+08:00
4K Configured 9 31457289 NONE
2024-06-17T20:18:11.205434+08:00
2048K 61461 61441 0 NONE
2024-06-17T20:18:11.205469+08:00
RECOMMENDATION:
2024-06-17T20:18:11.205504+08:00
1. Increase per process memlock (soft) limit to at least 120GB
to lock 100% of SHARED GLOBAL AREA (SGA) pages into physical memory
2024-06-17T20:18:11.205571+08:00
比如我们这里就是因为/etc/security/limits.conf 没有配置正确导致大页异常,没有使用,所以最开始HugePages_Total = HugePages_Free
。
Large Pages Information in the Alert Log (Doc ID 1392543.1)
Large Pages Information had been changed in the Oracle Database 12c Alert Log (Doc ID 1969379.1)
版权声明:本文为博主原创文章,未经博主允许不得转载。
- 上一篇:聊聊我眼中的 OceanBase
- 下一篇:Mac 破解zip压缩文件密码