diff --git a/cinder/tests/unit/volume/drivers/test_pure.py b/cinder/tests/unit/volume/drivers/test_pure.py index fc4d7d70a1b..f9be06e7e78 100644 --- a/cinder/tests/unit/volume/drivers/test_pure.py +++ b/cinder/tests/unit/volume/drivers/test_pure.py @@ -625,7 +625,10 @@ PERF_INFO = { 'write_bytes_per_sec': 2827943, 'time': '2015-12-17T21:50:55Z', 'usec_per_read_op': 192, - 'queue_depth': 4, + 'queue_depth': 4, # Deprecated - to be removed in 2026.1 cycle + 'queue_usec_per_mirrored_write_op': 1, + 'queue_usec_per_read_op': 2, + 'queue_usec_per_write_op': 3, } PERF_INFO_RAW = [PERF_INFO] @@ -5136,6 +5139,11 @@ class PureVolumeUpdateStatsTestCase(PureBaseSharedDriverTestCase): 'usec_per_read_op': PERF_INFO['usec_per_read_op'], 'usec_per_write_op': PERF_INFO['usec_per_write_op'], 'queue_depth': PERF_INFO['queue_depth'], + 'queue_usec_per_mirrored_write_op': PERF_INFO[ + 'queue_usec_per_mirrored_write_op' + ], + 'queue_usec_per_read_op': PERF_INFO['queue_usec_per_read_op'], + 'queue_usec_per_write_op': PERF_INFO['queue_usec_per_write_op'], 'replication_capability': 'sync', 'replication_enabled': False, 'replication_type': [], diff --git a/cinder/volume/drivers/pure.py b/cinder/volume/drivers/pure.py index 53a621f2a82..03edf9544b8 100644 --- a/cinder/volume/drivers/pure.py +++ b/cinder/volume/drivers/pure.py @@ -21,6 +21,7 @@ import functools import ipaddress import math import re +import time import uuid import distro @@ -1071,7 +1072,11 @@ class PureBaseVolumeDriver(san.SanDriver): """Set self._stats with relevant information.""" current_array = self._get_current_array() space_info = list(current_array.get_arrays_space().items)[0] - perf_info = list(current_array.get_arrays_performance().items)[0] + perf_info = list(current_array.get_arrays_performance( + end_time=int(time.time()) * 1000, + start_time=(int(time.time()) * 1000) - 30000, + resolution=30000 + ).items)[0] hosts = list(current_array.get_hosts().items) volumes = list(current_array.get_volumes().items) snaps = list(current_array.get_volume_snapshots().items) @@ -1135,7 +1140,14 @@ class PureBaseVolumeDriver(san.SanDriver): # Latency data['usec_per_read_op'] = perf_info.usec_per_read_op data['usec_per_write_op'] = perf_info.usec_per_write_op + + # TODO: Queue depth - deprecated - remove in 2026.1 cycle data['queue_depth'] = getattr(perf_info, 'queue_depth', 0) + # Detailed I/O queuieing information + data['queue_usec_per_mirrored_write_op'] = ( + perf_info.queue_usec_per_mirrored_write_op) + data['queue_usec_per_read_op'] = perf_info.queue_usec_per_read_op + data['queue_usec_per_write_op'] = perf_info.queue_usec_per_write_op # Replication data["replication_capability"] = self._get_replication_capability() diff --git a/doc/source/configuration/block-storage/drivers/pure-storage-driver.rst b/doc/source/configuration/block-storage/drivers/pure-storage-driver.rst index 5528b1fa676..f4762c73a9b 100644 --- a/doc/source/configuration/block-storage/drivers/pure-storage-driver.rst +++ b/doc/source/configuration/block-storage/drivers/pure-storage-driver.rst @@ -361,6 +361,9 @@ A large number of metrics are reported by the volume driver which can be useful in implementing more control over volume placement in multi-backend environments using the driver filter and weighter methods. +Performance metrics are provided based on an average over the previous +30 seconds. + Metrics reported include, but are not limited to: .. code-block:: text @@ -378,7 +381,9 @@ Metrics reported include, but are not limited to: output_per_sec usec_per_read_op usec_per_read_op - queue_depth + queue_usec_per_mirrored_write_op + queue_usec_per_read_op + queue_usec_per_write_op replication_type .. note:: diff --git a/releasenotes/notes/pure_storage_scheduler_data-9b28bb309b17e8aa.yaml b/releasenotes/notes/pure_storage_scheduler_data-9b28bb309b17e8aa.yaml new file mode 100644 index 00000000000..05415e167a0 --- /dev/null +++ b/releasenotes/notes/pure_storage_scheduler_data-9b28bb309b17e8aa.yaml @@ -0,0 +1,13 @@ +--- +features: + - | + Pure Storage: Added additional IO queueing performance characteristics + ``queue_usec_per_mirrored_write_op``, ``queue_usec_per_read_op`` and + ``queue_usec_per_write_op``, to array statistics used by the scheduler. + - | + Pure Storage: Changed performance metrics to report average over the previous + 30 seconds, rather than using point-in-time information. +deprecations: + - | + Pure Storage: Deprecation of ``queue_depth`` performance characteristic + return by array statistics. This will be fully removed in the 2026.1 release.