Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cluster.py: extract interface and add ClusterPoolAllocator and FlatBdevsPerCluster #1088

Merged
merged 1 commit into from
Feb 10, 2025

Conversation

baum
Copy link
Collaborator

@baum baum commented Feb 4, 2025

cluster.py: extract interface and add ClusterPoolAllocator and FlatBdevsPerCluster

New tests

New strategy cluster pool

New strategy flat bdevs per cluster

Mapping SPDK BDEVs into a CEPH RADOS Cluster Context

NVMEoF namespaces utilize SPDK BDEVs which map into CEPH RADOS client cluster contexts, and the mapping strategy impacts both performance and resource allocation. Multiple BDEVs can be allocated to a single CEPH cluster context, influencing I/O efficiency, cluster scalability, and system overhead. The choice of mapping strategy affects:

  • Cluster context allocation cost: Creating and maintaining CEPH cluster contexts incurs resource overhead.
  • I/O bottlenecks: If too many BDEVs share the same context, contention may degrade performance.
  • Scalability: The approach must balance between efficient resource usage and avoiding excessive cluster context creation.

Mapping Strategies

1. Legacy ANA Group-Based Mapping

A CEPH cluster context is allocated per ANA group.

The number of BDEVs assigned to each cluster context is controlled by the bdevs_per_cluster configuration parameter. This strategy ensures alignment with ANA group allocation but may lead to uneven distribution across cluster contexts.

[spdk]
bdevs_per_cluster = 32

2. Flat BDEVs per Cluster Mapping

Ignores ANA groups and directly assigns BDEVs to cluster contexts. The number of BDEVs per cluster context is determined by the flat_bdevs_per_cluster parameter. Offers a more uniform distribution but might not align well with underlying ANA group optimizations.

[spdk]
flat_bdevs_per_cluster = 32

3. Cluster Pool-Based Mapping

The maximum number of cluster contexts is pre-defined by the cluster_pool_size configuration parameter.

When a new BDEV is created, it is assigned to the cluster context with the fewest BDEVs. This dynamic approach balances workload distribution but may introduce overhead in tracking and rebalancing BDEV allocations.

[spdk]
cluster_pool_size = 32

Choosing the appropriate strategy depends on workload characteristics, expected BDEV-to-cluster context ratios, and system performance goals.

@baum baum force-pushed the cluster-allocation branch 11 times, most recently from da156bd to ce66a93 Compare February 5, 2025 08:01
@baum baum force-pushed the cluster-allocation branch 2 times, most recently from 0317e37 to 17fc216 Compare February 7, 2025 02:05
@baum baum force-pushed the cluster-allocation branch from 313b59e to 7d8bc89 Compare February 9, 2025 10:21
@baum baum changed the title cluster.py: extract interface and add ClusterPoolAllocator cluster.py: extract interface and add ClusterPoolAllocator and FlatBdevsPerCluster Feb 9, 2025
@baum baum force-pushed the cluster-allocation branch 4 times, most recently from 54e7cce to e56506d Compare February 10, 2025 07:55
@baum baum force-pushed the cluster-allocation branch from e56506d to 53b330a Compare February 10, 2025 07:58
@baum baum merged commit d5b0517 into ceph:devel Feb 10, 2025
54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants