虛擬硬碟的效能歷程記錄

適用於︰Windows Server 2022、Windows Server 2019

此儲存空間直接存取 效能歷程記錄的 子主題詳細說明虛擬硬碟 (VHD) 檔案收集的效能歷程記錄。 效能歷程記錄適用于連結至執行中叢集虛擬機器的每個 VHD。 效能歷程記錄適用于 VHD 和 VHDX 格式,但不適用於共用 VHDX 檔案。

注意

集合可能需要幾分鐘的時間,才能開始新建立或移動的 VHD 檔案。

系列名稱和單位

系統會針對每個合格的虛擬硬碟收集這些系列:

數列 單位
vhd.iops.read 每秒
vhd.iops.write 每秒
vhd.iops.total 每秒
vhd.throughput.read 每秒位元組
vhd.throughput.write 每秒位元組
vhd.throughput.total 每秒位元組
vhd.latency.average seconds
vhd.size.current bytes
vhd.size.maximum bytes

轉譯方式

數列 轉譯方式
vhd.iops.read 虛擬硬碟所完成的每秒讀取作業數目。
vhd.iops.write 虛擬硬碟每秒完成的寫入作業數目。
vhd.iops.total 虛擬硬碟所完成的每秒讀取或寫入作業總數。
vhd.throughput.read 每秒從虛擬硬碟讀取的資料數量。
vhd.throughput.write 每秒寫入虛擬硬碟的資料數量。
vhd.throughput.total 每秒讀取或寫入虛擬硬碟的資料總數。
vhd.latency.average 虛擬硬碟中所有作業的平均延遲。
vhd.size.current 如果動態擴充,則為虛擬硬碟的目前檔案大小。 如果已修正,則不會收集數列。
vhd.size.maximum 如果動態擴充,虛擬硬碟的大小上限。 如果已修正,則 為大小。

來源位置

iops.*throughput.*latency.* 系列會從 Hyper-V Virtual Storage Device 虛擬機器執行所在的伺服器上設定的效能計數器收集,每個 VHD 或 VHDX 一個實例。

數列 來源計數器
vhd.iops.read Read Operations/Sec
vhd.iops.write Write Operations/Sec
vhd.iops.total 上述總和
vhd.throughput.read Read Bytes/sec
vhd.throughput.write Write Bytes/sec
vhd.throughput.total 上述總和
vhd.latency.average Latency

注意

整個間隔中都會測量計數器,而非只是取樣。 例如,如果 VHD 處於非使用中狀態 9 秒,但在第 10 秒內完成 30 個 IO,則會在此 10 秒間隔期間平均將它 vhd.iops.total 記錄為每秒 3 個 IO。 這可確保其效能歷程記錄擷取所有活動,且不易受到雜訊影響。

PowerShell 中的使用方式

使用 Get-VHD Cmdlet:

Get-VHD <Path> | Get-ClusterPerf

若要從虛擬機器取得每個 VHD 的路徑:

(Get-VM <Name>).HardDrives | Select Path

注意

Get-VHD Cmdlet 需要提供檔案路徑。 它不支援列舉。

其他參考