Quality of Service (QoS)
Policy-based QoS is applied to any new volume created over a Lightbits cluster. This will either be done by explicitly specifying the QoS desired for the volume as part of the volume request information, or inherited by the Lightbits cluster from the default QoS policy associated with the volume's project.
Similarly, a project could have a QoS policy explicitly specified at the time of creation, or inherit the global cluster default policy (no-limit-policy).
A QoS policy must either be created as a global policy available to all, or specify the specific project it is available for. A volume can be updated at any time to use a different QoS policy (which is either global or available for the project that this volume belongs to).
A QoS policy can be updated at any time, with updated limits propagated to any volume associated with this project. A project can be updated at any time to use a different default QoS policy; however, note that this only provides a default QoS policy for newly created volumes. Any new volumes will use the newly specified default QoS policy, and this will not change the QoS used by existing volumes.
The default QoS policy can be modified at any time to point to a desired QoS policy. This will affect any new projects created. Any existing projects (/volumes) will continue to use the policies they have specified already.
Any volume can be updated to not have the rate limit, by updating it to use a QoS policy that is set at an unlimited rate for both ingress and egress.
The rate limit is applied per volume, limiting the total aggregated ingress or egress traffic rate on the Lightbits cluster side. The QoS rate limit mechanism provides a few different means to specify the limit, each with its own units and granularity:
- iops: Volume read and write bandwidth limits, specified in units of IOPs. The granularity increases by 256 IOPs each time. For example, 400 IOPs would be rounded up to 512 IOPs. Note that the IOPs limit assumes a 4 KB block size for rate calculations.
- bw: Volume read and write bandwidth limits, specified in units of MB/s. The granularity must be in full MB/s.
- iops-per-gb: Volume read and write bandwidth, specified in limits in IOPs per GB of volume size. The volume size will be rounded down if it is not a whole GB.
Lightbits enhances QoS for logical volumes, during drive failure recoveries and with multi-tenancy capabilities.
Sample Command
Create a new QoS policy
root@rack13-server94:~# lbcli create qos-policy --name=iops-best --description="256 iops" --type iops --write-limit 256 --read-limit 256 --projects default
UUID Name State Type Write limit Read limit
d47b29c7-ed85-47d9-ac4e-53a637be2b9d iops-best Creating iops 256 256
Note that a QoS policy can be created to limit the following parameters:
- Limit IOPS per user: --type iops
- Limit bandwidth per user: --type bw
- Limit bandwidth per gigabyte per user: --type iops-per-gb
- IOPS write/read limit is in scales of 256, 512, 1024...
- The new created policy can be assigned to any number of projects under
$ --projects
Sample Output
List existing QoS policies
root@rack13-server94:~# lbcli list qos-policies
UUID Name State Type Write limit Read limit
babd2548-b6bc-444f-978c-ed556404f62c no-limit-policy Active iops 0 0
ff23f768-96b6-4874-b838-9eee41b0838e iops-best Active iops 256 256
Update the volume with the newly created QoS policy
$ lbcli update volume --uuid=0e7ee2fa-5ff3-46cc-ba4a-efd110d0d8b0 --projects=default --qos-policy-uuid=ff23f768-96b6-4874-b838-9eee41b0838e
Defining Thresholds
When creating or updating a QoS policy, minimum values for limit thresholds are defined. For QoS, the maximum threshold value is unlimited, and all thresholds are rounded up by 256 increments. So for example if you define a threshold of 1001 IOPS, it will be rounded up to 1024.
- The incremental roundup is done in Lightbits and is set in the policy after calculation (e.g., as a silent operation).
- For the minimum value, in fixed IOPS the 256 IOPS limit is enforced on the API level, and returns an error if under 256.
- IOPS per GB threshold is not enforced on the API level - but on each volume calculation of limit based on size, 256 IOPS is the minimum.
There are three types of thresholds, which are detailed in the table below:
Minimum Value | Incremental Value | Maximum Value | |
---|---|---|---|
Fixed IOPS threshold | 256 IOPS | 256 | No limit |
Fixed bandwidth thresholds | 1 MB/s | 1 MB/s | No limit |
IOPS per GB threshold | 1 IOPS per GB, but a total minimum of 256 IOPS | 1 IOPS per GB, with a total increment of 256 IOPS | No limit |
Below are a few examples:
- 100 GB with 1 IOPS per GB → limit of 256 IOPS
- 275 GB with 1 IOPS per GB → limit of 512 IOPS
- 890 GB with 1 IOPS per GB → limit of 1024 IOPS
- 100 GB with 2 IOPS per GB → limit of 256 IOPS
- 275 GB with 2 IOPS per GB → limit of 168 IOPS
- 890 GB with 2 IOPS per GB → limit of 1792 IOPS
- Fixed IOPS of 100 → API will fail (minimum threshold)
- Fixed IOPS of 250 → API will pass, limit of 256 IOPS
- Fixed IOPS of 331 → API will pass, limit of 512 IOPS