Check maximum memory utilization for oracle Database
-- SGA + PGA is best not to exceed 70% of the total memory
on linux
$ free -g
total used free shared buffers cached
Mem: 11 11 0 0 0 4
-/+ buffers/cache: 6 4
Swap: 13 0 12
--check the utilization of all the components
COLUMN name FORMAT A30
COLUMN value FORMAT A10
SELECT name, value /1024/1024
FROM v$parameter
WHERE name IN ('pga_aggregate_target', 'sga_target','memory_target')
UNION
SELECT 'maximum PGA allocated' AS name, TO_CHAR(value)/1024/1024 AS value
FROM v$pgastat
WHERE name = 'maximum PGA allocated';
--check the utilization of all the components of memory
select component ,CURRENT_SIZE/1024/1024 "CURRENT_SIZE in MB" ,MIN_SIZE/1024/1024
,MAX_SIZE/1024/1024 "MAX_SIZE in MB" ,USER_SPECIFIED_SIZE/1024/1024 "USER_SPECIFIED_SIZE in MB", LAST_OPER_TYPE
from v$memory_dynamic_components
where component in ('SGA Target','PGA Target');
--check the utilization of SGA
col COMPONENT format a30
col CURRENT_SIZE format 99999999999
col MIN_SIZE format 99999999999
col MAX_SIZE format 99999999999
col USER_SPECIFIED_SIZE format 99999999999
col LAST_OPER_TYPE format a15
select inst_id,
COMPONENT ,
CURRENT_SIZE/1024/1024 "CURRENT_SIZE in MB" ,
MIN_SIZE/1024/1024
,MAX_SIZE/1024/1024 "MAX_SIZE in MB" ,
USER_SPECIFIED_SIZE/1024/1024 "USER_SPECIFIED_SIZE in MB",
LAST_OPER_TYPE
from gv$sga_dynamic_components
where component in ('shared pool','large pool','java pool','streams pool','DEFAULT buffer cache');
-- SGA + PGA is best not to exceed 70% of the total memory
on linux
$ free -g
total used free shared buffers cached
Mem: 11 11 0 0 0 4
-/+ buffers/cache: 6 4
Swap: 13 0 12
--check the utilization of all the components
COLUMN name FORMAT A30
COLUMN value FORMAT A10
SELECT name, value /1024/1024
FROM v$parameter
WHERE name IN ('pga_aggregate_target', 'sga_target','memory_target')
UNION
SELECT 'maximum PGA allocated' AS name, TO_CHAR(value)/1024/1024 AS value
FROM v$pgastat
WHERE name = 'maximum PGA allocated';
--check the utilization of all the components of memory
select component ,CURRENT_SIZE/1024/1024 "CURRENT_SIZE in MB" ,MIN_SIZE/1024/1024
,MAX_SIZE/1024/1024 "MAX_SIZE in MB" ,USER_SPECIFIED_SIZE/1024/1024 "USER_SPECIFIED_SIZE in MB", LAST_OPER_TYPE
from v$memory_dynamic_components
where component in ('SGA Target','PGA Target');
--check the utilization of SGA
col COMPONENT format a30
col CURRENT_SIZE format 99999999999
col MIN_SIZE format 99999999999
col MAX_SIZE format 99999999999
col USER_SPECIFIED_SIZE format 99999999999
col LAST_OPER_TYPE format a15
select inst_id,
COMPONENT ,
CURRENT_SIZE/1024/1024 "CURRENT_SIZE in MB" ,
MIN_SIZE/1024/1024
,MAX_SIZE/1024/1024 "MAX_SIZE in MB" ,
USER_SPECIFIED_SIZE/1024/1024 "USER_SPECIFIED_SIZE in MB",
LAST_OPER_TYPE
from gv$sga_dynamic_components
where component in ('shared pool','large pool','java pool','streams pool','DEFAULT buffer cache');
No comments:
Post a Comment