Oracle SGA中的Granule(粒度)
我們都知道從Oracle9i開始,Oracle引入了一個新的initial parameter->db_cache_size,這個引數代表了standard db_block_size的Default pool的大小.那麼這樣一來的引入替代了先前的db_block_buffers*db_block_size=buffer cache size的設定方法.
db_cache_size的最小值就是一個Granule,這個也是Oracle 9i引入的一個新概念.是連續虛擬記憶體分配的單位,這個Granule分配的大小取決於SGA的總大小(SGA_MAX_SIZE).
如果估計的SGA的大小小於128MB,那麼Granule為4M,否則 > 4M
if [$SGA_MAX_SIZE < 128MB]
then
Granule=4M
elseif
Granule >4M
end if
觀察這個值,我們可以通過一個隱藏引數_ksmg_granule_size來控制
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
PL/SQL Release 9.2.0.8.0 - Production
CORE 9.2.0.8.0 Production
TNS for 32-bit Windows: Version 9.2.0.8.0 - Production
NLSRTL Version 9.2.0.8.0 - Production
SQL> select
2 x.ksppinm name,
3 y.ksppstvl value,
4 y.ksppstdf isdefault,
5 decode(bitand(y.ksppstvf,7),1,'MODIFIED',4,'SYSTEM_MOD','FALSE') ismod,
6 decode(bitand(y.ksppstvf,2),2,'TRUE','FALSE') isadj from
7 sys.x$ksppi x,
8 sys.x$ksppcv y
9 where
10 x.inst_id=userenv('Instance') and
11 y.inst_id=userenv('Instance') and
12 x.indx=y.indx and
13 x.ksppinm like '%_&par%'
14 order by
15 translate(x.ksppinm,'_','');
輸入 par 的值: ksmg_granule
原值 13: x.ksppinm like '%_&par%'
新值 13: x.ksppinm like '%_ksmg_granule%'
NAME
----------------------------------------------------------------
VALUE
--------------------------------------------------------------------------------
ISDEFAULT ISMOD ISADJ
--------- ---------- -----
_ksmg_granule_size
4194304
TRUE FALSE FALSE
_ksmg_granule_locking_status
1
TRUE FALSE FALSE
NAME
----------------------------------------------------------------
VALUE
--------------------------------------------------------------------------------
ISDEFAULT ISMOD ISADJ
--------- ---------- -----
SQL> show parameter sga_max_size;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
sga_max_size big integer 135339604
SQL> alter system set sga_max_size=200M scope=spfile;
系統已更改。
SQL> startup force
ORACLE 例程已經啟動。
Total System Global Area 210836936 bytes
Fixed Size 454088 bytes
Variable Size 184549376 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
資料庫裝載完畢。
資料庫已經開啟。
SQL>
SQL> select
2 x.ksppinm name,
3 y.ksppstvl value,
4 y.ksppstdf isdefault,
5 decode(bitand(y.ksppstvf,7),1,'MODIFIED',4,'SYSTEM_MOD','FALSE') ismod,
6 decode(bitand(y.ksppstvf,2),2,'TRUE','FALSE') isadj from
7 sys.x$ksppi x,
8 sys.x$ksppcv y
9 where
10 x.inst_id=userenv('Instance') and
11 y.inst_id=userenv('Instance') and
12 x.indx=y.indx and
13 x.ksppinm like '%_&par%'
14 order by
15 translate(x.ksppinm,'_','');
輸入 par 的值: ksmg_granule
原值 13: x.ksppinm like '%_&par%'
新值 13: x.ksppinm like '%_ksmg_granule%'
NAME
----------------------------------------------------------------
VALUE
--------------------------------------------------------------------------------
ISDEFAULT ISMOD ISADJ
--------- ---------- -----
_ksmg_granule_size
8388608
TRUE FALSE FALSE
_ksmg_granule_locking_status
1
TRUE FALSE FALSE
NAME
----------------------------------------------------------------
VALUE
--------------------------------------------------------------------------------
ISDEFAULT ISMOD ISADJ
--------- ---------- -----
SQL> show parameter sga_max_size;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
sga_max_size big integer 210836936
SQL> alter system set sga_max_size=500M scope=spfile;
系統已更改。
SQL> startup force;
ORACLE 例程已經啟動。
Total System Global Area 529604804 bytes
Fixed Size 454852 bytes
Variable Size 503316480 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
資料庫裝載完畢。
資料庫已經開啟。
SQL> select
2 x.ksppinm name,
3 y.ksppstvl value,
4 y.ksppstdf isdefault,
5 decode(bitand(y.ksppstvf,7),1,'MODIFIED',4,'SYSTEM_MOD','FALSE') ismod,
6 decode(bitand(y.ksppstvf,2),2,'TRUE','FALSE') isadj from
7 sys.x$ksppi x,
8 sys.x$ksppcv y
9 where
10 x.inst_id=userenv('Instance') and
11 y.inst_id=userenv('Instance') and
12 x.indx=y.indx and
13 x.ksppinm like '%_&par%'
14 order by
15 translate(x.ksppinm,'_','');
輸入 par 的值: ksmg_granule
原值 13: x.ksppinm like '%_&par%'
新值 13: x.ksppinm like '%_ksmg_granule%'
NAME
----------------------------------------------------------------
VALUE
--------------------------------------------------------------------------------
ISDEFAULT ISMOD ISADJ
--------- ---------- -----
_ksmg_granule_size
8388608
TRUE FALSE FALSE
_ksmg_granule_locking_status
1
TRUE FALSE FALSE
NAME
----------------------------------------------------------------
VALUE
--------------------------------------------------------------------------------
ISDEFAULT ISMOD ISADJ
--------- ---------- -----
SQL>
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12361284/viewspace-114455/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- _ksmg_granule_size oracle記憶體分配粒度Oracle記憶體
- 關於_ksmg_granule_size與SGA大小的關係
- ORACLE Granule 解釋Oracle
- oracle 10g中的SGA_MAX_SIZE與SGA_TARGET引數Oracle 10g
- ORACLE SGA 的分配(轉)Oracle
- oracle細粒度審計Oracle
- oracle group by的按照不同粒度聚合方法Oracle
- oracle sga相關Oracle
- oracle sga構成Oracle
- oracle審計-細粒度(轉)Oracle
- oracle 細粒度審計(fga)Oracle
- oracle10g SGAOracle
- oracle SGA配置和管理Oracle
- Oracle OCP(52):細粒度審計Oracle
- 對ORACLE的SGA 進行檢查Oracle
- AIX上pin住Oracle的SGA的方法AIOracle
- 在AIX5.3中將Oracle SGA定在記憶體中的詳細步驟AIOracle記憶體
- ORACLE SGA之shared poolOracle
- oracle 92 修改sga過程Oracle
- Oracle 10g SGA 相關的VIEWOracle 10gView
- AIX上pin住Oracle的SGA的方法(轉)AIOracle
- 變更oracle 11.2.0.3 rac sga自動管理為sga手工管理Oracle
- ORACLE RAC SGA引數調整Oracle
- oracle10g 修改 sga pgaOracle
- ORACLE SGA與共享內聯絡Oracle
- oracle 重設定sga_targetOracle
- ORACLE FGAC(細粒度許可權控制)(轉)Oracle
- Oracle多粒度封鎖機制研究2Oracle
- Oracle多粒度封鎖機制研究1Oracle
- Oracle多粒度封鎖機制研究(zt)Oracle
- mysql中許可權控制粒度與效能的平衡MySql
- Oracle 10g SGA 的自動化管理Oracle 10g
- Oracle9i的動態SGA特性(2)Oracle
- linux上Oracle的sga(HugePages)分配問題LinuxOracle
- oracle sga配置相關的os 核心引數Oracle
- 修改資料庫的ORACLE的SGA和PGA的值資料庫Oracle
- oracle12c之 控制pdb中sga 與 pga 記憶體使用Oracle記憶體
- ordebug 手動修改Oracle sga scnOracle