博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Oracle自动内存管理的几个小问题
阅读量:6387 次
发布时间:2019-06-23

本文共 5765 字,大约阅读时间需要 19 分钟。

  hot3.png

1) 开启了自动内存管理之后,如果有pool的值设置为非0值会怎么处理?

比如,设置了sga_target=10G,但是java_pool_size设置为10m,这时,10m会作为java pool的最少分配内存空间。

If these automatically tuned memory pools had been set to nonzero values, those values are used as minimum levels by Automatic Shared Memory Management. You would set minimum values if an application component needs a minimum amount of memory to function properly.

2) 关闭自动管理后,相关pool的值会被自动设置。

If you dynamically disable SGA_TARGET by setting its value to 0 at instance startup, Automatic Shared Memory Management will be disabled and the current auto-tuned sizes will be used for each memory pool.
sys@HUA>show parameter memory;NAME                                 TYPE        VALUE------------------------------------ ----------- ------------------------------hi_shared_memory_address             integer     0memory_max_target                    big integer 0memory_target                        big integer 0shared_memory_address                integer     0sys@HUA>show parameter sgaNAME                                 TYPE        VALUE------------------------------------ ----------- ------------------------------lock_sga                             boolean     FALSEpre_page_sga                         boolean     FALSEsga_max_size                         big integer 440Msga_target                           big integer 440Msys@HUA>alter system set sga_target=0;System altered.sys@HUA>show parameter pool;NAME                                 TYPE        VALUE------------------------------------ ----------- ------------------------------_shared_io_pool_size                 big integer 0buffer_pool_keep                     stringbuffer_pool_recycle                  stringglobal_context_pool_size             stringjava_pool_size                       big integer 4Mlarge_pool_size                      big integer 8Molap_page_pool_size                  big integer 0shared_pool_reserved_size            big integer 7549747shared_pool_size                     big integer 208Mstreams_pool_size                    big integer 0sys@HUA>alter system set sga_target=440;System altered.sys@HUA>show parameter pool;NAME                                 TYPE        VALUE------------------------------------ ----------- ------------------------------_shared_io_pool_size                 big integer 0buffer_pool_keep                     stringbuffer_pool_recycle                  stringglobal_context_pool_size             stringjava_pool_size                       big integer 4Mlarge_pool_size                      big integer 8Molap_page_pool_size                  big integer 0shared_pool_reserved_size            big integer 7549747shared_pool_size                     big integer 208Mstreams_pool_size                    big integer 0sys@HUA>alter system set java_pool_size=0;System altered.sys@HUA>alter system set large_pool_size=0;System altered.sys@HUA>alter system set shared_pool_size=0;System altered.sys@HUA>sys@HUA>show parameter pool;NAME                                 TYPE        VALUE------------------------------------ ----------- ------------------------------_shared_io_pool_size                 big integer 0buffer_pool_keep                     stringbuffer_pool_recycle                  stringglobal_context_pool_size             stringjava_pool_size                       big integer 0large_pool_size                      big integer 0olap_page_pool_size                  big integer 0shared_pool_reserved_size            big integer 7549747shared_pool_size                     big integer 0streams_pool_size                    big integer 0sys@HUA>sys@HUA>sys@HUA>alter system set sga_target=0;System altered.sys@HUA>show parameter pool;NAME                                 TYPE        VALUE------------------------------------ ----------- ------------------------------_shared_io_pool_size                 big integer 0buffer_pool_keep                     stringbuffer_pool_recycle                  stringglobal_context_pool_size             stringjava_pool_size                       big integer 4Mlarge_pool_size                      big integer 8Molap_page_pool_size                  big integer 0shared_pool_reserved_size            big integer 7549747shared_pool_size                     big integer 208Mstreams_pool_size                    big integer 0

3) 是否有在SGA内的组件,但是却不在自动内存管理之内的?

The following pools are manually sized components and are not affected by Automatic Shared Memory Management: * Log buffer * Other buffer caches (such as KEEP, RECYCLE, and other nondefault block size) * Fixed SGA and other internal allocations To manually size these memory pools, you must set the DB_KEEP_CACHE_SIZE, DB_RECYCLE_CACHE_SIZE, DB_nK_CACHE_SIZE, and LOG_BUFFER initialization parameters. The memory allocated to these pools is deducted from the total available for SGA_TARGET when Automatic Shared Memory Management computes the values of the automatically tuned memory pools.

4) 组件之间“挪借”内存空间,是按什么单位进行?是一个一个字节来分配?

Memory for the shared pool, large pool, java pool, and buffer cache is allocated in units of granules. The granule size is 4MB if the SGA size is less than 1GB. If the SGA size is greater than 1GB, the granule size changes to 16MB. The granule size is calculated and fixed when the instance starts up. The size does not change during the lifetime of the instance.
The granule size that is currently being used for SGA can be viewed in the view V$SGA_DYNAMIC_COMPONENTS. The same granule size is used for all dynamic components in the SGA.

5) 如果使用了自动内存管理,每个pool的值都设置为0了,那如何查看当前每个pool的当前值?

V$MEMORY_DYNAMIC_COMPONENTS displays information about the current sizes of all dynamically tuned memory components, including the total sizes of the SGA and instance PGA.

转载于:https://my.oschina.net/huayd/blog/138874

你可能感兴趣的文章
Oracle SQL之--多表查询基础用法
查看>>
图形化插件对Eclipse的版本要求
查看>>
两个关于数列的Python脚本(斐波那契数列和猴子吃香蕉类问题)
查看>>
olabuy-时光从来素默,内心应保持一份素淡与简静
查看>>
kux文件怎么打开 苹果手机如何观看kux视频
查看>>
Python中的urllib.request模块
查看>>
第九课 《说人话》
查看>>
js对象数组排序
查看>>
如何实现在展示商品时,放大商品细节
查看>>
uboot boot流程分析
查看>>
如何学习PHP整个体系的?
查看>>
css三角形实现写法全攻略收集
查看>>
Enterprise and the press public MBT Fora
查看>>
js常用代码整理
查看>>
富文本编辑器TinyMCE
查看>>
01_vue实例_数据_方法
查看>>
“穿越”——正则表达式
查看>>
使用 find 命令实现高级排除需求
查看>>
【DEV GridControl】怎样使GridView中满足某个条件的行可编辑,其余行不可编辑?...
查看>>
一只年轻而倒悬的梨
查看>>