在RHEL6.7上开启大页内存

本文介绍在RHEL6.7x64bit环境下通过配置hugepages和内存锁定限制来优化Oracle11.2.0.4.0数据库实例性能的方法。通过调整系统配置文件,实现了数据库启动时能够充分利用large pages,从而提升系统整体运行效率。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

环境:
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
********************************************************************


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值