重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 3476|回复: 3
打印 上一主题 下一主题

[安装] oel7.4 上dbca报错 ORA-27125 解决方法

[复制链接]
跳转到指定楼层
楼主
发表于 2017-8-21 18:44:29 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
环境:oel 7.4 +oracle 10.2.0.1 64bit

dbca创建数据库时,直接报 ORA-27125的错误,以为是共享内存段不够,减小到shm以下,也不行.
错误如下:
ORA-27125: unable to create shared memory segment
Linux-x86_64 Error: 1: Operation not permitted
在某些操作系统上,当启动数据库或者创建数据库时都可能出现ORA-27125错误,我在Oracle Linux 7.4 上安装Oracle 10.2.0.1,创建数据库时就遇到了这个错误。

这个错误的解决就是修改 /proc/sys/vm/hugetlb_shm_group 文件。
解决方法也很简单,首先检查oracle用户的组信息:
[oracle ~]$ id oracle
uid=500(oracle) gid=502(oinstall) groups=502(oinstall),501(dba)
[oracle ~]$ more /proc/sys/vm/hugetlb_shm_group
0
下面用root执行下面的命令,将dba组添加到系统内核中:
# echo 501 > /proc/sys/vm/hugetlb_shm_group
然后重新安装数据库,问题消失。
那么hugetlb_shm_group组是什么呢?以下是解释:
hugetlb_shm_group contains group id that is allowed to create SysV shared memory segment using hugetlb page
这里反复提到了HugePage,以下是关于HugePage的说明和解释:
When a process uses some memory, the CPU is marking the RAM as used by that process. For efficiency, the CPU allocate RAM by chunks of 4K bytes (it's the default value on many platforms). Those chunks are named pages. Those pages can be swapped to disk, etc.
Since the process address space are virtual, the CPU and the operating system have to remember which page belong to which process, and where it is stored. Obviously, the more pages you have, the more time it takes to find where the memory is mapped. When a process uses 1GB of memory, that's 262144 entries to look up (1GB / 4K). If one Page Table Entry consume 8bytes, that's 2MB (262144 * 8) to look-up.
Most current CPU architectures support bigger pages (so the CPU/OS have less entries to look-up), those are named Huge pages (on Linux), Super Pages (on BSD) or Large Pages (on Windows), but it all the same thing.

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

沙发
 楼主| 发表于 2017-8-21 20:42:54 | 只看该作者
这个还不能高兴太早,修改了这个值:
echo 1001 > /proc/sys/vm/hugetlb_shm_group
下次重启操作系统,你就发现:

more  /proc/sys/vm/hugetlb_shm_group
又为0了,怎么办.
回复 支持 反对

使用道具 举报

板凳
 楼主| 发表于 2017-8-22 15:28:51 | 只看该作者
这个经过测试,oel7.4上安装11g数据库11.2.0.4,不存在这个问题.
回复 支持 反对

使用道具 举报

地板
 楼主| 发表于 2017-8-27 20:35:56 | 只看该作者
在rhel.7.4上安装oracle 10.2.0.1后,每次重起后,
more  /proc/sys/vm/hugetlb_shm_group又变为了 0,解决办法为:

修改/etc/sysctl.conf
增加
vm.hugetlb_shm_group=1001
之后,再次重起,就不会修改回去了.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-5-8 15:22 , Processed in 0.097560 second(s), 19 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表