행위

"오라클 메모리"의 두 판 사이의 차이

DB CAFE

(DB 메모리 (연결된 프로세스가 사용중인 추정치))
(DB 메모리 + 미연결된 세션 요청 추정치)
33번째 줄: 33번째 줄:
 
  where P.ADDR = S.paddr and s.username is not null;
 
  where P.ADDR = S.paddr and s.username is not null;
 
</source>
 
</source>
 
 
Get the maximum number of processes that an Oracle instance can handle.
 
 
 
 
select name, value from v$parameter
 
 
where name = 'processes';
 
 
 
 
Let's count the number of connected sessions:
 
 
 
 
select count(1) from v$session
 
 
where username is not null;
 
 
 
 
Get the total available connections by subtracting the connected sessions count from the processes parameter value.
 
 
The resulting value shall be multiplied by the resulting max allocated memory by a session done by the previous query.
 
 
This would then give you the estimated amount of reserve memory needed to accommodate additional connections.
 
 
 
 
 
 
ESTIMATED TOTAL MEMORY REQUIREMENT
 
 
 
 
 
 
SGA + PGA + UNCONNECTED SESSIONS = EST MEMORY REQUIREMENT AT MAXIMUM PROCESS UTILIZATION
 
 
 
where:
 
 
Unconnected Sessions (MB) = (processes - connected sessions) * pga max memory of user session
 

2021년 1월 7일 (목) 11:07 판

thumb_up 추천메뉴 바로가기


1 오라클 메모리 확인[편집]

1.1 DB 메모리 (연결된 프로세스가 사용중인 추정치)[편집]

  • SGA + PGA = EST MEMORY REQUIREMENT FOR CURRENT CONNECTIONS

1) SGA

SELECT sum(value)/1024/1024 "TOTAL SGA (MB)" 
  FROM v$sga;

2) PGA

select sum(pga_max_mem)/1024/1024 "TOTAL MAX PGA (MB)" 
  from v$process;

2-1) PGA 상세

SELECT spid, program
     , pga_max_mem      max
     , pga_alloc_mem    alloc
     , pga_used_mem     used
     , pga_freeable_mem free
FROM V$PROCESS;

1.2 DB 메모리 + 미연결된 세션 요청 추정치[편집]

아래 쿼리는 사용자 세션에 의해 할당 된 최대 메모리 입니다. 이를 사용하여 연결되지 않은 프로세스의 남은 메모리 요구 사항을 계산합니다.

select max(p.pga_max_mem)/1024/1024  PGA_MAX_USER_SESS -- " PGA MAX MEMORY OF USER SESSION(MB)"
  from v$process p
     , v$session s
 where P.ADDR = S.paddr and s.username is not null;