SYS@PROD> startup
ITPUB个人空间/aE/Fl,U:^9`O`/[$\2^
ORACLE instance started.
Total System Global Area 536870912 bytes
Fixed Size 1220460 bytes
Variable Size 381681812 bytes
Database Buffers 150994944 bytes
Redo Buffers 2973696 bytes
Database mounted.
Database opened.
这些参数的显示都代表着
SGA中哪些组件的大小呢?
fs#N*}&c)`]0
我们进入
数据库后,紧接着在在数据库里查看一下SGA相关的参数:
SYS@PROD> select * from v$sgainfo;
ITPUB个人空间"fQ yc`*xm
NAME BYTES RES
-------------------------------- ---------- ---
Fixed SGA Size 1220460 No
Redo Buffers 2973696 No
Buffer Cache Size 138412032 Yes
Shared Pool Size 54525952 Yes
Large Pool Size 4194304 Yes
Java Pool Size 209715200 Yes
Streams Pool Size 8388608 Yes
Granule Size 4194304 No
Maximum SGA Size 536870912 No
Startup overhead in Shared Pool 33554432 No
Free SGA Memory Available 117440512
gVvw-l-QOL0
11 rows selected.
:[et7_|c0
SYS@PROD> show parameter sga_max_size;
NAME TYPE VALUE
------------------- - ------------------- ------------------
sga_max_size big integer 512M
ITPUB个人空间y/M9ghQ;p$w
SYS@PROD> show parameter sga_target;
T$ta(S|F0
NAME TYPE
VALUE
------------------------------------ -------------- ------------------
ITPUB个人空间'L#VLH%Y%l8s
sga_target big integer
400M
8eg!c7i7A5zj:{h-R0
SYS@PROD> show parameter java_pool;
ITPUB个人空间!?n)?(A"T
NAME TYPE
VALUE
----------------------- ------------- ----------------
java_pool_size big integer
200M
AL(h&}_`sP$F0
SYS@PROD> show parameter 16k;
ITPUB个人空间fX)XS?;Gx``5@
NAME TYPE
VALUE
------------------------------------ --------------------------------
ITPUB个人空间~o1[I0|!Z'q~6R&I
db_16k_cache_size big integer 60M
ITPUB个人空间w6k2C |#vH&D|!R
经过对比,可以大致发现:
Total System Global Area 536870912 bytes =sga_max_size=512M
Fixed Size 1220460 bytes =fixed sga =11.6M,fixed sga是sga中的一个组件,其中存储了sga中其它组件 的位置和参数,相当于SGA的自启区,我们无法控制此组件的大小,但通常很小。
Variable Size 381681812 bytes =364M,sga_target_size中去除redo、database buffer、fixed sga组件大小后的总大小,其中有share pool,java pool,large poo等.
Database Buffers 150994944 bytes =144M,和v$sgainfo中的Buffer Cache Size 大小相近(数据库启动 后会不断变化),为数据缓冲区的大小,其中default pool,recycle pool,keeppool
Redo Buffers 2973696 bytes =redo buffer区的大小,存储redo log.此参数大小不受sga自动调整,需要自己手动调整。
$c a'IA$da[0
在oracle10g中,与内存相关的参数可以归为两类:
自动调优的sga参数:目前这些参数包括:db_cache_size(默认缓冲区大小),shared_pool_size,large_pool_size,java_pool_size。这些参数不需要手动设置大小,如果手动设置了大小,设置的值为自动分配最小值。
手动SGA参数:这些参数包括log_buffer、streams_pool、db_nk_cache_size、db_keep_cache_size、db_recycle_cache_size。这些参数不会受到sga的自动调整,需要手动设置大小。
WIi(U3A$K!}!v0
buffer cache(数据缓冲区)包括了默认缓冲区(default pool),回收区(recycle pool), 保持区(keep pool),以及db_nk_cache区域。
ITPUB个人空间U"c5NJr.o
oracle启动时,会根据sga_target设置的大小,从中减去那些手动设置的组件大小:recycle pool,keep pool,,并使用计算得到的内存量来设置默认缓冲区、共享池、大池和JAVA池的大小。sga的大小可以超过sga_target,最大为sga_max_size,sga_target只是我们试图期望oracle所使用的内存大小,oracle在使用sga时,也会依据该参数进行组件的大小自动分配,但如果迫不得已要超过sga_target时,分配的sga总大小也会超越sga_target。
ballontt
2013/4/23
---The End---
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/27425054/viewspace-759134/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/27425054/viewspace-759134/