Chapter 4. Configuring Block Storage service (cinder) quality of service specifications
You can apply performance limits to volumes that your cloud users create, by creating and associating Quality of Service (QoS) specifications to each volume type. For example, volumes that use higher performance QoS specifications could provide your users with more IOPS or users could assign lighter workloads to volumes that use lower performance QoS specifications to conserve resources.
To create a QoS specification and associate it with a volume type, complete the following tasks:
Create and configure the QoS specification.
When you create a QoS specification you must choose the required consumer. The consumer determines where you want to apply the QoS limits and determines which QoS property keys are available to define the QoS limits. For more information about the available consumers, see Consumers of QoS specifications.
You can create volume performance limits by setting the required QoS property keys to your deployment specific values. For more information on the QoS property keys provided by the Block Storage service (cinder), see Block Storage QoS property keys.
- Associating a QoS specification with a volume type.
You can create, configure, and associate a QoS specification to a volume type by using the CLI.
4.1. Consumers of Block Storage QoS specifications リンクのコピーリンクがクリップボードにコピーされました!
When you create a QoS specification you must choose the required consumer. The consumer determines where you want to apply the QoS limits and determines which QoS property keys are available to define the QoS limits.
The Block Storage service (cinder) supports the following consumers of QoS specifications:
-
front-end: The Compute service (nova) applies the QoS limits when the volume is attached to an instance. The Compute service supports all the QoS property keys provided by the Block Storage service. back-end: The back-end driver of the associated volume type applies the QoS limits. Each back-end driver supports their own set of QoS property keys. For more information on which QoS property keys the driver supports, see the back-end driver documentation.You would use the
back-endconsumer in cases where thefront-endconsumer is not supported. For instance, when attaching volumes to bare metal nodes through the Bare Metal Provisioning service (ironic).both: Both consumers apply the QoS limits, where possible. This consumer type therefore supports the following QoS property keys:- When a volume is attached to an instance, then you can use every QoS property key that both the Compute service and the back-end driver supports.
- When the volume is not attached to an instance, then you can only use the QoS property keys that the back-end driver supports.
4.2. Block Storage quality of service property keys リンクのコピーリンクがクリップボードにコピーされました!
The Block Storage service (cinder) provides you with quality of service (QoS) property keys so that you can limit the performance of the volumes that your cloud users create. The default value for all QoS property keys is 0, which means that the limit is unrestricted.
These limits use the following two industry standard measurements of storage volume performance:
- Input/output operations per second (IOPS)
- Data transfer rate, measured in bytes per second
The consumer of the QoS specification determines which QoS property keys are supported. For more information, see Consumers of QoS specifications.
Block Storage cannot perform error checking of QoS property keys, because some QoS property keys are defined externally by back-end drivers. Therefore, Block Storage ignores any invalid or unsupported QoS property key. Ensure that you spell the QoS property keys correctly. The volume performance limits that contain incorrectly spelled property keys are ignored.
For both the IOPS and data transfer rate measurements, you can configure the following performance limits:
- Fixed limits
- Typically, fixed limits should define the average usage of the volume performance measurement.
- Burst limits
- All burst limits use a burst length of one second. Typically, burst limits should define periods of intense activity of the volume performance measurement. A burst limit makes allowance for an increased rate of activity for a specific time, while keeping the fixed limits low for average usage.
- Total limits
-
Specify a global limit for both the read and write operations of the required performance limit, by using the
total_*QoS property key. Read and write limits are ignored when you specify a total limit. Instead of using a total limit, you can apply separate limits to the read and write operations or choose to limit only the read or write operations. - Read limits
-
Specify a limit that only applies to the read operations of the required performance limit, by using the
read_*QoS property key. - Write limits
-
Specify a limit that only applies to the write operations of the required performance limit, by using the
write_*QoS property key.
You can use the following Block Storage QoS property keys to create volume performance limits for your deployment:
| Performance limit | Measurement unit | QoS property keys |
|---|---|---|
| Fixed IOPS | IOPS |
|
| Fixed IOPS calculated by the size of the volume. For more information about the usage restrictions of these limits, see QoS limits that scale according to volume size. | IOPS per GB |
|
| Burst IOPS | IOPS |
|
| Fixed data transfer rate | Bytes per second |
|
| Burst data transfer rate | Bytes per second |
|
| Size of an IO request when calculating IOPS limits. For more information, see Set the IO request size for IOPS limits. | Bytes |
|
4.2.1. Set the IO request size for IOPS limits リンクのコピーリンクがクリップボードにコピーされました!
If you implement IOPS volume performance limits, you should also specify the typical IO request size to prevent users from circumventing these limits. If you do not then users could submit several large IO requests instead of a lot of smaller ones.
Use the size_iops_sec QoS property key to specify the maximum size, in bytes, of a typical IO request. The Block Storage service uses this size to calculate the proportional number of typical IO requests for each IO request that is submitted, for example:
size_iops_sec=4096
- An 8 KB request is counted as two requests.
- A 6 KB request is counted as one and a half requests.
- Any request less than 4 KB is counted as one request.
The Block Storage service only uses this IO request size limit when calculating IOPS limits.
The default value of size_iops_sec is 0, which ignores the size of IO requests when applying IOPS limits.
4.2.2. IOPS limits that scale according to volume size リンクのコピーリンクがクリップボードにコピーされました!
You can create IOPS volume performance limits that are determined by the capacity of the volumes that your users create. These Quality of Service (QoS) limits scale with the size of the provisioned volumes. For example, if the volume type has an IOPS limit of 500 per GB of volume size for read operations, then a provisioned 3 GB volume of this volume type would have a read IOPS limit of 1500.
- Considerations
- The size of the volume is determined when the volume is attached to an instance. If the size of the volume is changed while it is attached to an instance, these limits are only recalculated for the new volume size when this volume is detached and then reattached to an instance.
- Instead of using a total limit you can apply separate limits to the read and write operations or choose to limit only the read or write operations.
- Read and write limits are ignored when you specify a total limit.
-
The consumer of the QoS specification containing these QoS limits can either be
front-endorboth, but notback-end. For more information, see Consumers of Block Storage QoS specifications.
You can use the following QoS property keys, specified in IOPS per GB, to create scalable volume performance limits:
-
total_iops_sec_per_gb: Specify a global IOPS limit per GB of volume size for both the read and write operations. -
read_iops_sec_per_gb: Specify a IOPS limit per GB of volume size that only applies to the read operations. -
write_iops_sec_per_gb: Specify a IOPS limit per GB of volume size that only applies to the write operations.
4.3. Creating and configuring a QoS specification リンクのコピーリンクがクリップボードにコピーされました!
A Quality of Service (QoS) specification is a list of volume performance QoS limits. You create each QoS limit by setting a QoS property key to your deployment specific value. To apply the QoS performance limits to a volume, you must associate the QoS specification with the required volume type.
Prerequisites
- You must be a project administrator to create and configure QoS specifications.
Procedure
Access the remote shell for the
openstackclientpod from your workstation:oc rsh -n openstack openstackclient
$ oc rsh -n openstack openstackclientCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create the QoS specification:
openstack volume qos create [--consumer <qos_spec_consumer>] --property <key>=<value> <qos_spec_name>
$ openstack volume qos create [--consumer <qos_spec_consumer>] --property <key>=<value> <qos_spec_name>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Add the performance limits to the QoS specification, by specifying a separate
--property <key>=<value>argument for each QoS limit, as follows:Replace
<key>with the QoS property key of the required performance constraint. For more information, see Block Storage QoS property keys.ImportantEnsure that you spell the QoS property keys correctly. The volume performance limits that contain incorrectly spelled property keys are ignored.
-
Replace
<value>with your deployment-specific limit for this performance constraint, in the measurement unit required by the QoS property key. -
Optional: Replace
<qos_spec_consumer>with the required consumer of this QoS specification. If not specified, the consumer defaults toboth. For more information, see Consumers of QoS specifications. Replace
<qos_spec_name>with the name of your QoS specification.Example:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Exit the
openstackclientpod:exit
$ exitCopy to Clipboard Copied! Toggle word wrap Toggle overflow
4.4. Editing an existing QoS specification リンクのコピーリンクがクリップボードにコピーされました!
You can configure an existing QoS specification to add other performance limits or to change the limits of the existing properties.
Prerequisites
- You must be a project administrator to edit QoS specifications.
Procedure
Access the remote shell for the
openstackclientpod from your workstation:oc rsh -n openstack openstackclient
$ oc rsh -n openstack openstackclientCopy to Clipboard Copied! Toggle word wrap Toggle overflow Configure the QoS specification to add other performance limits or to change the limits of the existing properties:
openstack volume qos set --property <key>=<value> <qos_spec_name>
$ openstack volume qos set --property <key>=<value> <qos_spec_name>Copy to Clipboard Copied! Toggle word wrap Toggle overflow You can add one or more
--property <key>=<value>arguments. This command does not provide any confirmation that the changes to the properties were successful. You can run the following command to review any changes made to any QoS specification:openstack volume qos list
$ openstack volume qos listCopy to Clipboard Copied! Toggle word wrap Toggle overflow This command provides a table of the configuration details of all the configured QoS specifications, the
Propertiescolumn displays all the configured properties of each QoS specification.Exit the
openstackclientpod:exit
$ exitCopy to Clipboard Copied! Toggle word wrap Toggle overflow
4.5. Associating a QoS specification with a volume type リンクのコピーリンクがクリップボードにコピーされました!
You must associate a Quality of Service (QoS) specification with a volume type to apply the QoS limits to volumes.
If a volume is already attached to an instance, then the QoS limits are only applied to this volume when the volume is detached and then reattached to this instance.
Prerequisites
- The required volume type is created. For more information, see Creating and configuring a volume type.
- The required QoS specification is created. For more information, see Creating and configuring a QoS specification.
Procedure
Access the remote shell for the
openstackclientpod from your workstation:n:oc rsh -n openstack openstackclient
$ oc rsh -n openstack openstackclientCopy to Clipboard Copied! Toggle word wrap Toggle overflow Associate the required QoS specification with the required volume type:
openstack volume qos associate <qos_spec_name> <volume_type>
$ openstack volume qos associate <qos_spec_name> <volume_type>Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Replace
<qos_spec_name>with the name or ID of the QoS specification. You can run theopenstack volume qos listcommand to list the name and ID of all the QoS specifications. -
Replace
<volume_type>with the name or ID of the volume type. You can run theopenstack volume type listcommand to list the name and ID of all the volume types.
-
Replace
Verify that the QoS specification has been associated:
openstack volume qos list
$ openstack volume qos listCopy to Clipboard Copied! Toggle word wrap Toggle overflow The
Associationscolumn of the output table provides the names of the volume types that are associated with each QoS specification.For example:
+--------------------------------------+--------------+-----------+--------------+-------------------------------------------------------------------+ | ID | Name | Consumer | Associations | Properties | +--------------------------------------+--------------+-----------+--------------+-------------------------------------------------------------------+ | 9fc9a481-28e9-49b8-84eb-f0a476cc89a5 | myqoslimits | both | MyVolType | read_iops_sec='6500', size_iops_sec='4096', write_iops_sec='7500' | +--------------------------------------+--------------+-----------+--------------+-------------------------------------------------------------------+
+--------------------------------------+--------------+-----------+--------------+-------------------------------------------------------------------+
| ID | Name | Consumer | Associations | Properties |
+--------------------------------------+--------------+-----------+--------------+-------------------------------------------------------------------+
| 9fc9a481-28e9-49b8-84eb-f0a476cc89a5 | myqoslimits | both | MyVolType | read_iops_sec='6500', size_iops_sec='4096', write_iops_sec='7500' |
+--------------------------------------+--------------+-----------+--------------+-------------------------------------------------------------------+
Exit the
openstackclientpod:exit
$ exitCopy to Clipboard Copied! Toggle word wrap Toggle overflow
4.6. Disassociating a QoS specification from volume types リンクのコピーリンクがクリップボードにコピーされました!
You can disassociate a Quality of Service (QoS) specification from a volume type when you no longer want the QoS limits to be applied to volumes of that volume type.
You can either disassociate a specific volume type, or all the volumes types when more than one volume type is associated to the same QoS specification.
If a volume is already attached to an instance, then the QoS limits are only removed from this volume when the volume is detached and then reattached to this instance.
Prerequisites
- You must be a project administrator to create, configure, associate, and disassociate QoS specifications.
Procedure
Access the remote shell for the
openstackclientpod from your workstation:oc rsh -n openstack openstackclient
$ oc rsh -n openstack openstackclientCopy to Clipboard Copied! Toggle word wrap Toggle overflow Disassociate the volume types associated with the QoS specification:
To disassociate a specific volume type associated with the QoS specification:
openstack volume qos disassociate <qos_spec_name> --volume-type <volume_type>
$ openstack volume qos disassociate <qos_spec_name> --volume-type <volume_type>Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Replace
<qos_spec_name>with the name or ID of the QoS specification. You can run theopenstack volume qos listcommand to list the name and ID of all the QoS specifications. -
Replace
<volume_type>with the name or ID of the volume type associated with this QoS specification. You can run thecinder type-listcommand to list the name and ID of all the volume types.
-
Replace
To disassociate all volume types associated with the QoS specification:
openstack volume qos disassociate <qos_spec_name> --all
$ openstack volume qos disassociate <qos_spec_name> --allCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verify that the QoS specification has been disassociated:
openstack volume qos list
$ openstack volume qos listCopy to Clipboard Copied! Toggle word wrap Toggle overflow The Associations column of this QoS specification should either not contain the specified volume type or should be empty when all the volume types were disassociated.
Exit the
openstackclientpod:exit
$ exitCopy to Clipboard Copied! Toggle word wrap Toggle overflow