]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
python-common/ceph/deployment: filter drives by actuators when creating osds 47731/head
authorMichael English <michael.english@seagate.com>
Mon, 22 Aug 2022 14:59:53 +0000 (09:59 -0500)
committerMichael English <michael.english@seagate.com>
Fri, 23 Sep 2022 17:15:27 +0000 (12:15 -0500)
As storage capacities grow, multi-actuator technology introduced by Seagate addresses the downward pressure on performance that comes with growing drive capacities and areal densities. Having multiple actuators enables drives to maintain the performance needs of customers with data-intensive applications.

Our testing indicates that, for certain workloads, using one OSD per actuator increases performance over using one OSD per dual-actuator drive. Bandwidth for the combined OSDs can increase over 40% and IOPS can nearly double compared to the alternative.

Extending the change introduced to ceph-volume that detects drives with two or more actuators, this feature enables the administrator to set a simple configuration that creates two OSDs on any detected dual-actuator drives using the advanced OSD service specification.

$ cat ~/osd.yaml
service_type: osd
service_id: example_osd_spec
placement:
  host_pattern: '*'
spec:
  data_devices:
    actuators: 2
  osds_per_device: 2
$ ./bin/ceph orch apply -i ~/osd.yaml
...

Copyright (c) 2022 Seagate Technology LLC and/or its Affiliates

Signed-off-by: Michael English <michael.english@seagate.com>
src/ceph-volume/ceph_volume/util/disk.py
src/python-common/ceph/deployment/drive_group.py
src/python-common/ceph/deployment/drive_selection/filter.py

index 6f2976cdd4256a48dba543365dd0912d52792cdc..4ebb0509207e7ce696b6408cae21aa8f883ca11b 100644 (file)
@@ -881,7 +881,7 @@ def get_devices(_sys_block_path='/sys/block', device=''):
         else:
             metadata['device_nodes'] = devname
 
-        metadata['actuators'] = ""
+        metadata['actuators'] = None
         if os.path.isdir(sysdir + "/queue/independent_access_ranges/"):
             actuators = 0
             while os.path.isdir(sysdir + "/queue/independent_access_ranges/" + str(actuators)):
index 9be03df108d6cc198e2e2e8a59b1e8763e28ea35..4e8f126716b6ecb5f75e08990fe7625192427ec8 100644 (file)
@@ -26,10 +26,11 @@ class DeviceSelection(object):
     """
 
     _supported_filters = [
-            "paths", "size", "vendor", "model", "rotational", "limit", "all"
+            "actuators", "paths", "size", "vendor", "model", "rotational", "limit", "all"
     ]
 
     def __init__(self,
+                 actuators=None,  # type: Optional[int]
                  paths=None,  # type: Optional[List[str]]
                  model=None,  # type: Optional[str]
                  size=None,  # type: Optional[str]
@@ -41,6 +42,8 @@ class DeviceSelection(object):
         """
         ephemeral drive group device specification
         """
+        self.actuators = actuators
+
         #: List of Device objects for devices paths.
         self.paths = [] if paths is None else [Device(path) for path in paths]  # type: List[Device]
 
@@ -66,7 +69,8 @@ class DeviceSelection(object):
         self.all = all
 
     def validate(self, name: str) -> None:
-        props = [self.model, self.vendor, self.size, self.rotational]  # type: List[Any]
+        props = [self.actuators, self.model, self.vendor, self.size,
+                 self.rotational]  # type: List[Any]
         if self.paths and any(p is not None for p in props):
             raise DriveGroupValidationError(
                 name,
index 36cacfaa5cc159fa0ab932e7a1e65802061bba23..0da1b5c3901fa13aa7c25ef4d369a2027ad051aa 100644 (file)
@@ -21,6 +21,8 @@ class FilterGenerator(object):
 
     def __iter__(self):
         # type: () -> Generator[Matcher, None, None]
+        if self.device_filter.actuators:
+            yield EqualityMatcher('actuators', self.device_filter.actuators)
         if self.device_filter.size:
             yield SizeMatcher('size', self.device_filter.size)
         if self.device_filter.model: