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

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

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

Knowledge Base article:

摘要

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

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

原因

當設定之資料庫儲存位置所在磁碟機的可用磁碟空間過低時,即可能發生失敗,進而導致資料處理失敗、延遲使用者查詢,或影響其他共用相同磁碟空間配置的應用程式。

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

解決方式

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

可覆寫的參數

名稱

描述

預設值

警示優先順序

定義警示優先順序。

標準

警示嚴重性

定義警示嚴重性。

錯誤

Azure 檔案大小上限 (MB)

Azure BLOB 儲存體中所儲存的資料檔案大小上限。此工作流程會考慮將此值用作每個檔案的儲存體容量上限。

1048576

重大臨界值

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

10

已啟用

啟用或停用該工作流程。

產生警示

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

間隔 (秒)

每次重複執行工作流程之間的時間間隔 (秒)。

900

同步處理時間

同步處理時間使用 24 小時制。可予省略。

 

逾時 (秒)

指定工作流程失敗多少次後關閉並標示為失敗。

300

資料庫連線的逾時 (秒)

若工作流程無法在指定的期限之內存取資料庫,將會失敗並登錄一則事件。

15

警告閾值

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

20

Element properties:

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

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.Windows.Monitor.Container.FreeSpacePercent" Accessibility="Public" Enabled="false" Target="SqlDiscW!Microsoft.SQLServer.Windows.Container" ParentMonitorID="Health!System.Health.PerformanceState" Remotable="true" Priority="Normal" TypeID="Microsoft.SQLServer.Windows.MonitorType.Container.FreeSpacePercent" ConfirmDelivery="true">
<Category>PerformanceHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.Windows.Monitor.Container.FreeSpacePercent.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Host/Host/Host/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/MachineName$</AlertParameter1>
<AlertParameter2>$Target/Host/Host/Host/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/InstanceName$</AlertParameter2>
<AlertParameter3>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.File"]/FileName$</AlertParameter3>
<AlertParameter4>$Target/Host/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.Filegroup"]/GroupName$</AlertParameter4>
<AlertParameter5>$Target/Host/Host/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.Database"]/DatabaseName$</AlertParameter5>
<AlertParameter6>$Data/Context/Property[@Name='DiskTotalSizeMB']$</AlertParameter6>
<AlertParameter7>$Data/Context/Property[@Name='FreeSpacePercent']$</AlertParameter7>
<AlertParameter8>$Data/Context/Property[@Name='FreeSpaceMB']$</AlertParameter8>
<AlertParameter9>$Data/Context/Property[@Name='AllocatedSizeMB']$</AlertParameter9>
</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>
<MachineName>$Target/Host/Host/Host/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/MachineName$</MachineName>
<NetbiosComputerName>$Target/Host/Host/Host/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/NetbiosComputerName$</NetbiosComputerName>
<InstanceName>$Target/Host/Host/Host/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/InstanceName$</InstanceName>
<DatabaseName>$Target/Host/Host/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.Database"]/DatabaseName$</DatabaseName>
<FileName>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.File"]/FileName$</FileName>
<AzureMaxFileSizeMB>1048576</AzureMaxFileSizeMB>
<CriticalThreshold>10</CriticalThreshold>
<WarningThreshold>20</WarningThreshold>
<ConnectionString>$Target/Host/Host/Host/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/ConnectionString$</ConnectionString>
<InstanceVersion>$Target/Host/Host/Host/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/Version$</InstanceVersion>
<InstanceEdition>$Target/Host/Host/Host/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/Edition$</InstanceEdition>
<MonitoringType>$Target/Host/Host/Host/Property[Type="SqlDiscW!Microsoft.SQLServer.Windows.DBEngine"]/MonitoringType$</MonitoringType>
<SqlExecTimeoutSeconds>60</SqlExecTimeoutSeconds>
<SqlTimeoutSeconds>15</SqlTimeoutSeconds>
<TimeoutSeconds>300</TimeoutSeconds>
<IntervalSeconds>900</IntervalSeconds>
<SyncTime/>
</Configuration>
</UnitMonitor>