Skip to content

nvmeof: QoS Support for NVMe-oF CSI Driver #5694

@gadididi

Description

@gadididi

QoS Support for NVMe-oF CSI Driver

Overview

Add QoS (Quality of Service) support for NVMe-oF namespaces, allowing users to control IOPS and bandwidth limits both at volume creation and during runtime.

Proposed Implementation

1. QoS at Volume Creation (StorageClass)

Set initial QoS limits via StorageClass parameters. If omitted, namespaces remain unlimited.

Example StorageClass:

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: csi-nvmeof-standard
provisioner: nvmeof.csi.ceph.com
parameters:
  pool: mypool
  # Optional QoS parameters
  qosRwIopsPerSecond: "10000"
  qosRwMegabytesPerSecond: "100"
  qosReadMegabytesPerSecond: "150"
  qosWriteMegabytesPerSecond: "50"

Implementation: Modify ControllerCreateVolume() to:

  • Parse QoS parameters from StorageClass
  • Call ns set_qos API after namespace creation (if parameters exist)
  • Handle missing parameters gracefully (no QoS = unlimited)

2. Runtime QoS Modification (VolumeAttributesClass)

Enable QoS changes on existing volumes without recreation using CSI ControllerModifyVolume().

Example VolumeAttributesClass:

apiVersion: storage.k8s.io/v1beta1
kind: VolumeAttributesClass
metadata:
  name: high-performance
driverName: nvmeof.csi.ceph.com
parameters:
  qosRwIopsPerSecond: "50000"
  qosRwMegabytesPerSecond: "500"

Now you want to hook the pvc with the VAC, you should do:
Usage:

# Apply QoS to existing PVC
kubectl patch pvc my-pvc -p '{"spec":{"volumeAttributesClassName":"high-performance"}}'

Implementation: Add ControllerModifyVolume() RPC to:

  • Parse QoS parameters from VolumeAttributesClass
  • Call ns set_qos via GRPC to the GW
  • Deploy csi-resizer sidecar to monitor VAC changes

Supported QoS Parameters

All parameters map directly to NVMe-oF gateway ns set_qos command:

  • qosRwIopsPerSecond - R/W IOPS limit (0 = unlimited)
  • qosRwMegabytesPerSecond - R/W bandwidth limit
  • qosReadMegabytesPerSecond - Read bandwidth limit
  • qosWriteMegabytesPerSecond - Write bandwidth limit

Requirements

  • Kubernetes 1.29+ (for VolumeAttributesClass support)
  • CSI spec 1.9.0+ (for ControllerModifyVolume)
  • MODIFY_VOLUME controller capability
  • csi-resizer sidecar container

Metadata

Metadata

Labels

component/nvme-ofIssues and PRs related to NVMe-oF.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions