RBD QoS
RBD Quality of Service (QoS) allows administrators to set IOPS and bandwidth limits on RBD block volumes. This prevents noisy-neighbor issues in multi-tenant clusters by ensuring that no single workload can saturate the storage cluster's I/O capacity.
QoS is configured through a VolumeAttributesClass resource, which allows dynamic modification of QoS limits on existing volumes without recreation using the ControllerModifyVolume CSI operation.
Supported Mounters¶
krbd (cgroup v2)¶
The default krbd (kernel RBD) mounter enforces QoS via the Linux cgroup v2 io.max controller at the container level.
Note
Kubernetes >= v1.34 is required (VolumeAttributesClass is GA since v1.34). cgroup v2 must be enabled on the nodes (default on most modern Linux distributions) and Linux kernel >= 5.8 is required.
QoS Parameters Reference¶
krbd (cgroup v2) Parameters¶
The following parameters can be set on a VolumeAttributesClass resource. All parameters are optional — set only the limits you need.
| Parameter | Description | Example |
|---|---|---|
maxReadIops | Maximum read IOPS limit | "1000" |
maxWriteIops | Maximum write IOPS limit | "2000" |
maxReadBps | Maximum read bandwidth (bytes/sec) | "104857600" (100 MiB/s) |
maxWriteBps | Maximum write bandwidth (bytes/sec) | "209715200" (200 MiB/s) |
Fresh Cluster Setup¶
For new Rook Ceph deployments, follow these steps to enable QoS.
-
Ensure the StorageClass has the required secret references for modify and publish operations. The default storageclass.yaml already includes these:
-
Create the VolumeAttributesClass:
See the volumeattributesclass-cgroup.yaml for the full example with all available parameters.
-
Create a PVC with the VolumeAttributesClass:
-
To change QoS on an existing volume, update the PVC's
volumeAttributesClassName:Note
A single pod can have multiple volumes with different QoS limits by using different VolumeAttributesClasses for each PVC.
Upgrading Existing Clusters¶
VolumeAttributesClass allows applying QoS to existing volumes without migration. Follow these steps to enable QoS on upgraded clusters.
-
Update the existing StorageClass to add the required secret references. Since StorageClass parameters are immutable, you must delete and recreate it:
Warning
Deleting a StorageClass does not affect existing PVs or PVCs. However, new PVC creation will fail until the StorageClass is recreated.
Edit the storageclass-backup.yaml to add the modify-secret and publish-secret parameters as described in Step 1 of the Fresh Cluster Setup, then recreate:
-
Create the VolumeAttributesClass:
-
Apply QoS to existing PVCs by patching them with the VolumeAttributesClass:
-
Verify QoS is applied by checking the PVC status:
The output should match the VolumeAttributesClass name you applied.
Troubleshooting¶
QoS Limits Not Being Enforced¶
-
Verify VolumeAttributesClass: Check that the VolumeAttributesClass exists and the PVC references it:
-
Check CSI driver logs: Look for QoS-related errors in the CSI node plugin:
cgroup v2 QoS Not Working¶
-
Verify cgroup v2: Check that nodes use cgroup v2:
If the file exists and lists
io, cgroup v2 is active with theiocontroller enabled. -
Check Kubernetes version: VolumeAttributesClass requires Kubernetes >= v1.34. Verify: