资源池内存占用

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

当资源池使用的内存量大于“阈值”设置(以占给定资源池的内存优化数据表可用的内存百分比表示)时,监视器将报告严重状态,并引发警报。

Knowledge Base article:

摘要

当资源池使用的内存量大于“阈值”设置(以占给定资源池的内存优化数据表可用的内存百分比表示)时,监视器将报告严重状态,并引发警报。

映射到内存优化数据库时,指定的资源池将跟踪分配给所有内存优化表(包括用于内存优化数据引擎中不同结构的内部表)的内存。

原因

与 SQL Server 相比,SQL Server 内存优化数据使用的内存更多,方式也不一样。为内存优化数据安装和分配的内存量可能无法满足日益增长的需要。如果是这样,内存可能会用尽。

有关详细信息,请参阅本文: 将具有内存优化表的数据库绑定至资源池

解决方法

要解决“低内存”或“内存不足”的问题,你需要通过减少使用率来释放现有内存,或为内存优化数据表提供更多可用内存。可能的更正操作包括:

外部

如何管理内存优化数据的内存

可替代参数

名称

说明

默认值

警报优先级

定义警报优先级。

正常

警报严重性

定义警报严重性。

错误

已启用

启用或禁用工作流。

生成警报

定义工作流是否生成警报。

间隔(秒)

运行工作流的重复间隔时间(秒)。

300

样本数

指示在状态发生更改之前测量值应违反阈值的次数。

6

脚本延迟(毫秒)

此参数将设置工作流执行的连续 T-SQL 查询之间的延迟时间。此参数有助于在有大量目标对象时减少工作流生成的足迹。在更改此参数之前,请咨询 Microsoft 技术支持人员。

0

同步时间

使用 24 小时格式指定的同步时间。可以忽略。

00:06

阈值

收集的值将与此参数进行比较。

90

超时(秒)

指定允许工作流在被关闭并标记为失败之前运行的时间。

180

Element properties:

TargetMicrosoft.SQLServer.2014.UserResourcePool
Parent MonitorSystem.Health.PerformanceState
CategoryPerformanceHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SQLServer.2014.MonitorType.UserResourcePool.MemoryConsumption
RemotableTrue
AccessibilityPublic
Alert Message
MSSQL 2014: 内存优化数据: 资源池使用的内存过多。
资源池“{0}”使用的内存过多。
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.2014.Monitor.UserResourcePool.MemoryConsumption" Target="SQL2014Core!Microsoft.SQLServer.2014.UserResourcePool" ParentMonitorID="SystemHealth!System.Health.PerformanceState" TypeID="Microsoft.SQLServer.2014.MonitorType.UserResourcePool.MemoryConsumption" Accessibility="Public" Enabled="true" Remotable="true" Priority="Normal" ConfirmDelivery="true">
<Category>PerformanceHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.2014.Monitor.UserResourcePool.MemoryConsumption.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Property[Type="SQL2014Core!Microsoft.SQLServer.2014.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="SQL2014Core!Microsoft.SQLServer.2014.ServerRole"]/InstanceName$</SqlInstanceName>
<Value>$Data/Property[@Name='PoolUsedMemoryPercent']$</Value>
<PoolID>$Target/Property[Type="SQL2014Core!Microsoft.SQLServer.2014.ResourcePool"]/PoolID$</PoolID>
<Threshold>90</Threshold>
<TimeoutSeconds>180</TimeoutSeconds>
<ScriptDelayMsec>0</ScriptDelayMsec>
<NumSamples>6</NumSamples>
</Configuration>
</UnitMonitor>