"오라클 메모리"의 두 판 사이의 차이
DB CAFE
(새 문서: == 오라클 메모리 확인 == === DB 메모리 (연결된 프로세스가 사용중인 추정치) === # SGA + PGA = EST MEMORY REQUIREMENT FOR CURRENT CONNECTIONS # SGA <source lan...) |
(→DB 메모리 (연결된 프로세스가 사용중인 추정치)) |
||
1번째 줄: | 1번째 줄: | ||
== 오라클 메모리 확인 == | == 오라클 메모리 확인 == | ||
=== DB 메모리 (연결된 프로세스가 사용중인 추정치) === | === DB 메모리 (연결된 프로세스가 사용중인 추정치) === | ||
− | + | * SGA + PGA = EST MEMORY REQUIREMENT FOR CURRENT CONNECTIONS | |
− | + | 1) SGA | |
<source lang=sql> | <source lang=sql> | ||
SELECT sum(value)/1024/1024 "TOTAL SGA (MB)" | SELECT sum(value)/1024/1024 "TOTAL SGA (MB)" | ||
FROM v$sga; | FROM v$sga; | ||
</source> | </source> | ||
− | + | 2) PGA | |
<source lang=sql> | <source lang=sql> | ||
select sum(pga_max_mem)/1024/1024 "TOTAL MAX PGA (MB)" | select sum(pga_max_mem)/1024/1024 "TOTAL MAX PGA (MB)" | ||
from v$process; | from v$process; | ||
</source> | </source> | ||
− | + | 2-1) PGA 상세 | |
<source lang=sql> | <source lang=sql> | ||
SELECT spid, program | SELECT spid, program |
2021년 1월 7일 (목) 11:06 판
- DBA { Oracle DBA 명령어 > DBA 초급 과정 > DBA 고급 과정 }
- 튜닝 { 오라클 튜닝 목록 }
- 모델링 { 데이터 모델링 가이드 }
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;
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