[20191202]关于hugepages相关问题.txt --//上午在测试hugepages相关问题时遇到一个问题,自己以前疏忽了,就是在use_large_pages=true的情况下. --//如果在/etc/sysctl.conf参数文件中vm.nr_hugepages定义不够大,即使定义vm.nr_overcommit_hugepages足够. --//也不会向vm.nr_overcommit_hugepages借用内存,导致进入混合模式. --//通过例子说明: 1.环境: SCOTT@book> @ ver1 PORT_STRING VERSION BANNER ------------------------------ -------------- -------------------------------------------------------------------------------- x86_64/Linux 2.4.xx 11.2.0.4.0 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production SCOTT@book> alter system set use_large_pages=true scope=spfile; System altered. # grep "^vm.nr" /etc/sysctl.conf vm.nr_hugepages = 104 vm.nr_overcommit_hugepages = 1000 # sysctl -p 2.测试: --//重启数据库看看,检查alert文件发现: Adjusting the default value of parameter parallel_max_servers from 480 to 170 due to the value of parameter processes (200) Starting ORACLE instance (normal) ************************ Large Pages Information ******************* Per process system memlock (soft) limit = 51 GB Total Shared Global Region in Large Pages = 208 MB (33%) Large Pages used by this instance: 104 (208 MB) Large Pages unused system wide = 0 (0 KB) Large Pages configured system wide = 104 (208 MB) Large Page size = 2048 KB RECOMMENDATION: Total System Global Area size is 618 MB. For optimal performance, prior to the next instance restart: 1. Increase the number of unused large pages by at least 205 (page size 2048 KB, total size 410 MB) system wide to get 100% of the System Global Area allocated with large pages ******************************************************************** --//可以发现仅仅使用定义vm.nr_hugepages = 104. $ grep -i page /proc/meminfo AnonPages: 165700 kB PageTables: 18904 kB AnonHugePages: 0 kB HugePages_Total: 104 HugePages_Free: 49 HugePages_Rsvd: 49 HugePages_Surp: 0 Hugepagesize: 2048 kB $ ps -ef | grep pmo[n] | awk '{print $2}' | xargs -IQ grep SYSV /proc/Q/numa_maps 60000000 default file=/SYSV00000000\040(deleted) huge dirty=1 mapmax=25 N0=1 60c00000 default file=/SYSV00000000\040(deleted) huge 6a400000 default file=/SYSV00000000\040(deleted) huge 6c400000 default file=/SYSV00000000\040(deleted) huge 6cc00000 default file=/SYSV00000000\040(deleted) huge --//仅仅5个共享内存段使用hugepages. 6d000000 interleave:0-1 file=/SYSV00000000\040(deleted) dirty=785 mapmax=25 active=245 N0=400 N1=385 86800000 interleave:0-1 file=/SYSVe8a8ec10\040(deleted) dirty=1 mapmax=25 N1=1 $ sysresv IPC Resources for ORACLE_SID "book" : Shared Memory: ID KEY 413040641 0x00000000 413073410 0x00000000 413106179 0x00000000 413138949 0x00000000 413171718 0x00000000 413204487 0x00000000 413237256 0xe8a8ec10 Semaphores: ID KEY 335151104 0x6aa88594 Oracle Instance alive for sid "book" --//也就是在use_large_pages=true的情况下不会向vm.nr_overcommit_hugepages参数借用内存. 3.测试: SYS@book> alter system set use_large_pages=only scope=spfile; System altered. # grep "^vm.nr" /etc/sysctl.conf vm.nr_hugepages = 104 vm.nr_overcommit_hugepages = 204 # sysctl -p .. SYS@book> startup ORA-27137: unable to allocate large pages to create a shared memory segment Linux-x86_64 Error: 12: Cannot allocate memory Additional information: 2097152 --//104+204 = 308,还不够大. # grep "^vm.nr" /etc/sysctl.conf vm.nr_hugepages = 104 vm.nr_overcommit_hugepages = 1000 # sysctl -p .. SYS@book> startup ORACLE instance started. Total System Global Area 643084288 bytes Fixed Size 2255872 bytes Variable Size 205521920 bytes Database Buffers 427819008 bytes Redo Buffers 7487488 bytes Database mounted. Database opened. --//alert输出如下: Adjusting the default value of parameter parallel_max_servers from 480 to 170 due to the value of parameter processes (200) Starting ORACLE instance (normal) ************************ Large Pages Information ******************* Parameter use_large_pages = ONLY Per process system memlock (soft) limit = 51 GB Large Pages unused system wide = 308 (616 MB) Large Pages configured system wide = 308 (616 MB) Large Page size = 2048 KB ERROR: Failed to allocate shared global region with large pages, unix errno = 12. Aborting Instance startup. ORA-27137: unable to allocate Large Pages to create a shared memory segment ACTION: Total System Global Area size is 624 MB. Prior to next instance restart: 1. Increase the number of unused large pages (page size 2048 KB) to at least 312 (624 MB) to allocate 100% System Global Area with large pages. ******************************************************************** --//以上是报ORA-27137的情况. Mon Dec 02 15:59:56 2019 Adjusting the default value of parameter parallel_max_servers from 480 to 170 due to the value of parameter processes (200) Starting ORACLE instance (normal) ************************ Large Pages Information ******************* Parameter use_large_pages = ONLY Per process system memlock (soft) limit = 51 GB Total Shared Global Region in Large Pages = 618 MB (100%) Large Pages used by this instance: 309 (618 MB) Large Pages unused system wide = 0 (0 KB) Large Pages configured system wide = 309 (618 MB) Large Page size = 2048 KB ******************************************************************** $ ps -ef | grep pmo[n] | awk '{print $2}' | xargs -IQ grep SYSV /proc/Q/numa_maps 60000000 default file=/SYSV00000000\040(deleted) huge dirty=1 mapmax=25 N0=1 60c00000 default file=/SYSV00000000\040(deleted) huge dirty=37 mapmax=25 N0=30 N1=7 86800000 interleave:0-1 file=/SYSVe8a8ec10\040(deleted) huge dirty=1 mapmax=25 N0=1 $ sysresv IPC Resources for ORACLE_SID "book" : Shared Memory: ID KEY 413401089 0x00000000 413433858 0x00000000 413466627 0xe8a8ec10 Semaphores: ID KEY 335314944 0x6aa88594 Oracle Instance alive for sid "book" 3.总结: --//设置内核参数vm.nr_overcommit_hugepages ,仅仅在use_large_pages=only的情况下才会有效.
[20191202]关于hugepages相关问题.txt
来源:这里教程网
时间:2026-03-03 14:40:14
作者:
编辑推荐:
- [20191202]关于hugepages相关问题.txt03-03
- oracle表的类型03-03
- ORACLE的游标共享03-03
- Oracle date 类型比较和String比较03-03
- OPPO用户怎么让手机变流畅?花1分钟关闭这4个设置,瞬间变流畅03-03
- 4 个概念,1 个动作,让应用管理变得更简单03-03
- Oracle SCN机制详细解读03-03
- recover database using backup controlfile理解03-03
下一篇:
相关推荐
-
雷神推出 MIX PRO II 迷你主机:基于 Ultra 200H,玻璃上盖 + ARGB 灯效
2 月 9 日消息,雷神 (THUNDEROBOT) 现已宣布推出基于英
-
制造商 Musnap 推出彩色墨水屏电纸书 Ocean C:支持手写笔、第三方安卓应用
2 月 10 日消息,制造商 Musnap 现已在海外推出一款 Oce
热文推荐
- Oracle date 类型比较和String比较
Oracle date 类型比较和String比较
26-03-03 - OPPO用户怎么让手机变流畅?花1分钟关闭这4个设置,瞬间变流畅
OPPO用户怎么让手机变流畅?花1分钟关闭这4个设置,瞬间变流畅
26-03-03 - 4 个概念,1 个动作,让应用管理变得更简单
4 个概念,1 个动作,让应用管理变得更简单
26-03-03 - 如何分析及处理 Flink 反压?
如何分析及处理 Flink 反压?
26-03-03 - 基于 Flink 的实时数仓生产实践
基于 Flink 的实时数仓生产实践
26-03-03 - 中报背后的阿里影业:互联网影视如何沉淀平台方法论
中报背后的阿里影业:互联网影视如何沉淀平台方法论
26-03-03 - oracle 报大小写错误
oracle 报大小写错误
26-03-03 - oracle 函数
oracle 函数
26-03-03 - oracle
oracle
26-03-03 - 【感恩节福利】你说谢谢我送礼,小米音箱、手机话费、京东购物卡等好礼等你来拿!
