SGA (System Global Area) : 공용 메모리 영역

공유풀 (Shared Pool) : 고정영역 (Permanent Area) + 동적영역 (Dynamic Area)
    - 동적영역 : 라이브러리 캐쉬 + 데이터 딕셔너리 캐쉬
    - SQL 쿼리 (Clicent) -> Data Dictionary에서 테이블 존재유무 파악 
       -> Query가 올바르면 Library Cache에 분석 정보, 실행 계획을 저장한다.
    - SHARED_POOL_RESERVED_SIZE
       : 메모리에 미리 공간을 확보하여 메모리 조각 부족으로 SQL 수행이 실패하는 것을 막기 위해 설정한다.
         너무 크면 메모리 낭비되고, 작으면 ORA-4031 에러 발생 가능성이 올라감

 

데이터 버퍼 캐쉬 (Data Buffer Cache)
    - 디스크에서 읽은 자료를 메모리에 저장할 때 사용하는 기억장소
    - DB_CACHE_SIZE
    - 디스크 I/O를 줄이려고 가장 크게 잡힌다.




리두 로그 버퍼 (Redo Log Buffer)


대형 풀 (Large Pool)


자바 풀 (Java Pool)



SQL> show sga

Total System Global Area  285212672 bytes
Fixed Size      1218992 bytes
Variable Size     75499088 bytes
Database Buffers   205520896 bytes
Redo Buffers      2973696 bytes

SQL> select * from v$sga;

NAME           VALUE
---------------------------------------- ----------
Fixed Size        1218992
Variable Size       75499088
Database Buffers     205520896
Redo Buffers        2973696


SQL> select * from v$sgastat;

POOL    NAME          BYTES
------------------------ ---------------------------------------------------- ----------
...

shared pool   KTI latches           288
shared pool   KKJ WRK LAT           300
shared pool   kfkhsh_kfdsg          2052
shared pool   event statistics ptr arra         680
shared pool   KGKP randnum         40000
large pool   PX msg pool        206208
large pool   free memory       3988096
java pool   free memory       4194304

597 rows selected.



SQL> select * from v$sga_dynamic_components;

COMPONENT                CURRENT_SIZE MIN_SIZE   MAX_SIZE USER_SPECIFIED_SIZE OPER_COUNT LAST_OPER_TYPE       LAST_OPER_MODE  LAST_OPER_TI GRANULE_SIZE
-------------------------------------------------------------------------------------------------------------------------------- ------------ ---------- ---------- ------------------- ---------- -------------------------- ------------------ ------------ ------------
shared pool                    67108864 67108864   0        0   0 STATIC          4194304
large pool                     4194304  4194304   0        0   0 STATIC          4194304
java pool                     4194304  4194304   0        0   0 STATIC          4194304
streams pool                    0        0   0        0   0 STATIC          4194304
DEFAULT buffer cache                  205520896  205520896   0        0   0 INITIALIZING          4194304
KEEP buffer cache                   0        0   0        0   0 STATIC          4194304
RECYCLE buffer cache                   0        0   0        0   0 STATIC          4194304
DEFAULT 2K buffer cache                   0        0   0        0   0 STATIC          4194304
DEFAULT 4K buffer cache                   0        0   0        0   0 STATIC          4194304
DEFAULT 8K buffer cache                   0        0   0        0   0 STATIC          4194304
DEFAULT 16K buffer cache                  0        0   0        0   0 STATIC          4194304
DEFAULT 32K buffer cache                  0        0   0        0   0 STATIC          4194304
ASM Buffer Cache                   0        0   0        0   0 STATIC          4194304

13 rows selected.



SQL> alter system set parameter_name=변경값;

예제) alter system set db_cache_size = 20M;
        alter system set shared_pool_size = 28M;


SQL> show parameter cache_size


+ Recent posts