ORA-27125: unable to create shared memory segment的解决方法(转)
ORA-27125: unable to create shared memory segment的解決方法(轉(zhuǎn))
原文:http://www.eygle.com/rss/20111202.html? http://www.itpub.net/thread-1739835-1-1.html
在某些操作系統(tǒng)上,當(dāng)啟動(dòng)數(shù)據(jù)庫(kù)或者創(chuàng)建數(shù)據(jù)庫(kù)時(shí)都可能出現(xiàn)ORA-27125錯(cuò)誤,我在Oracle Linux 6上安裝Oracle 10.2.0.1,創(chuàng)建數(shù)據(jù)庫(kù)時(shí)就遇到了這個(gè)錯(cuò)誤。
這個(gè)錯(cuò)誤的解決就是修改 /proc/sys/vm/hugetlb_shm_group 文件。
以下是老楊提到過(guò)的一個(gè)問(wèn)題,解決方法相同:
幫客戶解決一個(gè)Linux上數(shù)據(jù)庫(kù)無(wú)法啟動(dòng)的問(wèn)題。
客戶的Linux 5.6 x86-64環(huán)境,安裝數(shù)據(jù)庫(kù)后,啟動(dòng)數(shù)據(jù)庫(kù)報(bào)錯(cuò):ORA-27125。
Oracle文檔上關(guān)于ORA-27125錯(cuò)誤的描述為:
ORA-27125: unable to create shared memory segment
Cause: shmget() call failed
Action: contact Oracle support
查詢了一下,發(fā)現(xiàn)問(wèn)題和linux上的hugetbl有關(guān)。
解決方法也很簡(jiǎn)單,首先檢查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執(zhí)行下面的命令,將dba組添加到系統(tǒng)內(nèi)核中:
# echo 501 > /proc/sys/vm/hugetlb_shm_group
然后啟動(dòng)數(shù)據(jù)庫(kù),問(wèn)題消失。
但以上這種方式在重啟操作系統(tǒng)后失效, /proc/sys/vm/hugetlb_shm_group又變?yōu)榱?,建議采用以下方式解決:
加入vm.hugetlb_shm_group = 501 到/etc/sysctl.conf中來(lái)解決:
# vi /etc/sysctl.conf
加入如下的內(nèi)容,其中501為dba組號(hào),需要根據(jù)你實(shí)際的情況進(jìn)行改變。
vm.hugetlb_shm_group = 501
# sysctl -p
那么hugetlb_shm_group組是什么呢?以下是解釋:
hugetlb_shm_group contains group id that is allowed to create SysV shared memory segment using hugetlb page
這里反復(fù)提到了HugePage,以下是關(guān)于HugePage的說(shuō)明和解釋:
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.
轉(zhuǎn)載于:https://blog.51cto.com/linuxzqdn/1763508
總結(jié)
以上是生活随笔為你收集整理的ORA-27125: unable to create shared memory segment的解决方法(转)的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: MAT使用入门
- 下一篇: 实现一个div在浏览器水平居中