----------------------
java pool 20
large pool 4
shared pool 84
189.002403
这一次, db_cache_size的值没有变化 , JAVA_POOL_SIZE的值也没有变化
修改large pool的值为16M
SQL> alter system set large_pool_size=16M;
System altered.
SQL> select name,block_size,current_size,prev_size from v$buffer_pool;
NAME BLOCK_SIZE CURRENT_SIZE PREV_SIZE
-------------------- ---------- ------------ ---------
DEFAULT 8192 176 188
SQL> Select pool, sum(bytes)/1024/1024 as "M bytes" from v$sgastat group by pool;
POOL M bytes
------------ ----------
java pool 20
large pool 16
shared pool 84
177.002403
这次,db_cache_size和large_pool_size的值都变了
同样,调大shared_pool_size后, db_cache_size会自动减小.
虽然db_nk_cache_size的值不会随着workload 的改变而自动调整, 我们还是可以看看手工改动db_nk_block_size 的情况
SQL> alter system set db_2k_cache_size=4m;
System altered.
SQL> select name,block_size,current_size,prev_size from v$buffer_pool;
NAME BLOCK_SIZE CURRENT_SIZE PREV_SIZE
---------------- ----------------- ------------ ----------
DEFAULT 8192 172 176
DEFAULT 2048 4 0
SQL> alter system set db_2k_cache_size=0;
System altered.
SQL> select name,block_size,current_size,prev_size from v$buffer_pool;
NAME BLOCK_SIZE CURRENT_SIZE PREV_SIZE
----------------- ---------------- ------------------ --------------
DEFAULT 8192 176 172
SQL> alter system set db_2k_cache_size=8m;
System altered.
SQL> select name,block_size,current_size,prev_size from v$buffer_pool;
NAME BLOCK_SIZE CURRENT_SIZE PREV_SIZE
-------------------- ---------- ------------ ----------
DEFAULT 8192 168 176
DEFAULT 2048 8 0
结论: 手工调整db_nk_cache_size确实会影响原有的参数.
最后说一点: SGA_TARGET参数与SGA_MAX_SIZE参数有密切关联,基本的原则就是前者的值不能大于后者的值.
总结:设置了SGA_TARGET参数后,数据库会在这个范
|