Ring_Buffer_Resource_Monitor

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

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 2023년 1월 - SQLER의 업데이트 강좌 리스트 코난(김대우) 2023.01.02 1291
1926 DBCC WRITEPAGE - DBCC 명령을 사용한 데이터 파괴하기 jevida(강성욱) 2016.10.13 1672
1925 SQL Server Backup Error 3023 jevida(강성욱) 2016.10.13 2366
1924 Delete 작업과 페이지 offset 변화 jevida(강성욱) 2016.10.13 1517
1923 트랜잭션 로그 및 LSN을 이용한 삭제된 데이터 복구 jevida(강성욱) 2016.10.13 5422
1922 PFX 형식의 인증서를 SQL Server에서 사용하기 jevida(강성욱) 2016.10.13 1185
1921 SQL Server NUMA 메모리 노드와 Operating System 접근 jevida(강성욱) 2016.10.13 1334
1920 SQL Server 에러 핸들링 비용 비교 jevida(강성욱) 2016.10.13 1346
1919 압축 백업 시 Checksum 옵션으로 손상 확인하기 jevida(강성욱) 2016.10.13 1695
1918 SQL Server 2012 Memory Manager 구성 jevida(강성욱) 2016.10.13 1286
1917 SQL Server Memory Manager 변화 jevida(강성욱) 2016.10.13 1525
» Ring_Buffer_Resource_Monitor jevida(강성욱) 2016.10.13 1018
1915 SQL Server 프로파일러 템플릿 만들기 jevida(강성욱) 2016.10.13 1389
1914 SQL Server 메모리 병목 현상 식별 jevida(강성욱) 2016.10.13 1874
1913 SQL Server 시작 옵션 사용 jevida(강성욱) 2016.10.13 1896
1912 Ring buffer를 활용한 External Memory Pressure 확인 jevida(강성욱) 2016.10.12 1346
1911 Memory Pressure jevida(강성욱) 2016.10.12 1155
1910 64비트 버전의 SQL Server 버퍼 풀 메모리 페이지 수 줄이는 방법 jevida(강성욱) 2016.10.12 2616
1909 누락된 공유 잠금 (Missing Shared Locks) jevida(강성욱) 2016.10.12 1595
1908 Ad Hoc Distributed Queries 옵션 jevida(강성욱) 2016.10.12 3263
1907 높은 MAXDOP은 쿼리를 느리게 만들 수 있는가? jevida(강성욱) 2016.10.12 1371





XE Login