資源集區記憶體消耗

Microsoft.SQLServer.2016.Monitor.UserResourcePool.MemoryConsumption (UnitMonitor)

資源集區使用的記憶體數量大於臨界值設定 (以指定的資源集區記憶體最佳化資料的資料表之可用記憶體百分比表示) 時,此監視器會回報重大狀態,並引發警示。

Knowledge Base article:

摘要

資源集區使用的記憶體數量大於臨界值設定 (以指定的資源集區記憶體最佳化資料的資料表之可用記憶體百分比表示) 時,此監視器會回報重大狀態,並引發警示。

對應至記憶體最佳化資料庫的具名資源集區,會追蹤配置給所有記憶體最佳化資料表的記憶體,包括用於記憶體最佳化資料引擎內各種結構的內部資料表。

原因

SQL Server 記憶體最佳化資料所使用的記憶體比 SQL Server 多,而且使用方法也不同。為記憶體最佳化資料所安裝及配置的記憶體數量,可能會變得無法滿足成長需求。如果發生這種情況,可能會用盡記憶體。

如需詳細資料,請參閱本文: Bind a Database with Memory-Optimized Tables to a Resource Pool (將含記憶體最佳化資料表的資料庫繫結至資源集區)

解決方式

若要解決記憶體太少或記憶體不足的情況,您需要降低使用量來釋出現有記憶體,或是為記憶體最佳化資料的資料表提供更多記憶體。可能的更正動作包括:

外部資源

如何管理記憶體最佳化資料的記憶體

可覆寫的參數

名稱

描述

預設值

警示優先程式

定義警示優先順序。

一般

警示嚴重性

定義警示嚴重性。

錯誤

已啟用

啟用或停用該工作流程。

產生警示

定義工作流程是否會產生警示。

間隔 (秒)

執行工作流程的週期性時間間隔 (秒)。

300

範例數

指出測量值在違反臨界值多少次之後,才會變更狀態。

6

指令碼延遲 (毫秒)

此參數可設定工作流程所執行的連續 T-SQL 查詢之間的延遲。這可能有助於減少工作流程在有大量目標物件時,所產生的磁碟使用量。請先取得 Microsoft 支援服務的建議,再變更此參數。

0

同步處理時間

使用 24 小時制指定的同步處理時間。將會忽略。

00:07

臨界值

收集的值會與此參數相比。

90

逾時 (秒)

指定允許工作流程在關閉且標示為失敗之前執行的時間。

180

Element properties:

TargetMicrosoft.SQLServer.2016.UserResourcePool
Parent MonitorSystem.Health.PerformanceState
CategoryPerformanceHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SQLServer.2016.MonitorType.UserResourcePool.MemoryConsumption
RemotableTrue
AccessibilityPublic
Alert Message
MSSQL 2016: 記憶體最佳化資料: 資源集區使用太多記憶體。
資源集區 "{0}" 使用太多記憶體。
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.2016.Monitor.UserResourcePool.MemoryConsumption" Target="SQL2016Core!Microsoft.SQLServer.2016.UserResourcePool" ParentMonitorID="SystemHealth!System.Health.PerformanceState" TypeID="Microsoft.SQLServer.2016.MonitorType.UserResourcePool.MemoryConsumption" Accessibility="Public" Enabled="true" Remotable="true" Priority="Normal" ConfirmDelivery="true">
<Category>PerformanceHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.2016.Monitor.UserResourcePool.MemoryConsumption.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Property[Type="SQL2016Core!Microsoft.SQLServer.2016.ResourcePool"]/Name$</AlertParameter1>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="ErrorState" MonitorTypeStateID="ErrorState" HealthState="Error"/>
<OperationalState ID="SuccessState" MonitorTypeStateID="SuccessState" HealthState="Success"/>
</OperationalStates>
<Configuration>
<IntervalSeconds>300</IntervalSeconds>
<SyncTime/>
<ServerName>$Target/Host/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ServerName>
<SqlInstanceName>$Target/Host/Host/Property[Type="SQL2016Core!Microsoft.SQLServer.2016.ServerRole"]/InstanceName$</SqlInstanceName>
<Value>$Data/Property[@Name='PoolUsedMemoryPercent']$</Value>
<PoolID>$Target/Property[Type="SQL2016Core!Microsoft.SQLServer.2016.ResourcePool"]/PoolID$</PoolID>
<Threshold>90</Threshold>
<TimeoutSeconds>180</TimeoutSeconds>
<ScriptDelayMsec>0</ScriptDelayMsec>
<NumSamples>6</NumSamples>
</Configuration>
</UnitMonitor>