記憶體管理中關於記憶體每次增長的大小

charsi發表於2011-08-16

修改一個記憶體引數db_16k_cache_size,如下:

SQL> show parameter db_16k_cache_size

NAME TYPE VALUE
------------------------------------ ---------------------- ------------------------------
db_16k_cache_size big integer 0
SQL> alter system set db_16k_cache_size=4M;

System altered.

SQL> show parameter db_16k_cache_size

NAME TYPE VALUE
------------------------------------ ---------------------- ------------------------------
db_16k_cache_size big integer 96M
SQL> alter system set db_16k_cache_size=48M;

System altered.

SQL> show parameter db_16k_cache_size

NAME TYPE VALUE
------------------------------------ ---------------------- ------------------------------
db_16k_cache_size big integer 96M
SQL> alter system set db_16k_cache_size=0;

System altered.

SQL> show parameter db_16k_cache_size

NAME TYPE VALUE
------------------------------------ ---------------------- ------------------------------
db_16k_cache_size big integer 0

可以看出,如果設定db_16k_cache_size的話,一次至少需要設定96M,否則無法成功.

關於db_16k_cache_size設定值的最小值,每次最少增加多大記憶體的系統資訊,可以從檢視V$SGA_DYNAMIC_COMPONENTS中看到.

如下,是在HP-UNIX上看到的,可以知道db_16k_cache_size每次至少增長4M.而每次的初始話最小值應該是跟主機有關係.
我試驗的這臺機器是在HP-UNIX上進行的,db_16k_cache_size的最小值是96M,而在Linux上測試最小值可以到10M.

SQL> select COMPONENT,CURRENT_SIZE,MIN_SIZE,LAST_OPER_MODE,LAST_OPER_TIME,GRANULE_SIZE from V$SGA_DYNAMIC_COMPONENTS;

COMPONENT CURRENT_SIZE MIN_SIZE LAST_OPER_MODE LAST_OPER_TI GRANULE_SIZE
------------------------------ ------------ ---------- -------------------- ------------ ------------
shared pool 83886080 83886080 4194304
large pool 4194304 4194304 4194304
java pool 4194304 4194304 4194304
streams pool 4194304 4194304 4194304
DEFAULT buffer cache 100663296 100663296 4194304
KEEP buffer cache 0 0 4194304
RECYCLE buffer cache 0 0 4194304
DEFAULT 2K buffer cache 0 0 4194304
DEFAULT 4K buffer cache 100663296 100663296 4194304
DEFAULT 8K buffer cache 0 0 4194304
DEFAULT 16K buffer cache 104857600 0 MANUAL 24-AUG-11 4194304

COMPONENT CURRENT_SIZE MIN_SIZE LAST_OPER_MODE LAST_OPER_TI GRANULE_SIZE
------------------------------ ------------ ---------- -------------------- ------------ ------------
DEFAULT 32K buffer cache 0 0 MANUAL 24-AUG-11 4194304
ASM Buffer Cache 0 0 4194304

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/23850820/viewspace-1053919/,如需轉載,請註明出處,否則將追究法律責任。

相關文章