DB_CACHE_SIZE, LARGE_POOL_SIZE SHARED_POOL_SIZE

2024. 2. 14. 10:04DBMS/ORACLE Admin

반응형

 

DB_CACHE_SIZE, LARGE_POOL_SIZE SHARED_POOL_SIZE는 데이터베이스 인스턴스 내의 다른 구성 요소에 대한 메모리 할당을 제어하는 매개변수이다. 


□ DB_CACHE_SIZE: 데이터베이스 인스턴스의 기본 버퍼 캐시 크기를 바이트 단위로 지정한다. 버퍼 캐시는 디스크에서 읽은 데이터 블록이 메모리에 보관되어 디스크 I/O 작업의 빈도를 줄여 데이터베이스 성능을 향상시킬 수 있다. 그러나 너무 많은 메모리를 버퍼 캐시에 할당하면 다른 메모리 영역에 대한 경합과 잠재적인 성능 문제가 발생할 수도 있다.

  LARGE_POOL_SIZE: SGA(System Global Area)의 선택적인 메모리 영역으로서, 백업 및 복원 작업, 병렬 실행 및 I/O 서버 프로세스와 같은 대규모 할당에 사용된다. 



 SHARED_POOL_SIZE:  SQL 및 PL/SQL 코드뿐만 아니라 데이터 dictionary cache, 라이브러리 캐시 및 병렬 실행을 위한 제어 구조와 같은 다른 공유 메모리 구조를 저장하는 데 사용된다. 효율적인 메모리 사용과 경합을 피하기 위해 이 매개변수를 모니터링하고 조정하는 것이 중요하다.

 

SELECT
    NAME,
    VALUE
FROM
    V$PARAMETER
WHERE
  7      NAME IN ('db_cache_size', 'large_pool_size', 'shared_pool_size');

NAME                                     VALUE
---------------------------------------- -------------------------------------------------------
shared_pool_size                         0
large_pool_size                          0
db_cache_size                            0

 

자동관리 되는 메모리는 0으로 표시됨

 

 

SYS@orcl>select
  2  component,
  3  current_size
  4  from
  5  v$sga_dynamic_components
  6  where
  7  component in ('DEFAULT buffer cache', 'large pool', 'shared pool');

COMPONENT                                                        CURRENT_SIZE
---------------------------------------------------------------- ------------
shared pool                                                         167772160
large pool                                                            8388608
DEFAULT buffer cache                                                322961408

- SGA의 현재 메모리 컴포넌트 크기

 

 

 

 

SELECT
    NAME,
    VALUE
FROM
    V$PARAMETER
WHERE
  7      NAME IN ('sga_target', 'sga_max_size', 'memory_target', 'memory_max_target');

NAME                                     VALUE
---------------------------------------- -------------------------------------------------------
sga_max_size                             536870912
sga_target                               536870912
memory_target                            838860800
memory_max_target                        838860800

 

 

- 자동 메모리 관리가 활성화된 경우

 

 

 

 

더보기

`DB_CACHE_SIZE`, `LARGE_POOL_SIZE`, and `SHARED_POOL_SIZE` are parameters in Oracle Database that control the memory allocation for different components within the database instance. 

1. DB_CACHE_SIZE: This parameter specifies the size, in bytes, of the default buffer cache for the database instance. The buffer cache is where data blocks read from disk are held in memory. A larger cache size can improve database performance by reducing the frequency of disk I/O operations. However, allocating too much memory to the buffer cache can also lead to contention for other memory areas and potential performance issues.

2. LARGE_POOL_SIZE: The large pool is an optional area of memory in the SGA (System Global Area) that is used for large allocations, such as for backup and restore operations, parallel execution, and I/O server processes. Setting an appropriate size for the large pool can improve the performance of these operations.

3. SHARED_POOL_SIZE: The shared pool is a critical area of memory in the SGA that is used to store SQL and PL/SQL code, along with other shared memory structures such as data dictionary cache, library cache, and control structures for parallel execution. Proper sizing of the shared pool is essential for optimizing SQL execution and overall database performance. It's important to monitor and adjust this parameter to avoid contention and ensure efficient memory utilization.

These parameters should be carefully configured based on the workload and resource requirements of your specific database environment. It's recommended to monitor performance metrics and adjust these parameters as needed to achieve optimal performance.

 

  

 
반응형

'DBMS > ORACLE Admin' 카테고리의 다른 글

SELECT * FROM V$LOG  (0) 2024.02.24
PDB CDB  (0) 2024.02.15
Oracle Dispatcher  (0) 2024.02.11
PFILE(Parameter File)에서 SPFILE(System Parameter File)을 생성하는 이유  (0) 2024.02.10
DATABASE DDL 구문  (0) 2024.02.10