ASMM下查看shared_pool_size等內存大小

  在數據庫使用asmm內存管理時show parameter 查看自動調整的內存組件都爲0,如:

 

SQL> show parameter shared_pool_size
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
shared_pool_size                     big integer 0

    那麼我們如何查看asmm數據庫的該部分內存組件實際使用量呢?我們可以通過如下語句查詢:

 col component format a30;

 select component, current_size,min_size,max_size,user_specified_size from v$sga_dynamic_components;

如:

 

SQL> col component format a30;
SQL> select component, current_size,min_size,max_size,user_specified_size from v$sga_dynamic_components;
COMPONENT                      CURRENT_SIZE   MIN_SIZE   MAX_SIZE USER_SPECIFIED_SIZE
------------------------------ ------------ ---------- ---------- -------------------
shared pool                      2952790016 2952790016 2952790016                   0
large pool                         67108864   67108864   67108864                   0
java pool                          67108864   67108864   67108864                   0
streams pool                              0          0          0                   0
DEFAULT buffer cache             2.7649E+10 2.7649E+10 2.7649E+10                   0
KEEP buffer cache                         0          0          0                   0
RECYCLE buffer cache                      0          0          0                   0
DEFAULT 2K buffer cache                   0          0          0                   0
DEFAULT 4K buffer cache                   0          0          0                   0
DEFAULT 8K buffer cache                   0          0          0                   0
DEFAULT 16K buffer cache                  0          0          0                   0
DEFAULT 32K buffer cache                  0          0          0                   0
Shared IO Pool                            0          0          0                   0
ASM Buffer Cache                          0          0          0                   0
14 rows selected.

 

 

--下面是關於SGA和ASMM的一些基本知識
1.SGA組成
   Oracle的SGA基本內存組件從9i開始並沒有非常大的變化,他們包括:
Buffer Cache 我們常說的數據庫高速緩存,雖然我一直不明白要冠以高速之名
Default Pool                  默認的緩衝池,大小由DB_CACHE_SIZE決定
Keep Pool                     持久的緩衝池,大小由DB_KEEP_CACHE_SIZE決定
Non standard pool         非標準塊標準池,大小由DB_nK_cache_size決定
Recycle pool                 回收池,大小由db_recycle_cache_size決定
Shared Pool 共享池,大小由shared_pool_size決定
Library cache   俗稱的庫緩存
Row cache      行緩存,也叫字典緩存
Java Pool         java池,大小由Java_pool_size決定
Large Pool       大池,大小由Large_pool_size決定
Fixed SGA       固定的SGA區域,包含了Oracle內部的數據結構,一般被存放在第一個granule中  

2.ASMM影響的內存組件  
  ASMM下一部分參數是自動設置的(Automatically set),這些參數包括:
shared_pool_size、db_cache_size、java_pool_size、large_pool _size和streams_pool_siz
  而另外一些是需要手動設置的靜態參數,包括:
db_keep_cache_size、db_recycle_cache_size、db_nk_cache_size、log_buffer以及固定SGA內存結構
等,如果以上沒有手動設置這些參數的話,除去log_buffer和fixed sga其他內存組件一般默認大小爲零。

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章