記憶體最佳化資料檔案群組容器的可用空間

Microsoft.SQLServer.2016.Monitor.Container.FreeSpacePercent (UnitMonitor)

記憶體最佳化資料檔案群組容器的可用磁碟空間,低於警告臨界值設定 (以記憶體最佳化資料檔案群組容器大小加上磁碟可用空間總和的百分比表示) 時,此監視器會回報警告。當可用空間低於重大臨界值時,此監視器會回報重大警示。

Knowledge Base article:

摘要

記憶體最佳化資料檔案群組容器的可用磁碟空間,低於警告臨界值設定 (以記憶體最佳化資料檔案群組容器大小加上磁碟可用空間總和的百分比表示) 時,此監視器會回報警告。當可用空間低於重大臨界值時,此監視器會回報重大警示。

因為會將更多資料加入記憶體最佳化資料的資料表,所以記憶體最佳化資料檔案群組容器資料夾一般來說會隨著時間變大。因此,管理員會希望能夠進行監視,以確定容器資料夾的儲存位置中能有足夠的剩餘空間。

原因

在其中設定資料庫儲存體位置的磁碟機上可用磁碟空間太低時,可能會失敗,進而無法成功處理資料、延遲使用者查詢,或影響其他共用相同磁碟空間配置的應用程式。

對持續性記憶體最佳化資料表進行 DML 作業時,會配置儲存體。最多需要設定持續性記憶體最佳化資料表的記憶體最佳化資料大小 4 倍的儲存體。如果儲存體設定正確,但可用儲存體空間仍然不足,則可能是容器支援的 IOPS 無法支援工作負載的需求。對於容器一般會建議要支援 3 倍資料產生率的 IOPS,以說明資料/差異檔案的初始母體擴展,以及需要讀取來源資料/差異檔案後,將它們合併至目標 CFP 的自動合併作業。

解決方式

可用空間不足的解決方法取決於根本原因,必須在發生這問題時於每種情況下調查。此狀況可透過任何可能方式之一予以減輕:

可覆寫的參數

名稱

描述

預設值

警示優先程式

定義警示優先順序。

一般

警示嚴重性

定義警示嚴重性。

錯誤

重大臨界值

如果值低於此臨界值,此監視器會將狀態變更為 [重大]。

10

已啟用

啟用或停用該工作流程。

產生警示

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

間隔 (秒)

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

900

指令碼延遲 (毫秒)

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

0

同步處理時間

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

 

逾時 (秒)

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

300

警告臨界值

如果值低於此臨界值,此監視器會將狀態變更為 [警告]。

20

Element properties:

TargetMicrosoft.SQLServer.2016.Container
Parent MonitorSystem.Health.PerformanceState
CategoryPerformanceHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SQLServer.2016.MonitorType.Container.FreeSpacePercent
RemotableTrue
AccessibilityPublic
Alert Message
MSSQL 2016: 記憶體最佳化資料檔案群組容器的可用空間不足
只有 {7}\% 的可用空間可供磁碟機 "{5}" 上的記憶體最佳化資料檔案群組容器 "{0}" 使用,而其小於為警示所設定的臨界值。
伺服器: {4}
SQL Server 執行個體: {3}
資料庫: {2}
檔案群組: {1}
容器: {0}
磁碟機 (掛接點): {5}
磁碟大小: {6} MB
記憶體最佳化資料檔案群組容器可用空間: {8} MB ({7}\%)
記憶體最佳化資料檔案群組容器大小: {9} MB
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.2016.Monitor.Container.FreeSpacePercent" Target="SQL2016Core!Microsoft.SQLServer.2016.Container" ParentMonitorID="SystemHealth!System.Health.PerformanceState" TypeID="Microsoft.SQLServer.2016.MonitorType.Container.FreeSpacePercent" Accessibility="Public" Enabled="true" Remotable="true" Priority="Normal" ConfirmDelivery="true">
<Category>PerformanceHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.2016.Monitor.Container.FreeSpacePercent.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Property[Type="SQL2016Core!Microsoft.SQLServer.2016.Container"]/ContainerName$</AlertParameter1>
<AlertParameter2>$Target/Host/Property[Type="SQL2016Core!Microsoft.SQLServer.2016.FileGroup"]/GroupName$</AlertParameter2>
<AlertParameter3>$Target/Host/Host/Property[Type="SQL2016Core!Microsoft.SQLServer.2016.Database"]/DatabaseName$</AlertParameter3>
<AlertParameter4>$Target/Host/Host/Host/Property[Type="SQL2016Core!Microsoft.SQLServer.2016.ServerRole"]/InstanceName$</AlertParameter4>
<AlertParameter5>$Target/Host/Host/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</AlertParameter5>
<AlertParameter6>$Target/Property[Type="SQL2016Core!Microsoft.SQLServer.2016.Container"]/ContainerStorage$</AlertParameter6>
<AlertParameter7>$Data/Context/Property[@Name='DriveTotalSizeMB']$</AlertParameter7>
<AlertParameter8>$Data/Context/Property[@Name='FreeSpacePercent']$</AlertParameter8>
<AlertParameter9>$Data/Context/Property[@Name='FreeSpaceSpaceMB']$</AlertParameter9>
<AlertParameter10>$Data/Context/Property[@Name='AllocatedSizeMB']$</AlertParameter10>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Critical" MonitorTypeStateID="ContainerFreeSpaceCritical" HealthState="Error"/>
<OperationalState ID="Warning" MonitorTypeStateID="ContainerFreeSpaceWarning" HealthState="Warning"/>
<OperationalState ID="Success" MonitorTypeStateID="ContainerFreeSpaceSuccess" HealthState="Success"/>
</OperationalStates>
<Configuration>
<IntervalSeconds>900</IntervalSeconds>
<SyncTime/>
<ConnectionString>$Target/Host/Host/Host/Property[Type="SQL2016Core!Microsoft.SQLServer.2016.DBEngine"]/ConnectionString$</ConnectionString>
<ServerName>$Target/Host/Host/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ServerName>
<SqlInstanceName>$Target/Host/Host/Host/Property[Type="SQL2016Core!Microsoft.SQLServer.2016.ServerRole"]/InstanceName$</SqlInstanceName>
<DatabaseName>$Target/Host/Host/Property[Type="SQL2016Core!Microsoft.SQLServer.2016.Database"]/DatabaseName$</DatabaseName>
<DBFileId>$Target/Property[Type="SQL2016Core!Microsoft.SQLServer.2016.Container"]/ContainerID$</DBFileId>
<Value>Property[@Name='FreeSpacePercent']</Value>
<CriticalThreshold>10</CriticalThreshold>
<WarningThreshold>20</WarningThreshold>
<TimeoutSeconds>300</TimeoutSeconds>
<ScriptDelayMsec>0</ScriptDelayMsec>
</Configuration>
</UnitMonitor>