記憶體回收

Microsoft.SQLServer.2014.Monitor.DBFileGroupFx.GarbageCollectionState (UnitMonitor)

當記憶體最佳化資料檔案內作用中之資料列所使用的空間量 (以資料檔案大小的百分比表示) 低於閾值設定時,此監視器會回報重大狀態並引發警示。注意: 此監視器預設為停用。如有需要,請使用覆寫加以啟用。

Knowledge Base article:

摘要

如果記憶體回收行程填滿因數 (記憶體最佳化資料檔案的使用中資料列所使用的空間數量,以資料檔案大小的百分比表示) 低於臨界值設定,則此監視器會回報重大狀態,並引發警示。

記憶體最佳化資料檔案群組的記憶體回收填滿因數是一種量值,可顯示所有包含已插入/已刪除資料列之作用中資料/差異檔案的平均填滿因數。當此量值低於 50% 時,表示自動合併落後。只要 CFP (成對的檢查點檔案) 數低於 8000,且您有大量儲存體可供記憶體最佳化資料檔案群組使用,就不會立即造成問題。

注意: 此監視器預設為停用。如有需要,請使用覆寫加以啟用。

如需詳資訊,請參閱 sys.dm_db_xtp_checkpoint_files (Transact-SQL) 文件

http://go.microsoft.com/fwlink/?LinkId=799249

<記憶體回收運作方式>一節位於<建立及管理記憶體最佳化物件的儲存體>主題下

http://go.microsoft.com/fwlink/?LinkId=799250

原因

已根據內部合併原則開始合併 CFP。如需詳細資料,請參閱 本篇文章

解決方式

依下列文章所述,執行手動合併與強制記憶體回收:

可覆寫的參數

名稱

描述

預設值

警示優先程式

定義警示優先順序。

一般

警示嚴重性

定義警示嚴重性。

錯誤

已啟用

啟用或停用該工作流程。

產生警示

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

間隔 (秒)

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

900

指令碼延遲 (毫秒)

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

0

同步處理時間

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

00:04

臨界值

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

50

逾時 (秒)

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

300

Element properties:

TargetMicrosoft.SQLServer.2014.DBFileGroupFx
Parent MonitorSystem.Health.PerformanceState
CategoryPerformanceHealth
EnabledFalse
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SQLServer.2014.MonitorType.DBFileGroupFx.GarbageCollectionState
RemotableTrue
AccessibilityPublic
Alert Message
MSSQL 2014: 記憶體最佳化資料記憶體回收填滿因數太低
所有包含已插入/已刪除資料列的 ACTIVE 資料/差異檔案,其平均填滿因數太低。
伺服器: {1}
SQL Server 執行個體: {0}
資料庫: {2}
檔案群組: {3}
填滿因數: {4} \%
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.2014.Monitor.DBFileGroupFx.GarbageCollectionState" Target="SQL2014Core!Microsoft.SQLServer.2014.DBFileGroupFx" ParentMonitorID="SystemHealth!System.Health.PerformanceState" TypeID="Microsoft.SQLServer.2014.MonitorType.DBFileGroupFx.GarbageCollectionState" Accessibility="Public" Enabled="false" Remotable="true" Priority="Normal" ConfirmDelivery="true">
<Category>PerformanceHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.2014.Monitor.DBFileGroupFx.GarbageCollectionState.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Host/Host/Property[Type="SQL2014Core!Microsoft.SQLServer.2014.ServerRole"]/InstanceName$</AlertParameter1>
<AlertParameter2>$Target/Host/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</AlertParameter2>
<AlertParameter3>$Target/Host/Property[Type="SQL2014Core!Microsoft.SQLServer.2014.Database"]/DatabaseName$</AlertParameter3>
<AlertParameter4>$Target/Property[Type="SQL2014Core!Microsoft.SQLServer.2014.FileGroup"]/GroupName$</AlertParameter4>
<AlertParameter5>$Data/Context/Property[@Name='StorageUsageFillFactor']$</AlertParameter5>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Critical" MonitorTypeStateID="Critical" HealthState="Error"/>
<OperationalState ID="Success" MonitorTypeStateID="Success" 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>
<DatabaseName>$Target/Host/Property[Type="SQL2014Core!Microsoft.SQLServer.2014.Database"]/DatabaseName$</DatabaseName>
<Value>Property[@Name='StorageUsageFillFactor']</Value>
<Threshold>50</Threshold>
<TimeoutSeconds>300</TimeoutSeconds>
<ScriptDelayMsec>0</ScriptDelayMsec>
</Configuration>
</UnitMonitor>