当资源池使用的内存量大于“阈值”设置(以占给定资源池的内存优化数据表可用的内存百分比表示)时,监视器将报告严重状态,并引发警报。
当资源池使用的内存量大于“阈值”设置(以占给定资源池的内存优化数据表可用的内存百分比表示)时,监视器将报告严重状态,并引发警报。
映射到拥有内存优化表的数据库时,指定的资源池将跟踪分配给所有内存优化表(包括用于内存优化数据引擎中不同结构的内部表)的内存。
与 SQL Server 相比,SQL Server 内存优化数据使用的内存更多,方式也不一样。为内存优化数据安装和分配的内存量可能无法满足日益增长的需要。如果是这样,内存可能会用尽。
有关详细信息,请参阅本文: Bind a Database with Memory-Optimized Tables to a Resource Pool(将具有内存优化表的数据库绑定至资源池)。
要解决“低内存”或“内存不足”的问题,你需要通过减少使用率来释放现有内存,或为内存优化数据表提供更多可用内存。可能的更正操作包括:
请检查是否存在阻止内存垃圾回收的长期运行的事务。如果存在,请考虑终止长期运行的事务和/或研究应用程序的设计以了解是否可以减少事务的持续时间。
释放现有内存。
删除非必需的内存优化表格行,并等待垃圾回收。
将一个或多个行移动到基于磁盘的表格中。
增加资源池上的 MAX_MEMORY_PERCENT 值。
通过将“最大服务器内存”配置为较高的值,增加 SQL Server 实例可用的内存。
安装更多内存。
名称 | 说明 | 默认值 |
警报优先级 | 定义警报优先级。 | 正常 |
警报严重性 | 定义警报严重性。 | 错误 |
启用 | 启用或禁用工作流。 | 是 |
生成警报 | 定义工作流是否生成警报。 | 是 |
间隔(秒) | 运行工作流的重复间隔时间(秒)。 | 900 |
样本数 | 指示在状态发生更改之前测量值应违反阈值的次数。 | 6 |
同步时间 | 使用 24 小时格式指定的同步时间。可以忽略。 |
|
阈值 | 收集的值将与此参数进行比较。 | 90 |
超时(秒) | 指定工作流在关闭之前允许运行的时间,并标记为失败。 | 300 |
数据库连接超时(秒) | 如果在指定期间无法访问数据库,工作流将失败并注册一个事件。 | 15 |
Target | Microsoft.SQLServer.Linux.UserResourcePool | ||
Parent Monitor | System.Health.PerformanceState | ||
Category | PerformanceHealth | ||
Enabled | True | ||
Alert Generate | True | ||
Alert Severity | Error | ||
Alert Priority | Normal | ||
Alert Auto Resolve | True | ||
Monitor Type | Microsoft.SQLServer.Linux.MonitorType.UserResourcePool.MemoryConsumption | ||
Remotable | True | ||
Accessibility | Public | ||
Alert Message |
| ||
RunAs | Default |
<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>
<SqlTimeoutSeconds>15</SqlTimeoutSeconds>
<Threshold>90</Threshold>
<NumSamples>6</NumSamples>
<PoolName>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.ResourcePool"]/Name$</PoolName>
</Configuration>
</UnitMonitor>