暂无图片
ORACLE 11G RAC Large Pages的提示
我来答
分享
吴明
2020-04-23
ORACLE 11G RAC Large Pages的提示

oracle 11g rac的2个节点,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 44 GB. For optimal performance,
prior to the next instance restart:

  1. Increase the number of unused large pages by
    at least 22529 (page size 2048 KB, total size 44 GB) 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 44 GB to lock
    100% System Global Area’s large pages into physical memory

系统环境如下:
1,操作系统是CentOS release 6.9 (Final)
2,内存:512G
[oracle@DB2 ~]$ free -m
total used free shared buffers cached
Mem: 516918 186647 330271 85459 961 129227
-/+ buffers/cache: 56457 460460
Swap: 65535 0 65535
3,系统内核参数配置如下:
[root@DB2 ~]# cat /etc/sysctl.conf
kernel.shmall = 137438953472
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.file-max = 6815744
fs.aio-max-nr = 1048576
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
kernel.core_uses_pid = 1
4,系统资源限制数配置如下:
[root@DB2 ~]# cat /etc/security/limits.conf
grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

数据库SGA当前是44G
SQL> show parameter sga

NAME TYPE VALUE


lock_sga boolean FALSE
pre_page_sga boolean FALSE
sga_max_size big integer 44G
sga_target big integer 44G

那句alert里面的提示,这是让我增加SGA吗?
还得增加large pages成22529?
这个怎么增加呢?

我来答
添加附件
收藏
分享
问题补充
7条回答
默认
最新
peiyang

你的大页就没有使用呀
配置大页需要在sysctl.conf里面进行配置,同时需要数据库实例处于ASSM模式。
Oracle Linux: Shell Script to Calculate Values Recommended Linux HugePages / HugeTLB Configuration (Doc ID 401749.1) 这个文档里面会有一个脚本,去计算hugepage大概设置为多少。
这个命令可以看大页是否在使用
grep -i huge /proc/meminfo

暂无图片 评论
暂无图片 有用 0
吴明

大页的确没在使用
[root@DB2 ~]# grep HugePage /proc/meminfo
AnonHugePages: 39731200 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
sysctl.conf里也没有vm.nr_hugepages大页的参数

那为何alert还提示large pages呢?
那是不是我只要增加SGA就行了呢

暂无图片 评论
暂无图片 有用 0
杨卓

你看alert提示建议你使用内存大页的大小=sga,其实就是提醒,不管是否配置大页,给你一个提示,如下测试环境未配置大页 sga_target = 2400M
************************ Large Pages Information *******************
Per process system memlock (soft) limit = 48 GB

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 2402 MB. For optimal performance,
prior to the next instance restart:

  1. Increase the number of unused large pages by
    at least 1201 (page size 2048 KB, total size 2402 MB) system wide to
    get 100% of the System Global Area allocated with large pages

暂无图片 评论
暂无图片 有用 0
田弼元

只是提示你配置大页内存,不是报错,可以不理会。但如果SGA分配了比较大的话,我还是建议配置大页内存的

暂无图片 评论
暂无图片 有用 0
始于脚下

你系统配置文件里面没有vm.nr_hugepages参数,应该之前配置过大页特性,告警提示是这个参数至少配置为22529,要规避这个问题有两个建议:1、系统配置文件里配置相关参数,并使之生效;2、如果不用大页特性,将系统参数配置清理后,重启数据库,消除大页配置信息。

暂无图片 评论
暂无图片 有用 0
peiyang

操作系统内核参数中设置vm.nr_hugepages参数
这个参数在ASSM模式中需要大于sga_max_size的大小,然后重启数据库实例就会使用。

暂无图片 评论
暂无图片 有用 0
lscomeon

提示你配置使用大页,不是让增加sga

暂无图片 评论
暂无图片 有用 0
回答交流
提交
问题信息
请登录之后查看
邀请回答
暂无人订阅该标签,敬请期待~~
暂无图片墨值悬赏