資源集區記憶體取用

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

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

Knowledge Base article:

摘要

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

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

原因

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

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

解決方式

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

外部資源

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

可覆寫的參數

名稱

描述

預設值

警示優先順序

定義警示優先順序。

標準

警示嚴重性

定義警示嚴重性。

錯誤

已啟用

啟用或停用該工作流程。

產生警示

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

間隔 (秒)

每次重複執行工作流程之間的時間間隔 (秒)。

900

範例數

指出測出的值要違反多少次臨界值,狀態才會變更。

6

同步處理時間

同步處理時間使用 24 小時制。可予省略。

 

閾值

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

90

逾時 (秒)

指定流程被關閉及標示為失敗之前,允許執行的時間。

300

資料庫連線的逾時 (秒)

若工作流程無法在指定的期限之內存取資料庫,將會失敗並登錄一則事件。

15

Element properties:

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

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.Linux.Monitor.UserResourcePool.MemoryConsumption" Target="SqlDiscL!Microsoft.SQLServer.Linux.UserResourcePool" ParentMonitorID="Health!System.Health.PerformanceState" TypeID="Microsoft.SQLServer.Linux.MonitorType.UserResourcePool.MemoryConsumption" Accessibility="Public" Enabled="true" Remotable="true" Priority="Normal" ConfirmDelivery="true">
<Category>PerformanceHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.Linux.Monitor.UserResourcePool.MemoryConsumption.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.ResourcePool"]/Name$</AlertParameter1>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="ErrorState" MonitorTypeStateID="ErrorState" HealthState="Error"/>
<OperationalState ID="SuccessState" MonitorTypeStateID="SuccessState" HealthState="Success"/>
</OperationalStates>
<Configuration>
<MachineName>$Target/Host/Host/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/MachineName$</MachineName>
<NetbiosComputerName>$Target/Host/Host/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/NetbiosComputerName$</NetbiosComputerName>
<InstanceName>$Target/Host/Host/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/InstanceName$</InstanceName>
<ConnectionString>$Target/Host/Host/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/ConnectionString$</ConnectionString>
<InstanceVersion>$Target/Host/Host/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/Version$</InstanceVersion>
<InstanceEdition>$Target/Host/Host/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/Edition$</InstanceEdition>
<IntervalSeconds>900</IntervalSeconds>
<SyncTime/>
<TimeoutSeconds>300</TimeoutSeconds>
<SqlExecTimeoutSeconds>60</SqlExecTimeoutSeconds>
<SqlTimeoutSeconds>15</SqlTimeoutSeconds>
<Threshold>90</Threshold>
<NumSamples>6</NumSamples>
<PoolName>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.ResourcePool"]/Name$</PoolName>
</Configuration>
</UnitMonitor>