Adds disk IOPS metrics implementation in the Hyper-V Inspector¶
High latency between I/O requests can be signs of issues. Collecting disk latency metrics can help us detect those issues. Hyper-V Inspector can collect those metrics.
Currently, when inspecting disk metrics, the Hyper-V Inspector cannot post any values for read_requests or write_requests, since this kind of metrics is not supported by Hyper-V. Instead, the Hyper-V Inspector can collect disk IOPS metrics, which will give users a useful alternative.
Add DiskIOPSPollster and PerDeviceDiskIOPSPollster pollsters, which create samples having the properties: * name: ‘disk.iops’ * type: ‘gauge’ * unit: ‘count/second’
Create the named tuple DiskIOPSStats, containing the field ‘iops_count’.
Add the method ‘inspect_disk_iops’ in the Inspector and implement it in the HyperVInspector. The method will return a DiskIOPSStats object.
The metric value will be fetched from Hyper-V VMs, located in the Msvm_AggregationMetricValue object (further referred to as metric object) associated with the VMs. The metric object’s ‘MetricDefinitionId’ must be equal to the ‘Id’ of Msvm_AggregationMetricDefinition object having the Caption ‘Average Normalized Disk Throughput’.
Hyper-V disk metrics were introduced in Windows / Hyper-V Server 2012 R2 (kernel version 6.3). They are not supported in the previous versions.
Data model impact¶
REST API impact¶
Users will have to add the meter ‘disk.iops’ in the disk_source source in pipeline.yaml instead of ‘disk.read.requests’ and ‘disk.write.requests’.
Having ‘disk.read.requests’ and ‘disk.write.requests’ in pipeline.yaml has no effect, the HyperVInspector will return zeroes for those metrics since Hyper-V cannot collect those metrics, hence the need for ‘disk.iops’ metrics.
Other end user impact¶
Other deployer impact¶
By default, the disk usage metrics collection is enabled in Nova, we just need to collect the data from the Hyper-V API.
- Primary assignee:
Adds the DiskIOPSPollster and PerDeviceDiskIOPSPollster pollsters
Adds the ‘iops_count’ in DiskStats.
Adds the ‘DiskIOPSStats’ named tuple, having the field ‘iops_count’.
Adds the ‘inspect_disk_iops’ method in the Inspector and implement it in the HyperVInspector. This method will return a DiskIOPSStats object.
Adds related unit tests.
Updates ceilometer measurements document.
Once this feature is enabled, it needs tests and bug fixing in the next 2 releases to avoid regression.
Unit tests are needed to test the new pollsters and the implementation on the Hyper-V side.
The added metrics will need to be documented in the measurements section.