您好,登錄后才能下訂單哦!
這篇文章主要介紹“pga相關參數(shù)有哪些”,在日常操作中,相信很多人在pga相關參數(shù)有哪些問題上存在疑惑,小編查閱了各式資料,整理出簡單好用的操作方法,希望對大家解答”pga相關參數(shù)有哪些”的疑惑有所幫助!接下來,請跟著小編一起來學習吧!
PGA
UGA:session信息,WORK AREA(hash area,sort area等)等等
CGA:parse調(diào)用、executive調(diào)用、fetch調(diào)用等
pga_aggregate_target設定所有進程總的WORK AREA區(qū)大小,主要影響下面幾個相關參數(shù)的設定
_smm_max_size: 串行進程的WORK AREA上限值,單位KB。默認值
_pga_max_size: 每個進程WORK AREA上限值,單位byte。
_smm_px_max_size: 并行模式下,所有并行進程共享的WORK AREA上限值,單位KB
_smm_max_size:
pga_aggregate_target <= 500 MB, then _smm_max_size = 20% * pga_aggregate_target
pga_aggregate_target [500MB , 1000 MB], then _smm_max_size = 100 MB
pga_aggregate_target >= 1000 MB, then _smm_max_size = 10% * pga_aggregate_target, 最大值 1024MB
_pga_max_size:
_smm_max_size <= 100m,then _pga_max_size=200m
_smm_max_size > 100m,then _pga_max_size = 2 * _smm_max_size
_smm_px_max_size:
_smm_px_max_size = 50% * pga_aggregate_target
degree of parallelism (DOP) <= 5, 每個slave進程使用_smm_max_size限制
degree of parallelism (DOP) > 5, 所有slave進程共享_smm_px_max_size
從上面的分析,我們可以得到下面的一些指導:
1、增大pga_aggregate_target設置,可以提高每個進程的work area大小,對于hash join、排序等操作有利
2、PGA達到10G后,單個進程的work area已經(jīng)達到極限,不能再獲得更大的空間了
3、在CPU足夠的情況,設置并行度超過6,可以獲得更大的work area空間,比如創(chuàng)建索引就會更快
4、如果大量進程啟用高并行度,操作系統(tǒng)內(nèi)存很容易被消耗光,因為PGA只是限定了work area的空間,而其他的組件可以越界。
綜上,pga_aggregate_target并不是硬性限制,work area之外的內(nèi)存,不被pga_aggregate_target和_pga_max_size所限制。所以經(jīng)常會看到PGA的大小超過了pga_aggregate_target,這通常是因為PL/SQL中的變量和數(shù)組中裝入了巨大的數(shù)據(jù)造成的。通常的例子是bulk collect。
在12c中引入了PGA_AGGREGATE_LIMIT參數(shù),可用來硬性限制PGA大小。
In Oracle release 12.1: the greater of the following:
* 2 GB
* 200% of PGA_AGGREGATE_TARGET
* (Value of PROCESSES initialization parameter setting) * 3 MB
It will not exceed 120% of the physical memory size minus the total SGA size.
In Oracle release 12.2:
* If MEMORY_TARGET is set, then PGA_AGGREGATE_LIMIT defaults to the MEMORY_MAX_TARGET value.
* If MEMORY_TARGET is not set, then PGA_AGGREGATE_LIMIT defaults to 200% of PGA_AGGREGATE_TARGET.
* If MEMORY_TARGET is not set, and PGA_AGGREGATE_TARGET is explicitly set to 0, then the value of PGA_AGGREGATE_LIMIT is set to 90% of the physical memory size minus the total SGA size.
In all cases, the default PGA_AGGREGATE_LIMIT is at least 2GB and at least 3MB times the PROCESSES parameter.
到此,關于“pga相關參數(shù)有哪些”的學習就結(jié)束了,希望能夠解決大家的疑惑。理論與實踐的搭配能更好的幫助大家學習,快去試試吧!若想繼續(xù)學習更多相關知識,請繼續(xù)關注億速云網(wǎng)站,小編會繼續(xù)努力為大家?guī)砀鄬嵱玫奈恼拢?/p>
免責聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。