Using QoS

StorPool provides the ‘storpool_qos’ service (see Quality of service) that tracks and configures the storage tier for all volumes based on a specifically provided qc tag specifying the storage tier for each volume.

Before you start

For details on how to install and configure StorPool with CloudStack, see Installation and configuration.

Configuration

To manage the QoS limits with a qc tag, you have to add a qc tag resource detail to each disk offering to which a tier should be applied, with a key SP_QOSCLASS and the value from the configuration file for the storpool_qos service:

add resourcedetail resourceid={diskofferingid} details[0].key=SP_QOSCLASS details[0].value={the name of the tier from the config} resourcetype=DiskOffering

To change the tier via CloudStack, you can use the CloudStack API call changeOfferingForVolume. The size is required, but the user could use the current volume size. Example:

change offeringforvolume id={The UUID of the Volume} diskofferingid={The UUID of the disk offering} size={The current or a new size for the volume}

Starting with CloudStack version 4.20, users who were using the offerings to change the StorPool template via the SP_TEMPLATE detail will continue to have this functionality. They should use the changeOfferingForVolume API call instead of the following calls:

  • resizeVolume API call for DATA disk.

  • scaleVirtualMachine API call for ROOT disk

Note

If you are using a version of CloudStack between 4.17 and 4.19 and would like to use the changeOfferingForVolume API call, please contact StorPool.

If the disk offering has both SP_TEMPLATE and SP_QOSCLASS defined, the SP_QOSCLASS detail will be prioritized, setting the volume’s QoS using the respective qc tag value. In case the QoS for a volume is changed manually, the ‘storpool_qos’ service will automatically reset the QoS limits following the qc tag value once per minute.

Creating Disk Offering for each tier

Go to Service Offerings > Disk Offering > Add disk offering. Add disk offering detail with API call in CloudStack CLI:

add resourcedetail resourcetype=diskoffering resourceid=$UUID details[0].key=SP_QOSCLASS details[0].value=$Tier Name

Creating a VM with QoS

To deploy a virtual machine:

  1. Go to Compute > Instances > Add Instances.

  2. For the ROOT volume, choose the option Override disk offering. This will set the required qc tag from the disk offering (DO) detail.

Creating DATA disk with QoS:

  1. Create volume via GUI/CLI.

  2. Choose a disk offering which has the required SP_QOSCLASS detail.

To update the tier of a ROOT/DATA volume go to Storage > Volumes, select the Volume, and click on the Change disk offering for the volume in the upper right corner.

More information

Supported for versions 4.20 and newer. Also supported via custom plugin build in versions 4.17 to 4.19.