邏輯磁碟分散程度

Microsoft.Windows.Server.2008.LogicalDisk.DefragAnalysis (UnitMonitor)

此監視會定期執行 (預設為每星期六早上 3 點) 來檢查所有邏輯磁碟機的分散程度。 如果發現分散程度超過閾值,則根據預設,監視的狀態會變更為「警告」並產生警示。 有一個名為「邏輯磁碟重組」的復原措施以此監視為目標,預設為停用。 如果啟用復原措施,則狀態變更之後,會自動開始工作來重組邏輯磁碟機。

Knowledge Base article:

摘要

此監視會定期執行 (預設為每星期六早上 3 點) 來檢查所有邏輯磁碟機的分散程度。 如果發現分散程度超過閾值,則根據預設,監視的狀態會變更為「警告」並產生警示。 有一個名為「邏輯磁碟重組」的復原措施以此監視為目標,預設為停用。 如果啟用復原措施,則狀態變更之後,會自動開始工作來重組邏輯磁碟機。

設定

除了通常可供所有監視使用的參數之外,此監視還具有下列可覆寫參數:

原因

建立新檔案或在現有的檔案中新增資料時,檔案系統都會嘗試盡可能持續配置空間,讓讀取作業能夠以最快的速度執行。 經過一段時間後,在持續區段中配置空間將會變得愈來愈困難,因而造成檔案分散在磁碟上。 磁碟上的檔案愈分散,檔案系統處理這些檔案所需的時間愈長,而可能導致整體系統執行速度變慢。

解決方式

注意:重組磁碟機可能是很消耗資源的作業,執行時可能會拖慢系統效能。 因此最好能夠在下班時間重組磁碟機。

如果磁碟機具有適當的分散閾值,您就可以透過下列其中一種方式重組磁碟機來解決此問題:

此監視不支援 Operations 主控台中 [健全狀況總管] 視窗的 [重新計算健全狀況] 隨選功能。 在解決問題並關閉警示後,請手動重設監視的狀態,或等到下次排定間隔時,讓監視自動重設。

Element properties:

TargetMicrosoft.Windows.Server.2008.LogicalDisk
Parent MonitorSystem.Health.PerformanceState
CategoryPerformanceHealth
EnabledFalse
Alert GenerateTrue
Alert SeverityWarning
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.Windows.Server.2008.LogicalDisk.DefragAnalysis.Monitortype
RemotableTrue
AccessibilityPublic
Alert Message
邏輯磁碟分散程度高
電腦 {1} 上磁碟 {0} 的分散程度過高。 檔案分散百分比的值為 {2}\%。 建議重組: {3}。
RunAsSystem.PrivilegedMonitoringAccount

Source Code:

<UnitMonitor ID="Microsoft.Windows.Server.2008.LogicalDisk.DefragAnalysis" RunAs="System!System.PrivilegedMonitoringAccount" Accessibility="Public" Enabled="false" Target="Server2008!Microsoft.Windows.Server.2008.LogicalDisk" ParentMonitorID="SystemHealth!System.Health.PerformanceState" Remotable="true" Priority="Normal" TypeID="Microsoft.Windows.Server.2008.LogicalDisk.DefragAnalysis.Monitortype" ConfirmDelivery="false">
<Category>PerformanceHealth</Category>
<AlertSettings AlertMessage="Microsoft.Windows.Server.2008.LogicalDisk.DefragAnalysis.AlertMessage">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Warning</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Property[Type="Windows!Microsoft.Windows.LogicalDevice"]/DeviceID$ ($Target/Property[Type="Windows!Microsoft.Windows.LogicalDevice"]/Name$)</AlertParameter1>
<AlertParameter2>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</AlertParameter2>
<AlertParameter3>$Data/Context/Property[@Name='FilePercentFragmentation']$</AlertParameter3>
<AlertParameter4>$Data/Context/Property[@Name='OSRecommended']$</AlertParameter4>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="UnderThreshold" MonitorTypeStateID="Warning" HealthState="Warning"/>
<OperationalState ID="OverThreshold" MonitorTypeStateID="Success" HealthState="Success"/>
</OperationalStates>
<Configuration>
<SchedulerStart>03:00</SchedulerStart>
<SchedulerDaysOfWeekMask>64</SchedulerDaysOfWeekMask>
<FilePercentFragmentationThreshold>10</FilePercentFragmentationThreshold>
<UseOSRecommendation>true</UseOSRecommendation>
</Configuration>
</UnitMonitor>