資源集區所使用的記憶體量大於臨界值設定 (以指定的資源集區記憶體內資料表的可用記憶體百分比表示) 時,此監視器會回報重大狀態,並引發警示。
資源集區所使用的記憶體量大於臨界值設定 (以指定的資源集區記憶體內資料表的可用記憶體百分比表示) 時,此監視器會回報重大狀態,並引發警示。
對應至記憶體最佳化資料庫的具名資源集區,會追蹤配置給所有記憶體最佳化資料表的記憶體,包括用於記憶體內 OLTP 引擎內各種結構的內部資料表。
SQL Server 記憶體內 OLTP 所使用的記憶體比 SQL Server 多,而且方法也與它不同。為記憶體內 OLTP 所安裝及配置的記憶體數量,可能變得無法滿足成長需求。如果是這樣,可能會用盡記憶體。
如需詳細資訊,請參閱本文: 將含記憶體最佳化資料表的資料庫繫結至資源集區。
為解決記憶體太低或記憶體不足的情況,您需要透過降低使用率來釋出現有記憶體,或提供更多記憶體給記憶體內資料表使用。可能的更正動作包括:
確認是否有長時間執行的交易會導致無法回收記憶體。如果有的話,請考慮刪除長時間執行的交易,及 (或) 查看應用程式的設計,確認是否可以減少交易的期間。
釋出現有記憶體。
刪除非必要記憶體最佳化資料表資料列,並等候進行記憶體回收。
將一或多個資料列移至磁碟資料表。
加大資源集區上的 MAX_MEMORY_PERCENT 值。
將 [最大伺服器記憶體] 設為更高的值,以加大 SQL Server 執行個體的可用記憶體。
安裝額外的記憶體。
名稱 | 描述 | 預設值 |
已啟用 |
| 是 |
產生警示 |
| 是 |
間隔 (秒) | 執行工作流程的週期性時間間隔 (秒)。 | 900 |
指令碼延遲 (毫秒) | 此參數可設定工作流程所執行的連續 T-SQL 查詢之間的延遲。這可能有助於減少工作流程在有大量目標物件時,所產生的磁碟使用量。請先取得 Microsoft 支援服務的建議,再變更此參數。 | 0 |
同步處理時間 | 使用 24 小時制指定的同步處理時間。將會忽略。 |
|
臨界值 | 收集的值會與此參數相比。 | 90 |
逾時 (秒) | 指定允許工作流程在關閉且標示為失敗之前執行的時間。 | 300 |
Target | Microsoft.SQLServer.2014.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.2014.MonitorType.UserResourcePool.MemoryConsumption | ||
Remotable | True | ||
Accessibility | Public | ||
Alert Message |
| ||
RunAs | Default |
<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>
<AlertParameter2>$Data/Context/Property[@Name='MemoryForSQLInstanceMB']$</AlertParameter2>
<AlertParameter3>$Data/Context/Property[@Name='PoolAvailableMemoryMB']$</AlertParameter3>
<AlertParameter4>$Data/Context/Property[@Name='PoolFreeMemoryMB']$</AlertParameter4>
<AlertParameter5>$Data/Context/Property[@Name='PoolFreeMemoryPercent']$</AlertParameter5>
<AlertParameter6>$Data/Context/Property[@Name='PoolUsedMemoryMB']$</AlertParameter6>
<AlertParameter7>$Data/Context/Property[@Name='TotalMemoryOnTheServerMB']$</AlertParameter7>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="ErrorState" MonitorTypeStateID="ErrorState" HealthState="Error"/>
<OperationalState ID="SuccessState" MonitorTypeStateID="SuccessState" HealthState="Success"/>
</OperationalStates>
<Configuration>
<IntervalSeconds>900</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>Property[@Name='PoolUsedMemoryPercent']</Value>
<PoolID>$Target/Property[Type="SQL2014Core!Microsoft.SQLServer.2014.ResourcePool"]/PoolID$</PoolID>
<Threshold>90</Threshold>
<TimeoutSeconds>300</TimeoutSeconds>
<ScriptDelayMsec>0</ScriptDelayMsec>
</Configuration>
</UnitMonitor>