Quality of Service (QoS)
Providing quality of service (QoS) guarantees is a central factor for service deployments in cloud-based environments. Policy-based QoS is a network management tool that provides network control based on applications, users, and computers. QoS can be used for prioritizing and managing the sending rate for outgoing network traffic - ensuring that resources are efficiently used to provide the required level of service.
Lightbits enhances QoS logic to prioritize and manage the data path of reads and writes to the cluster's volumes.
QoS Policies
You can define QoS policies that are based on IOPS or bandwidth. The IOPS can be fixed or variable based on volume size (IOPS/GB). All limits are per volume; there is one read limit and one write limit in each policy.
Cluster admins can define global policies (that can be used by any tenant for any volume) or tenant-specific policies.
- Default Global Policy: This policy will automatically be assigned to new projects created without an explicit default policy. There is only one default global policy in the cluster.
- Default Project Policy: The policy assigned to the project. This default policy will be assigned to each new volume of the project that was not created with an explicit policy. Each project has only one default policy.
Only cluster admins can create and update policies and assign policies to projects. The tenant admin can assign policies to volumes. The tenant admin can assign global policies and policies that were assigned to the project.
Note that when updating policies and default policies:
- Updating the limits of any existing QoS policy will immediately impact all volumes that have this policy assigned to them.
- Changing the global default QoS policy will only impact newly created projects without an explicit QoS policy.
- Changing the project default QoS policy of a project will only impact newly created volumes (of that project) without an explicit QoS policy.
Sample Command
Create a new QoS policy:
# lbcli -J $LIGHTOS_JWT 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 newly-created policy can be assigned to any number of projects under
$ --projects
Sample Output
List existing QoS policies:
# lbcli -J $LIGHTOS_JWT 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 -J $LIGHTOS_JWT update volume --uuid=0e7ee2fa-5ff3-46cc-ba4a-efd110d0d8b0 --project-name=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 on the Lightbits side.
- When trying to define a fixed IOPS threshold that is under the minimum value of 256 IOPS, an error will be returned to the user API call.
- IOPS per GB threshold is not enforced on the API level. Based on the actual volume size during create/update volume, the minimum will be set at 256 IOPS.
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