Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1984306
  • 博文数量: 176
  • 博客积分: 1857
  • 博客等级: 上尉
  • 技术积分: 2729
  • 用 户 组: 普通用户
  • 注册时间: 2012-04-14 22:55
个人简介

吾生有涯,而知无涯,适当止学.循序渐进,步步提升 Talk is cheap, show me the code.

文章分类

全部博文(176)

文章存档

2019年(1)

2018年(14)

2017年(20)

2016年(31)

2015年(15)

2014年(5)

2013年(10)

2012年(80)

分类: Oracle

2016-05-31 09:34:30

OS环境:CentOS release 6.5 (Final)
Oracle版本:Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit

场景:数据库startup的时候报如下错误

*******************************************************************************
[oracle@localhost ~]$ sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on 星期二 5月 31 09:10:45 2016
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
已连接到空闲例程。
SQL> startup
ORA-27125: unable to create shared memory segment
Linux-x86_64 Error: 1: Operation not permitted
*********************************************************************************
解决方法:
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.

步骤如下:
[oracle@localhost ~]$ id oracle
uid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba)
root@localhost ~]# more /proc/sys/vm/hugetlb_shm_group 
0
[root@localhost ~]# echo 502 >/proc/sys/vm/hugetlb_shm_group
[root@localhost ~]# su - oracle
[oracle@localhost ~]$ sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on 星期二 5月 31 09:12:05 2016
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
已连接到空闲例程。
SQL> startup
ORACLE 例程已经启动。
Total System Global Area 5016387584 bytes
Fixed Size                  2027640 bytes
Variable Size            1124077448 bytes
Database Buffers         3875536896 bytes
Redo Buffers               14745600 bytes
数据库装载完毕。
数据库已经打开。
阅读(2473) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~