행위

Ash size 변경 ASH SIZE

DB CAFE

thumb_up 추천메뉴 바로가기


1 ash size 변경[편집]

  • alert log 내용중
Active Session History (ASH) performed an emergency flush. This may mean that ASH is undersized. 
If emergency flushes are a recurring issue, you may consider increasing ASH size by 
setting the value of _ASH_SIZE to a sufficiently large value. Currently, 
ASH size is 17000944 bytes. Both ASH size and the total number of emergency flushes 
since instance startup can be monitored by running the following query:
select total_size,awr_flush_emergency_count from v$ash_info;


  • RAC의 경우 한쪽에서 작업 시 모든 노드에 적용됨
SQL> select total_size from v$ash_info;
 
TOTAL_SIZE
----------
   2097152
-- 2MB로 할당되어 있음
  • 시스템에 즉시 반영됨 (리부팅 필요없음)
SQL> alter system set "_ash_size"=3145728;
 
System altered.

-- 확인 
SQL> select total_size from v$ash_info;
 
TOTAL_SIZE
----------
   3145728


1.1 발생원인[편집]

  1. Active session 증가에 따른 ASH 버퍼 부족
  2. 시스템의 일부 활동으로 인해 더 많은 Active session이 발생하여 ASH 버퍼를 평소보다 빠르게 채우면 alert log에 위 메시지가 표시됨
  3. 메세지 그 자체는 문제가 아니며 데이터베이스에서 최대 활동을 지원하기 위해 버퍼를 늘려야 할 수도 있음

1.2 버전별 최대 사이즈[편집]

  1. 11g 이하에서 "_ash_size"의 설정 가능한 최대 크기는 254MB(즉, 2MB 크기의 127개 청크)
  2. 12c 이상에서 "_ash_size"의 설정 가능한 최대 크기는 254MB 이상


  • "_ash_size" 를 더 높은 값을 설정할 수 있지만 내부적으로 254MB로 조정됨
  • 254MB 이상의 값으로 설정하면 ORA-2097 메세지가 발생
-- 400MB로 설정 시
SQL> alter system set "_ash_size"=419430400;alter system set "_ash_size"=419430400
 
*
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-02097: parameter cannot be modified because specified value is invalid
  • ORA-2097 메세지가 발생함