oracle内存粒度
The granule size is determined based on the amount of memory requested at the instance startup. It is based on the SGA_MAX_SIZE. If MEMORY_MAX_TARGET is specified, then SGA_MAX_SIZE defaults to MEMORY_MAX_TARGET for the purpose of sizing the granule. Once set, the granule size does not change for the life of the instance.
The granule sizes at the time of writing, are:
三,内存粒度查询
You can check the granule size that is currently set for your database instance by running the following SQL statement as SYSDBA
SQL> select bytes from v$sgainfo where name like 'Granule Size';
There is a 16MB granule size maximum on 32-bit platforms. This applies even if the granule size is manually overridden.
四,内存粒度的重要性
The SGA memory components are sized as multiples of granules.
The components are:
- shared pool
- buffer cache (plus different size buffer caches)
- redo log buffer
- java pool
- streams pool
- large pool
There can be no component of size less than one granule. The minimum of some components can be greater than one granule (and rounded up to the nearest granule boundary). For example the Buffer Cache minimum will be 4MB*num_cpus, and can exceed 1 granule.
If you set a value in the spfile that is not a multiple of the granule size, the actual size allocated will be rounded up to the nearest granule. This can become important in large SGA's.
For example, if your SGA in 11GR1 is 70G, and you set the java_pool_size to 150M in the spfile, the actual allocation for the java_pool_size will be rounded up to 512M.
The significance of this granule sizing is the following:
The SGA (actually shared, streams and large pool) gets divided in subpools, a maximum of 7 depending on the number of processors and the SGA size.
Typically, 16 processors (cores) will have 4 subpools, 24 processors will have 6 subpools, and 25 or more processors will have 7 subpools. The number of subpools is derived by an internal algorithm.
In addition, in 10g and 11g, the shared pool and streams pool subpools are further divided into 4 'durations' ("instance", "session", "cursor", and "execution").
(It is possible the number of durations may change in 12g.)
So with over 24 processors, there would be 28 subpools in the shared pool and likely another 28 in the streams pool, each with a minimum of 1 granule.
If you add to that the granules for the other SGA pools, the memory usage could be over 60 granules even before any memory component exceeds 1 granule in size.
If the derived granule size is 256MB, the resulting memory requirement becomes over 15 GB just to start up the instance. This scenario can cause an ORA-4031 during or soon after startup.
Oracle Support can usually offer solutions to this by manually reducing the granule size or by reducing the processor count used in the subpool algorithm.
The patch for unpublished Bug 8813366 reduces the granule sizing to help offset this error.
Another place where granule sizes are taken into consideration, is with Automatic Shared Memory Management (ASMM) in 10g, and Automatic Memory Management (AMM) in 11g.
As memory pressures rise on the Shared Pool, instead of a ORA-4031, the memory auto-tuner in ASMM (or AMM) will go to the Buffer Cache and transfer memory to the Shared Pool to fill the required need. This memory transfer is also done in granules. So with large SGA sizes, it is possible that a transfer of memory will not occur unless there is 256M or 512M of memory available to be transferred. If at least one granule is not available, an ORA-4031 will occur.
oracle内存粒度的更多相关文章
- Oracle内存全面分析
Oracle内存全面分析 Oracle的内存配置与oracle性能息息相关.而且关于内存的错误(如4030.4031错误)都是十分令人头疼的问题.可以说,关于内存的配置,是最影响Oracle性能的配置 ...
- Oracle 内存结构
内存结构 Oracle内存,进程与数据库的图 sga:系统全局区,用来存放操作的数据,库缓存,数据字典等控制信息的内存区域, pga:进程全局区,服务进程专用的内存区域,大多数内容非共享 uga:用 ...
- Oracle内存管理技术
1.Oracle内存管理技术 2.配置自动内存管理(AMM) 3.监视自动内存管理(AMM) 4.配置自动共享内存管理(ASMM) 5.配置自动PGA内存管理 Reference 1.Oracle内存 ...
- 【转】oracle内存分配和调优总结
转自 http://blog.itpub.net/12272958/viewspace-696834/ 一直都想总结一下oracle内存调整方面的知识,最近正好优化一个数据库内存参数,查找一些资料并且 ...
- 修改oracle内存占用
修改oracle内存占用 ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 # su oracle $cd $ORACLE_HOM ...
- Oracle内存管理理论篇二
目标 了解oracle内存管理方式 掌握ASMM管理方式 掌握AMM管理方式 监控内存使用 学习一个知识点时,最好先了解其历史.ORACLE近期的版本都对内存管理做了简化,从9i通过PGA_AGGRE ...
- 2014年1月9日 Oracle 内存与结构
Oracle启动时为启动一个实例 主要为 实例 SVG 数据库文件 其它文件 1.Oracle: 内存 进程 其他文件 1.1 SVG内存(Cache) 1.1.1 共享池(Shared Poo ...
- oracle内存优化
一直都想总结一下oracle内存调整方面的知识,最近正好优化一个数据库内存参数,查找一些资料并且google很多下.现在记录下来,做下备份. 一.概述: ...
- Oracle内存详解之 Library cache 库缓冲
Oracle内存详解之 Library cache 库缓冲 2017年11月09日 11:38:39 阅读数:410更多 个人分类: 体系结构 Library cache是Shared pool的一部 ...
随机推荐
- 小程序和APP谁将主导未来?
APP和小程序的未来会怎么样?小程序的出现真的会加速APP的灭亡吗?今天这篇文章,是对小程序和App未来发展格局的一些思考,更多的是想提醒各位拥抱小程序的的参与者,我们在决定参与这场狂欢的同时,切勿盲 ...
- Spring特性--DI
DI:Dependency Injection(依赖注入),通俗的讲就是一种通过xml配置文件,为交给sping容器的对象初始化参数.又称做控制反转:Inversion of Control(IoC) ...
- 为什么不用rxjava?
rxjava等系列产品.思想是很好的,但是被大多数人用成了一坨屎! 就拿rx最经典的那个例子来说: 假设有这样一个需求:界面上有一个自定义的视图 imageCollectorView ,它的作用是显示 ...
- 把域名绑定到某个项目,以nginx服务器为例
一:登陆域名服务器平台,把域名解析到项目对应的IP上面. 二:配置nginx服务器 1./etc/nginx/conf.d/ 在服务器该目录下,添加.conf文件,如命名为:www.demo.com. ...
- 2MyBatis入门--深入浅出MyBatis技术原理与实践(笔记)
什么是 MyBatis ? MyBatis 是支持定制化 SQL.存储过程以及高级映射的优秀的持久层框架.MyBatis 避免了几乎所有的 JDBC 代码和手动设置参数以及获取结果集.MyBatis ...
- 了解了下spring boot,说一下看法
这段时间比较忙,新项目的事比较多,跟着老大忙前忙后,没准备写博客. 下班地铁上看视频,发现spring boot的公开课,看完后,就准备抒抒情怀: 1.从个人的角度来看,使用spring boot可能 ...
- 【IOS】模仿windowsphone列表索引控件YFMetroListBox
有没有觉得UITableView自带的右侧索引很难用,我一直觉得WindowsPhone中的列表索引非常好用. 所以呢,我们来实现类似Windows Phone中的列表索引(这就是信仰). 最终实现效 ...
- java 初始化顺序
java 变量类型如下: 实例变量: 类变量: 初始化途经如下: 实例变量 --声明时,初始化: --非静态初始化块内,初始化: --构造函数内,初始化: 实例1: public class bean ...
- sql查找去重复并且字段不为空的数据
select distinct username,quantity from Student where isnull(username,'')<>'' and p_id = {1}
- express-session使用理解
本篇主要段落翻译来自https://github.com/expressjs/session 客户端与服务会使用一个Sessionid的Cookie值来进行客户端和服务器端会话的匹配,这个Cookie ...