- 最后登录
- 2023-8-16
- 在线时间
- 1686 小时
- 威望
- 2135
- 金钱
- 50532
- 注册时间
- 2011-10-12
- 阅读权限
- 200
- 帖子
- 5207
- 精华
- 39
- 积分
- 2135
- UID
- 2
|
2#
发表于 2012-4-1 19:31:18
PGA = dedicated server processes - UGA = Client machine process
脚本 Script: Listing Memory Used By All Sessions 在 dedicated server mode 下可能重复计算 PGA和 PGA中的UGA 。
如需计算PGA的使用量,使用一下脚本:
col name format a40 head "Name"
col value format 999,999,999 head "Total"
col unit format a10 head "Units"
col pga_size format a25 head "PGA Size"
col optimal_executions format 999,999,999,999 head "Optimal"
col onepass_executions format 999,999,999,999 head "One-Pass"
col multipasses_executions format 999,999,999,999 head "Multi-Pass"
col optimal_count format 999,999,999,999 head "Optimal Count"
col optimal_perc format 999 head "Optimal|PCT"
col onepass_count format 999,999,999,999 head "One-Pass Count"
col onepass_perc format 999 head "One|PCT"
col multipass_count format 999,999,999,999 head "Multi-Pass Count"
col multipass_perc format 999 head "Multi|PCT"
col sid format 999,999 Head "SID"
col operation format a30 head "Operation"
col esize format 999,999,999 head "Expected Size"
col mem format 999,999,999 head "Actual Mem"
col "MAX MEM" format 999,999,999 head "Maximum Mem"
col pass format 999,999 head "Passes"
col tsize format 999,999,999,999,999 head "Temporary|Segment Size"
spool workareaoverview.out
SELECT name, decode(unit, 'bytes', trunc(value/1024/1024), value) value ,
decode(unit, 'bytes', 'MBytes', unit) unit FROM V$PGASTAT
/
Name Total Units
---------------------------------------- ------------ ----------
aggregate PGA target parameter 385 MBytes
aggregate PGA auto target 310 MBytes
global memory bound 77 MBytes
total PGA inuse 40 MBytes
total PGA allocated 93 MBytes
maximum PGA allocated 127 MBytes
total freeable PGA memory 13 MBytes
process count 24
max processes count 26
PGA memory freed back to OS 48 MBytes
total PGA used for auto workareas 0 MBytes
Name Total Units
---------------------------------------- ------------ ----------
maximum PGA used for auto workareas 4 MBytes
total PGA used for manual workareas 0 MBytes
maximum PGA used for manual workareas 0 MBytes
over allocation count 0
bytes processed 88 MBytes
extra bytes read/written 0 MBytes
cache hit percentage 100 percent
recompute count (total) 3,853
total PGA allocated 93 MBytes
maximum PGA allocated 127 MBytes
SQL> select sum(pga_alloc_mem)/1024/1024 from v$process;
SUM(PGA_ALLOC_MEM)/1024/1024
----------------------------
93.3336782 |
|