码迷,mamicode.com
首页 > 其他好文 > 详细

Hugepages,hugetlb_shm_group与ORA-27125

时间:2016-07-25 10:35:03      阅读:229      评论:0      收藏:0      [点我收藏+]

标签:

Hugepages,hugetlb_shm_group与ORA-27125

转载:http://www.eygle.com/archives/2011/12/hugepageshugetl.html
在某些操作系统上,当启动数据库或者创建数据库时都可能出现ORA-27125错误,我在Oracle Linux 6上安装Oracle 10.2.0.1,创建数据库时就遇到了这个错误。

这个错误的解决就是修改 /proc/sys/vm/hugetlb_shm_group 文件。
以下是老杨提到过的一个问题,解决方法相同:

帮客户解决一个Linux上数据库无法启动的问题。
客户的Linux 5.6 x86-64环境,安装数据库后,启动数据库报错:ORA-27125。
Oracle文档上关于ORA-27125错误的描述为:
ORA-27125: unable to create shared memory segment
Cause: shmget() call failed
Action: contact Oracle support
查询了一下,发现问题和linux上的hugetbl有关。
解决方法也很简单,首先检查oracle用户的组信息:
[oracle@yans1 ~]$ id oracle
uid=500(oracle) gid=502(oinstall) groups=502(oinstall),501(dba)
[oracle@yans1 ~]$ 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.





Hugepages,hugetlb_shm_group与ORA-27125

标签:

原文地址:http://www.cnblogs.com/djinmusic/p/5702534.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!