How It Works: What are the RING_BUFFER_RESOURCE_MONITOR telling me?

Published Jan 15 2019 12:23 PM 1,785 Views
Microsoft
First published on MSDN on Sep 17, 2009

The ring buffer records (which can be sent to XEvent) for Resource Monitor and Memory Broker are the key aspects to understanding RM.  The record is produced when a change is detected in state monitored by 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'E:\XEvent\RingBuffer.etx', metadatafile = N'E:\XEvent\RingBuffer.mta',

max_file_size = 50, max_rollover_files = 10)

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

Allow me to breakdown the following record.    ( select * from sys.dm_os_ring_buffers where ring_buffer_type = 'RING_BUFFER_RESOURCE_MONITOR'  )

<ResourceMonitor>

<Notification>RESOURCE_MEMPHYSICAL_LOW</Notification>  <---------------- Current notification state being broadcast to clerks

<IndicatorsProcess>2</IndicatorsProcess>   <-----------------------   Indicator applies to the process as low physical memory

<IndicatorsSystem>0</IndicatorsSystem> <-----------------------  0 means it is NOT a system wide indicator situation

<NodeId>0</NodeId>

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

<Effect type="APPLY_HIGHPM" state="EFFECT_IGNORE" reversed="0">128163281</Effect>

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

</ResourceMonitor>

The RM record has 3 major components showing various memory details.

The <RESOURCEMONITOR> portion of the record is handled from the local resource monitor.   You have a RM per scheduling node.
The <MEMORYNODE> details are from the memory node association or the RM.

The <MEMORYRECORD> comes from global state information.

The key for understanding why RM is running is in the ResourceMonitor section of the output.   This can be broken down into the Notification, Indicators and Effects.

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 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.



















The notification is the current RM state.  For example, once RM detects LOW PM state it is going to execute and attempt to shrink caches and other memory users.







The indicators tell you if this is an internal or external condition.   System wide indicates the system had a hand in the indication and process means it was something internal that SQL Server detected.







The Effects represent the state SQL thinks it is in by looking at the working set size and basic memory targets.   The EFFECT logic is used during system level checks.   For example the RM can look at the physical memory and it shows high but the effects indicate Windows paged SQL Server out so the high should be ignored so we don’t consume more memory and cause more paging.    The effects logic can be disabled using a startup trace flag –T8020 to avoid honoring the memory effects .   This might be an option on the servers to narrow down what can trigger RM to execute as long as the working sets of the SQL Server instances are running steady with the target memory but it should only be used for troubleshooting purposes.







From the ring buffer example is stating that this is not a system wide issue but a process issue.   The effects are off or ignore so it is not a working set type of issue so what turns this on to low physical?





There are memory broker decisions that come into play at this time.   What the information is is saying is that a cache or the cache’s predicted usage will exceed internal targets and we need to start doing cache cleanup.    By looking at the memory broker, ring buffer entries, you can see the behavior that broker it asking of RM.   Using the clock hands you can see the internal and external hand movement.   This will help you determine which caches are involved.    The dbcc memorystatus() show good details and last notification states as well.





When the SHRINK appears this is when it could tell RM to help out and result in RM showing the ring buffer above of LOW PM.





select * from sys.dm_os_memory_cache_clock_hands











MEMORYBROKER_FOR_CACHE (default)         Pages





---------------------------------------- -----------





Allocations                              1778





Rate                                     0





Target Allocations                       460798





Future Allocations                       0





Overall                                  482733





Last Notification                        1  ß---------------------------  Memory Broker NOTIFICATION



ACTIONS (STABLE) = 0

ACTIONS (GROW) = 1

ACTIONS (SHRINK) = 2





Bob Dorr - Principal SQL Server Escalation Engineer







%3CLINGO-SUB%20id%3D%22lingo-sub-315837%22%20slang%3D%22en-US%22%3EHow%20It%20Works%3A%20What%20are%20the%20RING_BUFFER_RESOURCE_MONITOR%20telling%20me%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-315837%22%20slang%3D%22en-US%22%3E%0A%20%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3DUTF-8%22%20%2F%26gt%3B%3CSTRONG%3E%20First%20published%20on%20MSDN%20on%20Sep%2017%2C%202009%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%3CP%3EThe%20ring%20buffer%20records%20(which%20can%20be%20sent%20to%20XEvent)%20for%20Resource%20Monitor%20and%20Memory%20Broker%20are%20the%20key%20aspects%20to%20understanding%20RM.%26nbsp%3B%20The%20record%20is%20produced%20when%20a%20change%20is%20detected%20in%20state%20monitored%20by%20RM.%3C%2FP%3E%0A%20%20%3CBLOCKQUOTE%3E%0A%20%20%20%3CP%3ECREATE%20EVENT%20SESSION%20RingBufferInfo%3C%2FP%3E%0A%20%20%20%3CP%3E%3C%2FP%3E%0A%20%20%20%3CP%3E%3C%2FP%3E%0A%20%20%20%3CP%3E%3C%2FP%3E%0A%20%20%20%3CP%3E%3C%2FP%3E%0A%20%20%20%3CP%3EON%20SERVER%3C%2FP%3E%0A%20%20%20%3CP%3E%3C%2FP%3E%0A%20%20%20%3CP%3E%3C%2FP%3E%0A%20%20%20%3CP%3E%3C%2FP%3E%0A%20%20%20%3CP%3E%3C%2FP%3E%0A%20%20%20%3CP%3EADD%20EVENT%20sqlos.resource_monitor_ring_buffer_recorded%2C%3C%2FP%3E%0A%20%20%20%3CP%3E%3C%2FP%3E%0A%20%20%20%3CP%3E%3C%2FP%3E%0A%20%20%20%3CP%3E%3C%2FP%3E%0A%20%20%20%3CP%3E%3C%2FP%3E%0A%20%20%20%3CP%3EADD%20EVENT%20sqlos.memory_broker_ring_buffer_recorded%3C%2FP%3E%0A%20%20%20%3CP%3E%3C%2FP%3E%0A%20%20%20%3CP%3E%3C%2FP%3E%0A%20%20%20%3CP%3E%3C%2FP%3E%0A%20%20%20%3CP%3E%3C%2FP%3E%0A%20%20%20%3CP%3EADD%20TARGET%20package0.asynchronous_file_target%3C%2FP%3E%0A%20%20%20%3CP%3E%3C%2FP%3E%0A%20%20%20%3CP%3E%3C%2FP%3E%0A%20%20%20%3CP%3E%3C%2FP%3E%0A%20%20%20%3CP%3E%3C%2FP%3E%0A%20%20%20%3CP%3E(SET%20filename%20%3D%20N'E%3A%5CXEvent%5CRingBuffer.etx'%2C%20metadatafile%20%3D%20N'E%3A%5CXEvent%5CRingBuffer.mta'%2C%3C%2FP%3E%0A%20%20%20%3CP%3E%3C%2FP%3E%0A%20%20%20%3CP%3E%3C%2FP%3E%0A%20%20%20%3CP%3E%3C%2FP%3E%0A%20%20%20%3CP%3E%3C%2FP%3E%0A%20%20%20%3CP%3Emax_file_size%20%3D%2050%2C%20max_rollover_files%20%3D%2010)%3C%2FP%3E%0A%20%20%20%3CP%3E%3C%2FP%3E%0A%20%20%20%3CP%3E%3C%2FP%3E%0A%20%20%20%3CP%3E%3C%2FP%3E%0A%20%20%20%3CP%3E%3C%2FP%3E%0A%20%20%20%3CP%3EWITH%20(MAX_MEMORY%3D4MB%2C%20MAX_EVENT_SIZE%3D4MB%2CSTARTUP_STATE%20%3D%20ON)%3B%3C%2FP%3E%0A%20%20%3C%2FBLOCKQUOTE%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3EAllow%20me%20to%20breakdown%20the%20following%20record.%26nbsp%3B%26nbsp%3B%26nbsp%3B%20(%20select%20*%20from%20sys.dm_os_ring_buffers%20where%20ring_buffer_type%20%3D%20'RING_BUFFER_RESOURCE_MONITOR'%26nbsp%3B%20)%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3CRESOURCEMONITOR%3E%3C%2FRESOURCEMONITOR%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3CNOTIFICATION%3ERESOURCE_MEMPHYSICAL_LOW%3C%2FNOTIFICATION%3E%26nbsp%3B%20%26lt%3B----------------%20Current%20notification%20state%20being%20broadcast%20to%20clerks%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3CINDICATORSPROCESS%3E2%3C%2FINDICATORSPROCESS%3E%26nbsp%3B%26nbsp%3B%20%26lt%3B-----------------------%26nbsp%3B%26nbsp%3B%20Indicator%20applies%20to%20the%20process%20as%20low%20physical%20memory%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3CINDICATORSSYSTEM%3E0%3C%2FINDICATORSSYSTEM%3E%20%26lt%3B-----------------------%26nbsp%3B%200%20means%20it%20is%20NOT%20a%20system%20wide%20indicator%20situation%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3CNODEID%3E0%3C%2FNODEID%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3CEFFECT%20type%3D%22%26quot%3BAPPLY_LOWPM%26quot%3B%22%20state%3D%22%26quot%3BEFFECT_OFF%26quot%3B%22%20reversed%3D%22%26quot%3B0%26quot%3B%22%3E0%3C%2FEFFECT%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3CEFFECT%20type%3D%22%26quot%3BAPPLY_HIGHPM%26quot%3B%22%20state%3D%22%26quot%3BEFFECT_IGNORE%26quot%3B%22%20reversed%3D%22%26quot%3B0%26quot%3B%22%3E128163281%3C%2FEFFECT%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3CEFFECT%20type%3D%22%26quot%3BREVERT_HIGHPM%26quot%3B%22%20state%3D%22%26quot%3BEFFECT_OFF%26quot%3B%22%20reversed%3D%22%26quot%3B0%26quot%3B%22%3E0%3C%2FEFFECT%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3EThe%20RM%20record%20has%203%20major%20components%20showing%20various%20memory%20details.%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3EThe%20%3CRESOURCEMONITOR%3E%20portion%20of%20the%20record%20is%20handled%20from%20the%20local%20resource%20monitor.%26nbsp%3B%26nbsp%3B%20You%20have%20a%20RM%20per%20scheduling%20node.%20%3CBR%20%2F%3E%20The%20%3CMEMORYNODE%3E%20details%20are%20from%20the%20memory%20node%20association%20or%20the%20RM.%3C%2FMEMORYNODE%3E%3C%2FRESOURCEMONITOR%3E%3C%2FP%3E%0A%20%20%3CP%3EThe%20%3CMEMORYRECORD%3E%20comes%20from%20global%20state%20information.%3C%2FMEMORYRECORD%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3EThe%20key%20for%20understanding%20why%20RM%20is%20running%20is%20in%20the%20ResourceMonitor%20section%20of%20the%20output.%26nbsp%3B%26nbsp%3B%20This%20can%20be%20broken%20down%20into%20the%20Notification%2C%20Indicators%20and%20Effects.%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CTABLE%3E%0A%20%20%20%3CTBODY%3E%3CTR%3E%0A%20%20%20%20%3CTD%3E%3CP%3ENotification%3C%2FP%3E%0A%20%20%20%20%20%3CP%3E%3C%2FP%3E%0A%20%20%20%20%20%3CP%3E%3C%2FP%3E%0A%20%20%20%20%20%3CP%3E%3C%2FP%3E%0A%20%20%20%20%20%3CP%3E%3C%2FP%3E%0A%20%20%20%20%3C%2FTD%3E%0A%20%20%20%20%3CTD%3E%3CP%3EConsidered%20the%20broadcasted%20notification%20state.%3C%2FP%3ERESOURCE_MEMPHYSICAL_HIGH%20-%20SQL%20can%20grow%20memory%20usage%20%3CBR%20%2F%3E%20RESOURCE_MEMPHYSICAL_LOW%20-%20System%20or%20internal%20physical%20memory%20-%20shrink%20%3CBR%20%2F%3E%20RESOURCE_MEM_STEADY%20%3CBR%20%2F%3E%20RESOURCE_MEMVIRTUAL_LOW%20%E2%80%93%20Virtual%20address%20range%20for%20SQL%20Server%20process%20is%20becoming%20exhausted.%20Commonly%20the%20largest%20free%20block%20is%20less%20than%204MB.%20%3CBR%20%2F%3E%3C%2FTD%3E%0A%20%20%20%3C%2FTR%3E%0A%20%20%20%3CTR%3E%0A%20%20%20%20%3CTD%3E%3CBR%20%2F%3E%3CP%3EIndicatorsProcess%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%3C%2FTD%3E%0A%20%20%20%20%3CTD%3E%3CBR%20%2F%3E%3CP%3EProcess%20wide%20indicator%20using%20an%20%7C%3D%20of%20the%20following%20values%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20IDX_MEMPHYSICAL_HIGH%20%3D%201%20%3CBR%20%2F%3E%20IDX_MEMPHYSICAL_LOW%20%3D%202%20%3CBR%20%2F%3E%20IDX_MEMVIRTUALL_LOW%20%3D%204%20%3CBR%20%2F%3E%3C%2FTD%3E%0A%20%20%20%3C%2FTR%3E%0A%20%20%20%3CTR%3E%0A%20%20%20%20%3CTD%3E%3CBR%20%2F%3E%3CP%3EIndicatorsSystem%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%3C%2FTD%3E%0A%20%20%20%20%3CTD%3E%3CBR%20%2F%3E%3CP%3ESystem%20wide%20indicator%20an%20%7C%3D%20of%20the%20following%20values%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20IDX_MEMPHYSICAL_HIGH%20%3D%201%20%3CBR%20%2F%3E%20IDX_MEMPHYSICAL_LOW%20%3D%202%20%3CBR%20%2F%3E%20IDX_MEMVIRTUALL_LOW%20%3D%204%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3EIt%20is%20considered%20a%20system%20indicator%20if%20the%20query%20routine%20returns%20TRUE.%26nbsp%3B%26nbsp%3B%20SQL%20Server%20listens%20to%20the%20Windows%20physical%20memory%20notifications%20so%20it%20can%20be%20signaled%20when%20physical%20memory%20becomes%20low%20or%20available.%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3EThis%20state%20is%20often%20the%20windows%20memory%20notifications%20unless%20an%20override%20occurs%20because%20of%20the%20the%20EFFECT%20information.%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%3C%2FTD%3E%0A%20%20%20%3C%2FTR%3E%0A%20%20%20%3CTR%3E%0A%20%20%20%20%3CTD%3E%3CBR%20%2F%3E%3CP%3EEffect%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%3C%2FTD%3E%0A%20%20%20%20%3CTD%3E%3CBR%20%2F%3E%3CP%3ECurrently%203%20types%20of%20effects%20exist%20so%20a%20row%20for%20each%20is%20produced.%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3EType%20%3D%20indicator%20type%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3EState%20%3D%20current%20effect%20state%26nbsp%3B%20(ON%2C%20OFF%20or%20IGNORE%20are%20valid%20states)%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3EReserved%3D%20this%20maps%20to%20an%20applied%20state%20that%20toggles%20from%200%20or%201%20based%20on%20if%20the%20effect%20has%20been%20applied.%26nbsp%3B%20Applied%20indicates%20that%20the%20memory%20state%20has%20broadcast%20and%20we%20have%20achieved%20somewhat%20of%20a%20steady%20state%20for%20this%20indicator.%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3EValue%20%3D%20duration%20that%20the%20effect%20has%20been%20in%20the%20reported%20state.%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%3C%2FTD%3E%0A%20%20%20%3C%2FTR%3E%0A%20%20%20%3CTR%3E%0A%20%20%20%20%3CTD%3E%3CBR%20%2F%3E%3CP%3ENodeId%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%3C%2FTD%3E%0A%20%20%20%20%3CTD%3E%3CBR%20%2F%3E%3CP%3EMemory%20Node%20association%20of%20the%20RM.%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%3C%2FTD%3E%0A%20%20%20%3C%2FTR%3E%0A%20%20%3C%2FTBODY%3E%3C%2FTABLE%3E%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3EThe%20notification%20is%20the%20current%20RM%20state.%26nbsp%3B%20For%20example%2C%20once%20RM%20detects%20LOW%20PM%20state%20it%20is%20going%20to%20execute%20and%20attempt%20to%20shrink%20caches%20and%20other%20memory%20users.%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3EThe%20indicators%20tell%20you%20if%20this%20is%20an%20internal%20or%20external%20condition.%26nbsp%3B%26nbsp%3B%20System%20wide%20indicates%20the%20system%20had%20a%20hand%20in%20the%20indication%20and%20process%20means%20it%20was%20something%20internal%20that%20SQL%20Server%20detected.%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3EThe%20Effects%20represent%20the%20state%20SQL%20thinks%20it%20is%20in%20by%20looking%20at%20the%20working%20set%20size%20and%20basic%20memory%20targets.%26nbsp%3B%26nbsp%3B%20The%20EFFECT%20logic%20is%20used%20during%20system%20level%20checks.%26nbsp%3B%26nbsp%3B%20For%20example%20the%20RM%20can%20look%20at%20the%20physical%20memory%20and%20it%20shows%20high%20but%20the%20effects%20indicate%20Windows%20paged%20SQL%20Server%20out%20so%20the%20high%20should%20be%20ignored%20so%20we%20don%E2%80%99t%20consume%20more%20memory%20and%20cause%20more%20paging.%26nbsp%3B%26nbsp%3B%26nbsp%3B%20The%20effects%20logic%20can%20be%20disabled%20using%20a%20startup%20trace%20flag%20%E2%80%93T8020%20to%20avoid%20honoring%20the%20memory%20effects%20%3CI%3E%20.%26nbsp%3B%26nbsp%3B%20This%20might%20be%20an%20option%20on%20the%20servers%20to%20narrow%20down%20what%20can%20trigger%20RM%20to%20execute%20as%20long%20as%20the%20working%20sets%20of%20the%20SQL%20Server%20instances%20are%20running%20steady%20with%20the%20target%20memory%20but%20it%20should%20only%20be%20used%20for%20troubleshooting%20purposes.%20%3C%2FI%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3EFrom%20the%20ring%20buffer%20example%20is%20stating%20that%20this%20is%20not%20a%20system%20wide%20issue%20but%20a%20process%20issue.%26nbsp%3B%26nbsp%3B%20The%20effects%20are%20off%20or%20ignore%20so%20it%20is%20not%20a%20working%20set%20type%20of%20issue%20so%20what%20turns%20this%20on%20to%20low%20physical%3F%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3EThere%20are%20memory%20broker%20decisions%20that%20come%20into%20play%20at%20this%20time.%26nbsp%3B%26nbsp%3B%20What%20the%20information%20is%20is%20saying%20is%20that%20a%20cache%20or%20the%20cache%E2%80%99s%20predicted%20usage%20will%20exceed%20internal%20targets%20and%20we%20need%20to%20start%20doing%20cache%20cleanup.%26nbsp%3B%26nbsp%3B%26nbsp%3B%20By%20looking%20at%20the%20memory%20broker%2C%20ring%20buffer%20entries%2C%20you%20can%20see%20the%20behavior%20that%20broker%20it%20asking%20of%20RM.%26nbsp%3B%26nbsp%3B%20Using%20the%20clock%20hands%20you%20can%20see%20the%20internal%20and%20external%20hand%20movement.%26nbsp%3B%26nbsp%3B%20This%20will%20help%20you%20determine%20which%20caches%20are%20involved.%26nbsp%3B%26nbsp%3B%26nbsp%3B%20The%20dbcc%20memorystatus()%20show%20good%20details%20and%20last%20notification%20states%20as%20well.%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3EWhen%20the%20SHRINK%20appears%20this%20is%20when%20it%20could%20tell%20RM%20to%20help%20out%20and%20result%20in%20RM%20showing%20the%20ring%20buffer%20above%20of%20LOW%20PM.%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3Eselect%20*%20from%20sys.dm_os_memory_cache_clock_hands%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3EMEMORYBROKER_FOR_CACHE%20(default)%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Pages%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E----------------------------------------%20-----------%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3EAllocations%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%201778%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3ERate%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%200%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3ETarget%20Allocations%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20460798%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3EFuture%20Allocations%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%200%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3EOverall%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20482733%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3ELast%20Notification%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%201%26nbsp%3B%20%C3%9F---------------------------%26nbsp%3B%20Memory%20Broker%20NOTIFICATION%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3EACTIONS%20(STABLE)%20%3D%200%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20ACTIONS%20(GROW)%20%3D%201%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20ACTIONS%20(SHRINK)%20%3D%202%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3EBob%20Dorr%20-%20Principal%20SQL%20Server%20Escalation%20Engineer%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%0A%20%0A%3CLINGO-TEASER%20id%3D%22lingo-teaser-315837%22%20slang%3D%22en-US%22%3EFirst%20published%20on%20MSDN%20on%20Sep%2017%2C%202009%20The%20ring%20buffer%20records%20(which%20can%20be%20sent%20to%20XEvent)%20for%20Resource%20Monitor%20and%20Memory%20Broker%20are%20the%20key%20aspects%20to%20understanding%20RM.%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-315837%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3Ememory%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESQL%20OS%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ETroubleshooting%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Version history
Last update:
‎Jan 15 2019 12:23 PM
Updated by: