Quality of service

The storpool_qos service tracks changes for volumes that match certain criteria, and takes care for updating the I/O performance limits of these volumes. Using this service you can set different performance tiers, which would allow you to meet the requirements of the end users.

The service is available starting with release 20.0 revision 20.0.987.e0aa2a0f7.

Introduction

By default, the storpool_qos service is started on all nodes running the API service, and it is active on the active API node. It tracks changes for each volume that matches one of the following criteria:

  • It is in a template whose name matches a defined storage tier

  • It has a qc tag matching a defined storage tier

The service takes care for updating the I/O performance settings (like iops and bw) of the matching volumes. For details, see CLI reference.

Defining tiers

A tier is defined as a JSON file containing the following names and their values:

  • min_iops: Minimum IOPS regardless of the size of the volume or snapshot (int, IOPS)

  • min_bw: Minimum bandwidth regardless of the size of the volume or snapshot (int, MiB/s)

  • max_iops: Maximum IOPS regardless of the size of the volume or snapshot (int, IOPS)

  • max_bw: Maximum bandwidth regardless of the size of the volume or snapshot (int, MiB/s)

  • iops_gb: IOPS limit per GiB based on the size of the volume or the snapshot (float, IOPS)

  • mbps_gb: MiB/s limit per GiB based on the size of the volume or the snapshot (float, MiB/s)

A value of 0 means no limit, and any value results in a defined limit. Here is a short example for a tier definition:

{
  "tier0": {
    "min_iops": 0,
    "min_bw": 0,
    "max_iops": 0,
    "max_bw": 0,
    "iops_gb": 0,
    "mbps_gb": 0
  }
}

There are no default tiers defined; an example is available in /usr/share/doc/storpool/examples/default-qos.json.

Setting tiers

To set storage tiers initially:

  1. Create a JSON file and define the tiers, as described in the section above.

  2. Provide the configuration to the service:

    # /usr/lib/storpool/storpool_qos config --load-from $path_to_json
    
  3. Run the following on the active API node to apply the changes:

    # systemctl restart storpool_qos.service
    

To show the present configuration:

# /usr/lib/storpool/storpool_qos config --dump

To change the current storage tiers setup:

  1. Obtain the current tiers using the --dump option (see above).

  2. Copy the result to a new JSON file.

  3. Edit the file and modify the tiers as needed.

    Warning

    Make sure all the tiers you need are defined. The update described here completely rewrites the existing configuration.

  4. Provide the new configuration to the service:

    # /usr/lib/storpool/storpool_qos config --load-from $path_to_json
    
  5. Run the following on the active API node to apply the changes:

    # systemctl restart storpool_qos.service
    

More information

For details on other background services and how they can be managed, see Background services and Managing services with storpool_ctl.