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的一部 ...
随机推荐
- MVC重定向-自定义路由篇
public class RouteConfig { public static void RegisterRoutes(RouteCollection routes) { routes.Ignore ...
- effective java 学习心得
目的 记录一下最主要学习心得,不然凭我这种辣鸡记忆力分分钟就忘记白看了... 用静态工厂方法代替构造器的最主要好处 1.不必每次都创建新的对象 Boolean.valueOf Long.valueOf ...
- ORA-01722:无效数字
今天写查询语句,关联多张表,出现了这个错误. 结果发现时字段的数据类型不一致. select * from table_a a,table_b b where to_char(a.project_id ...
- 感悟:搞了整整一天,拯救一个Ubuntu系统
最开始,我在windows平台上,准备打开计算机组成原理的实验工程,突然来了一个想法:每次要用windows的时候,都要切换系统(win8以上的系统必须在关闭快速开机的状态下才能正常在Linux平台下 ...
- [老文章搬家] [翻译] 深入解析win32 crt 调试堆
09 年翻译的东西. 原文见: http://www.nobugs.org/developer/win32/debug_crt_heap.html 在DeviceStudio的Debug编译模式下, ...
- Gedit 解决中文显示乱码问题
详细请参考:http://wiki.ubuntu.org.cn/Gedit%E4%B8%AD%E6%96%87%E4%B9%B1%E7%A0%81 具体原因是Gedit的默认编码设置没有添加中文编码所 ...
- nginx 反代理google
./configure \ --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/n ...
- php加密类
1.需求 了解php加密类的使用 2.例子 参考ci的3.1.2的新版加密类,一个不传参,用默认加密算法,加密模式的例子 //0.加载加密类 $this->load->library('e ...
- 在_vimrc中 set noexpandtab python 不起效果
我ctm,今天配置不让tab转为空格,在_vimrc中set noexpandtab 不起效果. set ts=4也不起效果. 但是在命令行中其效果. 我都不知道咋办了. 问人说我有可能使用的不是那个 ...
- [BZOJ1552][Cerc2007]robotic sort
[BZOJ1552][Cerc2007]robotic sort 试题描述 输入 输入共两行,第一行为一个整数N,N表示物品的个数,1<=N<=100000.第二行为N个用空格隔开的正整数 ...