?
?oracle 之 內存—鞭辟近里(四)
?
前面,我學習 pga內存的結構concept以及常用的動態查看pga的分配使用情況。現在我在學習一下怎么啟動pga管理。
如果啟動一個自動管理的pga,需要配置二個參數,一個是pga_aggregate_target,一個是workarea_size_policy,這些參數在前面我學習了,但是如何設置pga_aggregate_target這個參數在剛剛創建新的庫的時候是可以通過前面oracle建議的步驟進行設定的,
但是運行一段時間后我們還是需要重新設置該參數:
1)pga advice view;
在查看該相關視圖需要確保statistics_level運行在typical或是all狀態,不然就沒法查看建議值了。
Setting the
STATISTICS_LEVEL
parameter to
BASIC
disables the collection of many of the important statistics required by Oracle Database features and functionality, including:
-
Automatic Workload Repository (AWR) Snapshots
-
Automatic Database Diagnostic Monitor (ADDM)
-
All server-generated alerts
-
Automatic SGA Memory Management
-
Automatic optimizer statistics collection
-
Object level statistics
-
End to End Application Tracing (
V$CLIENT_STATS
) -
Database time distribution statistics (
V$SESS_TIME_MODEL
andV$SYS_TIME_MODEL
) -
Service level statistics
-
Buffer cache advisory
-
MTTR advisory
-
Shared pool sizing advisory
-
Segment level statistics
-
PGA Target advisory
-
Timed statistics
-
Monitoring of statistics
eg:
SYS@orcl#SHOW PARAMETER STATISTICS_LEVEL
------------------------------------ ---------------------- ------------------------------
statistics_level???????????????????? string???????????????? TYPICAL
SYS@orcl#R
? 1* select PGA_TARGET_FOR_ESTIMATe/1024/1024 PGA_TARGET_FOR_ESTe,PGA_TARGET_FACTOR,ADVICE_STATUS,BYTES_PROCESSED/1024/1024 BYTES_PROCESSED,ESTD_TIME,ESTD_EXTRA_BYTES_RW/1024/1024 ESTD_EXTRA_BYTES_RW,ESTD_PGA_CACHE_HIT_PERCENTAGE,ESTD_OVERALLOC_COUNT from v$pga_target_advice
------------------- ----------------- ------ --------------- ---------- ------------------- ----------------------------- --------------------
???????????????? 32????????????? .125 ON????????? 1018.20703????? 22139????????? 289.753906??????????????????????????? 78?????????????????? 41
???????????????? 64?????????????? .25 ON????????? 1018.20703????? 22139????????? 289.753906??????????????????????????? 78?????????????????? 41
???? ?????????? 128??????????????? .5 ON????????? 1018.20703????? 17235?????????????????? 0?????????????????????????? 100??????????????????? 0
??????????????? 192?????????????? .75 ON????????? 1018.20703????? 17235?????????????????? 0?????????????????????????? 100??????????????????? 0
??????????????? 256???????????????? 1 ON????????? 1018.20703????? 17235?????????????????? 0?????????????????????????? 100??????????????????? 0
???????? 307.199219?????????????? 1.2 ON????????? 1018.20703????? 17235?????????????????? 0?????????????????????????? 100??????????????????? 0
???????? 358.399414?????????????? 1.4 ON????????? 1018.20703????? 17235?????????????????? 0?????????????????????????? 100??????????????????? 0
???????? 409.599609?????????????? 1.6 ON????????? 1018.20703????? 17235?????????????????? 0?????????????????????????? 100??????????????????? 0
???????? 460.799805?????????????? 1.8 ON????????? 1018.20703????? 17235?????????????????? 0?????????????????????????? 100??????????????????? 0
??????????????? 512???????????????? 2 ON????????? 1018.20703????? 17235?????????????????? 0?????????????????????????? 100??????????????????? 0
??????????????? 768???????????????? 3 ON????????? 1018.20703????? 17235?????????????????? 0?????????????????????????? 100??????????????????? 0
------------------- ----------------- ------ --------------- ---------- ------------------- ----------------------------- --------------------
?????????????? 1024???????????????? 4 ON????????? 1018.20703????? 17235?????????????????? 0?????????????????????????? 100??????????????????? 0
?????????????? 1536???????????????? 6 ON????????? 1018.20703????? 17235?????????????????? 0?????????????????????????? 100??????????????????? 0
?????????????? 2048???????????????? 8 ON????????? 1018.20703????? 17235?????????????????? 0?????????????????????????? 100??????????????????? 0
可以看到我們應該設置pga_aggregate_target大小為128M。
如果我把statistics_level參數設置為basic,那么oracle就會取消相關的功能。
另外還有v$pga_target_advice_histogram;這個視圖。
?
?
更多文章、技術交流、商務合作、聯系博主
微信掃碼或搜索:z360901061

微信掃一掃加我為好友
QQ號聯系: 360901061
您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。
【本文對您有幫助就好】元
