Using volume QoS policies

You can use capacity-based quality of service (QoS) policies to define dynamic limits of compute volumes. Per-GB QoS policies allow you to manually configure IOPS and bandwidth for volumes depending on their size. For example, with the limits 5 IOPS/GB and 1MB/sec per GB, a 100-GB volume will have the performance parameters of 500 IOPS and 100 MB/s, while a 1-TB volume will have as much as 5000 IOPS and 1000 MB/s. After you extend a volume with per-GB limits, its performance will automatically increase corresponding to its size.

For dynamic IOPS and bandwidth configuration, you can limit the following volume parameters:

  • Number of read operations per second per GB
  • Number of write operations per second per GB
  • Total number of read and write operations per second per GB
  • Number of bytes read per second per GB
  • Number of bytes written per second per GB
  • Total number of bytes read and written per second per GB

Additionally, you can control the minimum IOPS and bandwidth values, to guarantee high performance to small volumes.

Per-GB QoS policies can be set to compute volumes by means of storage policies. You can either create a new storage policy with per-GB limits or add such limits to an existing storage policy.

Limitations

  • Per-GB limits are not applied to existing volumes on the fly. To apply them to an existing volume, restart the VM that this volume is attached to.
  • You can limit either total IOPS/bandwidth or read and write IOPS/bandwidth per QoS policy. For example, you cannot set the total-bytes-sec-per-gb parameter together with the write-bytes-sec-per-gb or read-bytes-sec-per-gb parameter.

To create a per-GB QoS policy

Use the following command:

vinfra service compute storage-policy create --tier {0,1,2,3} (--replicas <norm> | --encoding <M>+<N>)
                                             --failure-domain {0,1,2,3,4}
                                             [--write-bytes-sec-per-gb <limit>] [--write-bytes-sec-per-gb-min <limit>]
                                             [--read-bytes-sec-per-gb <limit>] [--read-bytes-sec-per-gb-min <limit>]
                                             [--write-iops-sec-per-gb <limit>] [--write-iops-sec-per-gb-min <limit>]
                                             [--read-iops-sec-per-gb <limit>] [--read-iops-sec-per-gb-min <limit>]
                                             [--total-bytes-sec-per-gb <limit>] [--total-bytes-sec-per-gb-min <limit>]
                                             [--total-iops-sec-per-gb <limit>] [--total-iops-sec-per-gb-min <limit>]
                                             <name>
--tier {0,1,2,3}
Storage tier
--encoding <M>+<N>

Storage erasure encoding mapping in the format:

  • M: number of data blocks
  • N: number of parity blocks
--failure-domain {0,1,2,3,4}
Storage failure domain
--replicas <norm>[:<min>]

Storage replication mapping in the format:

  • norm: number of replicas to maintain
  • min: minimum required number of replicas (optional)
--write-bytes-sec-per-gb <limit>
Number of bytes written per second per GB
--write-bytes-sec-per-gb-min <limit>
Minimum number of bytes written per second per GB
--read-bytes-sec-per-gb <limit>
Number of bytes read per second per GB
--read-bytes-sec-per-gb-min <limit>
Minimum number of bytes read per second per GB
--write-iops-sec-per-gb <limit>
Number of write operations per second per GB
--write-iops-sec-per-gb-min <limit>
Minimum number of write operations per second per GB
--read-iops-sec-per-gb <limit>
Number of read operations per second per GB
--read-iops-sec-per-gb-min <limit>
Minimum number of read operations per second per GB
--total-bytes-sec-per-gb <limit>
Total number of bytes read and written per second per GB
--total-bytes-sec-per-gb-min <limit>
Minimum number of bytes read and written per second per GB
--total-iops-sec-per-gb <limit>
Total number of read and write operations per second per GB
--total-iops-sec-per-gb-min <limit>
Minimum number of read and write operations per second per GB
<name>
Storage policy name

For example, to create a storage policy myqospolicy with the limit of 100 read and write operations per second per GB and the minimum of 50 read and write operations per second per GB, run:

# vinfra service compute storage-policy create myqospolicy --tier 1 --failure-domain 1 --replicas 3 \
--total-iops-sec-per-gb 100 --total-iops-sec-per-gb-min 50

To add per-GB limits to an existing policy

Use the command vinfra service compute storage-policy set and specify the required value for a parameter that you want to limit. For example, to add the bandwidth limit of 104857600 bytes read and written per second per GB to the storage policy myqospolicy, run:

# vinfra service compute storage-policy set myqospolicy --total-bytes-sec-per-gb 104857600

To remove per-GB limits from an existing policy

Use the command vinfra service compute storage-policy set and specify -1 as a value for a parameter that you want to be unlimited. For example, to make unlimited bandwidth for the storage policy myqospolicy, run:

# vinfra service compute storage-policy set myqospolicy --total-bytes-sec-per-gb -1