Ring_Buffer_Resource_Monitor

jevida(강성욱) 2016.10.13 06:25 Views : 1094

Ring_Buffer_Resource_Monitor

 

  • Version : SQL Server 2005, 2008, 2008R2, 2012

 

 

리소스 모니터 및 메모리 브로커 기록은 RM의 핵심 요소이다. RM이 변경될 때 모니터링에 검출되어 기록 된다.

 

다음과 같은 이벤트 세션을 생성하여 링 버퍼 모니터링을 할 수 있다.

CREATE EVENT SESSION RingBufferInfo

ON SERVER

    ADD EVENT sqlos.resource_monitor_ring_buffer_recorded,

    ADD EVENT sqlos.memory_broker_ring_buffer_recorded

    ADD TARGET package0.asynchronous_file_target

(SET filename = N'c:\XEvent\RingBuffer.etx', metadatafile = N'c:\XEvent\RingBuffer.mta', max_file_size = 50, max_rollover_files = 10)

WITH (MAX_MEMORY=4MB, MAX_EVENT_SIZE=4MB,STARTUP_STATE = ON);

 

다음 DMV를 통해서 링 버퍼 리소스 모니터를 확인 할 수 도 있다.

select * from sys.dm_os_ring_buffers where ring_buffer_type = 'RING_BUFFER_RESOURCE_MONITOR'

 

 

<ResourceMonitor>

<Notification>RESOURCE_MEMPHYSICAL_HIGH</Notification>

<IndicatorsProcess>0</IndicatorsProcess>

<IndicatorsSystem>1</IndicatorsSystem>

<NodeId>0</NodeId>

<Effect type="APPLY_LOWPM" state="EFFECT_OFF" reversed="0">0</Effect>

<Effect type="APPLY_HIGHPM" state="EFFECT_ON" reversed="0">0</Effect>

<Effect type="REVERT_HIGHPM" state="EFFECT_OFF" reversed="0">0</Effect>

</ResourceMonitor>

<MemoryNode id="0">

 

다음 표에서 리소스 모니터에 기록된 상태 값의 의미를 살펴 보자.

Notification

Considered the broadcasted notification state.

  • RESOURCE_MEMPHYSICAL_HIGH - SQL can grow memory usage
  • RESOURCE_MEMPHYSICAL_LOW - System or internal physical memory – shrink
  • RESOURCE_MEM_STEADY
  • RESOURCE_MEMVIRTUAL_LOW – Virtual address range for SQL Server process is becoming exhausted. Commonly the largest free block is less than 4MB

IndicatorsProcess

Process wide indicator using an |= of the following values

  • IDX_MEMPHYSICAL_HIGH = 1
  • IDX_MEMPHYSICAL_LOW = 2
  • IDX_MEMVIRTUALL_LOW = 4

IndicatorsSystem

System wide indicator an |= of the following values

  • IDX_MEMPHYSICAL_HIGH = 1
  • IDX_MEMPHYSICAL_LOW = 2
  • IDX_MEMVIRTUALL_LOW = 4

It is considered a system indicator if the query routine returns TRUE. SQL Server listens to the Windows physical memory notifications so it can be signaled when physical memory becomes low or available.

This state is often the windows memory notifications unless an override occurs because of the EFFECT information.

Effect

Currently 3 types of effects exist so a row for each is produced.

  • Type = indicator type
  • State = current effect state (ON, OFF or IGNORE are valid states)
  • Reserved= this maps to an applied state that toggles from 0 or 1 based on if the effect has been applied. Applied indicates that the memory state has broadcast and we have achieved somewhat of a steady state for this indicator.
  • Value = duration that the effect has been in the reported state.

NodeId

Memory Node association of the RM

 

 

[참고자료]

http://blogs.msdn.com/b/psssql/archive/2009/09/17/how-it-works-what-are-the-ring-buffer-resource-monitor-telling-me.aspx

 

 

강성욱 / jevida@naver.com
Microsoft SQL Server MVP
Blog : http://sqlmvp.kr
Facebook : http://facebook.com/sqlmvp

No. Subject Author Date Views
Notice SQL강좌: 챗GPT와 함께 배우는 SQL Server 무료 강좌 목차와 소개 (2023년 9월 업데이트) 코난(김대우) 2023.08.18 41489
Notice Python 무료 강좌 - 기초, 중급, 머신러닝(2023년 6월 업데이트) 코난(김대우) 2021.01.01 22481
1934 확장이벤트를 사용하여 데드락 정보 확인 jevida(강성욱) 2016.10.15 1665
1933 확장 이벤트를 사용한 CPU 고부하 쿼리 추적 [1] jevida(강성욱) 2016.10.15 2231
1932 데이터에 대한 이해와 spill in tempdb jevida(강성욱) 2016.10.13 1826
1931 로그 파일이 많으면 왜 안 좋은가 jevida(강성욱) 2016.10.13 2131
1930 트랜잭션 백업 실패와 전체 백업 성공 그리고 대처 방안 jevida(강성욱) 2016.10.13 1620
1929 Fast recovery 와 로그 잠금 jevida(강성욱) 2016.10.13 2084
1928 고스트 클린업 jevida(강성욱) 2016.10.13 2354
1927 페이지 분할이 발생 하였을 때 롤백을 하면 어떻게 될까? jevida(강성욱) 2016.10.13 1712
1926 DBCC WRITEPAGE - DBCC 명령을 사용한 데이터 파괴하기 jevida(강성욱) 2016.10.13 1709
1925 SQL Server Backup Error 3023 jevida(강성욱) 2016.10.13 2455
1924 Delete 작업과 페이지 offset 변화 jevida(강성욱) 2016.10.13 1557
1923 트랜잭션 로그 및 LSN을 이용한 삭제된 데이터 복구 jevida(강성욱) 2016.10.13 5878
1922 PFX 형식의 인증서를 SQL Server에서 사용하기 jevida(강성욱) 2016.10.13 1216
1921 SQL Server NUMA 메모리 노드와 Operating System 접근 jevida(강성욱) 2016.10.13 1370
1920 SQL Server 에러 핸들링 비용 비교 jevida(강성욱) 2016.10.13 1362
1919 압축 백업 시 Checksum 옵션으로 손상 확인하기 jevida(강성욱) 2016.10.13 1758
1918 SQL Server 2012 Memory Manager 구성 jevida(강성욱) 2016.10.13 1305
1917 SQL Server Memory Manager 변화 jevida(강성욱) 2016.10.13 1563
» Ring_Buffer_Resource_Monitor jevida(강성욱) 2016.10.13 1094
1915 SQL Server 프로파일러 템플릿 만들기 jevida(강성욱) 2016.10.13 1430





XE Login