Overview

QoS resolves problems like network latencies and blocking by defining I/O bandwidth thresholds. It ensures a high running efficiency for a overloaded or congested network without delaying or discarding any business.

Principle

  • QoS defines I/O bandwidth thresholds to limit disk bandwidths and network upstream/downstream bandwidths. I/O bandwidth cannot exceed this threshold. Unit: MB/s、GB/s、TB/s.
  • If you do not set a QoS, the I/O bandwidth is not limited.

Considerations

  • If you do not set a QoS for an instance/disk offering as an admin (the QoS is not set by default), the QoS you can set for a VM or volume as a normal account/project manager/project admin/ project member is not limited.
  • If you set a QoS for an instance/disk offering as an admin, the QoS you can set for a VM or volume as a normal account/project manager/project admin cannot exceed the QoS of the instance/disk offering.
  • If you set a QoS for an instance/disk offering and use the offering to create a VM instance or volume, the VM/volume QoS is consistent with the offering QoS by default. The deletion of the offering or modifications on the offering QoS does not influence the QoS of the VM/volume you have created before.
  • If you cancel or modify a QoS as an admin, the QoS range that a normal account/project admin/project manager/project member can set is limited by the original QoS value.
  • If you change an instance offering for a VM instance, the VM root volume QoS and NIC QoS is limited by the QoS of this new instance offering.

Preparations

  • Before you begin with this tutorial, make sure that you have installed a ZStack Cloud of the latest version and deployed necessary resources.

    For detailed information, see Installation and Deployment in User Guide.

  • This tutorial described how to add and use QoS in details.
  • If you want to set QoS for backup jobs, install a Backup Service license in addition to the base license.
    Note: ZStack Cloud based on a c72 ISO does not support Backup Service.
  • If you want to set QoS for V2V migration jobs, install a Migration Service License in addition to the base license.

Scenario Practices

Set QoS for Basic Resources

Basic resources refer to root volumes, data volumes, NICs, virtual IPs, and VPC vRouters. You can set QoS for these basic resources.

Set QoS for Root Volume

About this task

This topic describes how to set QoS for a VM root volume and check the setting.

Before you begin this practice, make sure that you have deployed a ZStack Cloud of the latest version.

To set QoS for a VM root volume, follow these steps:
  • Create an instance offering.
  • Create a VM instance.
  • Set QoS for the VM root volume.
  • Check the root volume QoS.

Procedure

  1. Create an Instance Offering

    On the main menu of ZStack Cloud, choose Resource Center > Resource Pool > Compute Configuration > Instance Offering. On the Instance Offering page, click Create Instance Offering. Then, the Instance Offering page is displayed. On the displayed page, you can set QoS for the instance offering you are creating through the following parameters:

    • Set Disk IOPS: Optional. You can set the disk maximum reads/writes per second (IOPS).
      If you disable this parameter, the disk IOPS is unlimited. If you need to limit the disk IOPS, enable this parameter and choose either of the following methods:
      • By Total IOPS: Set a maximum reads & writes IOPS.
      • By Read/Write IOPS: Set a maximum read IOPS and a maximum write IOPS respectively.
        • Read IOPS: Set a maximum read IOPS.
        • Write IOPS: Set a maximum write IOPS.
    • Set Disk Bandwidth: Optional. Set the maximum I/O bandwidth. Unit: Kbps, Mbps, and Gbps.
      If you disable this parameter, the disk I/O bandwidth is unlimited. If you need to limit the disk I/O bandwidth, enable this parameter and choose either of the following methods:
      • By Total Speed: Set a maximum read & write speed.
      • By Read/Write Speed: Set a maximum read speed and a maximum write speed respectively.
        • Read Speed: Set a maximum read speed.
        • Write Speed: Set a maximum write speed.
  2. Create a VM Instance

    On the main menu of ZStack Cloud, choose Resource Center > Resource Pool > Virtual Resource > VM Instance. On the VM Instance page, click Create VM Instance and choose Standard Creation. Create a VM instance from the instance offering you created before. The VM instance QoS is consistent with the QoS you set for the instance offering.

  3. Modify VM root volume QoS.
    On the Configuration Info tab of the VM details page, modify the QoS of the VM root volume.
    Figure 1. Modify Root Volume QoS


  4. Check VM Root Volume QoS
    Assume that the disk bandwidth is 50 MB/s in this practice. Run fio commands to check the QoS of the VM root volume.
    1. Create a VM instance on ZStack Cloud. The QoS of the instance offering this VM based on is not limited.
    2. Run the following fio command to pressurize the disk I/O for 80 seconds. The IOPS of the VM root volume is 3198.
      fio -filename=/tmp/test -direct=1 -iodepth 1 -thread -rw=read -ioengine=psync -bs=16k -size=4G -numjobs=10 -runtime=80 -group_reporting -name=mytest
      Figure 2. IOPS of VM Root Volume With Unlimited QoS


    3. Change the VM root volume QoS to 5 MB/s. Run the following fio command to presurrize the disk I/O for 80 seconds. The IOPS of the VM root volume is 299.
      Figure 3. IOPS of VM Root Volume With Limited QoS


    4. As proved in the step b and c, the QoS you set takes effect and the root volume IOPS reduces to a QoS threshold level. You can also see the root volume IOPS trend in the Monitoring Data part on the VM details page.
      Figure 4. Monitoring Data of Root Volume


    Now, you have set a QoS for a VM root volume successfully. For more action information of VM root volume, see the VM-instance-relevant chapters in User Guide.

Set QoS for NIC

About this task

This topic describes how to set a QoS for an NIC and check the setting.

Before you begin the practice, make sure that you have deployed a ZStack Cloud of the latest version.

To set a QoS for an NIC, follow these steps:
  • Create an instance offering.
  • Create a VM instance.
  • Modify the NIC QoS.
  • Check the NIC QoS.

Procedure

  1. Create an instance offering.

    On the main menu of ZStack Cloud, choose Resource Center > Resource Pool > Compute Configuration > Instance Offering. On the Instance Offering page, click Create Instance Offering. Then, the Instance Offering page is displayed. On the displayed page, you can set QoS for the instance offering you are creating through the following parameters:

    • Set Disk IOPS: Optional. You can set the disk maximum reads/writes per second (IOPS).
      If you disable this parameter, the disk IOPS is unlimited. If you need to limit the disk IOPS, enable this parameter and choose either of the following methods:
      • By Total IOPS: Set a maximum reads & writes IOPS.
      • By Read/Write IOPS: Set a maximum read IOPS and a maximum write IOPS respectively.
        • Read IOPS: Set a maximum read IOPS.
        • Write IOPS: Set a maximum write IOPS.
    • Set Disk Bandwidth: Optional. Set the maximum I/O bandwidth. Unit: Kbps, Mbps, and Gbps.
      If you disable this parameter, the disk I/O bandwidth is unlimited. If you need to limit the disk I/O bandwidth, enable this parameter and choose either of the following methods:
      • By Total Speed: Set a maximum read & write speed.
      • By Read/Write Speed: Set a maximum read speed and a maximum write speed respectively.
        • Read Speed: Set a maximum read speed.
        • Write Speed: Set a maximum write speed.
  2. Create a VM instance.

    On the main menu of ZStack Cloud, choose Resource Center > Resource Pool > Virtual Resource > VM Instance. On the VM Instance page, click Create VM Instance and choose Standard Creation. Create a VM instance based on the instance offering you created before. The VM instance QoS is consistent with the QoS you set for the instance offering.

  3. Modify the NIC QoS.
    On the Configuration Info tab of the VM details page, you can modify the VM NIC QoS.
    Figure 5. Modify NIC QoS


  4. Check the NIC QoS.
    Assume that the network bandwidth is 500 Mbps in this practice. Use the VM instance you create here as a sender and another VM instance or host as a receiver. Run iperf3 commands to check the NIC QoS.
    1. Create a VM instance on ZStack Cloud. The QoS of the instance offering the VM instance based on is not limited.
    2. Run iperf3 -s on the receiver and iperf3 -c x.x.x.x(the receiver IP) -i 1 -t 1000 on the sender to query the bandwidth speed.
      Figure 6. Upstream/Downstream Bandwidth of NIC With Unlimited QoS


    3. Set the NIC QoS to 50 MB/s and check the bandwidth speed.
      Figure 7. Upstream/Downstream Bandwidth of NIC With Limited QoS


    4. As proved in step b and c, the QoS you set takes effect and the NIC upstream/downstream bandwidth reduces to a threshold level. You can also see the bandwidth trend in the Monitoring Data on the VM details page.
      Figure 8. Monitoring Data of VM NIC


    Now, you have set a QoS for an NIC successfully. For more information about NIC, see VM-instance-relevant chapters in User Guide.

Set QoS for Data Volume

About this task

This topic describes how to set a QoS for a data volume and check the data volume QoS.

Before you begin the practice, make sure that you have deployed ZStack Cloud of the latest version.

To set a QoS for a data volume, follow these steps:
  • Create a disk offering.
  • Create a data volume.
  • Modify the data volume QoS.
  • Check the data volume QoS.

Procedure

  1. Create a Disk Offering

    On the main menu of ZStack Cloud, choose Resource Center > Resource Pool > Compute Configuration > Disk Offering. On the Disk Offering page, click Create Disk Offering. You can set a QoS for the disk offering you are creating through the following parameter:

    • Set Disk Bandwidth: Optional. Set an upper limit for the disk I/O bandwidth.
      If you disable this parameter, the disk I/O bandwidth is unlimited. If you need to limit the disk I/O bandwidth, enable this parameter and choose either of the following method:
      • By Total Speed: Set a maximum read & write speed.
      • By Read/Write Speed: Set a maximum read speed and a maximum write speed respectively.
        • Read Speed: Optional. Set a maximum read speed.
        • Write Speed: Optional. Set a maximum write speed.
      Figure 9. Create Disk Offering


  2. Create a data volume.

    On the main menu of ZStack Cloud, choose Resource Center > Resource Pool > Virtual Resource > Volume. On the Volume page, click Create Volume. On the Create Volume page, you can create a data volume based on the disk offering you created before and attach it to a VM instance. The data volume QoS is consistent with the QoS you set for the disk offering.

  3. Modify the data volume QoS.
    You can modify the data volume QoS through one of the following methods:
    • On the volume action list, click Set Volume QoS and set a new QoS for the volume.
      Figure 10. Set Data Volume QoS (On Action List)


    • On the volume action list, click Attach and attach the volume to a VM instance. Then, you can modify the data volume QoS on the Configuration Info tab of the VM details page.
      Figure 11. Set Volume QoS (On VM Details Page)


  4. Check the data volume QoS.
    Assume that the disk bandwidth is 50 MB/s in this practice. Run fio commands to check the data volume QoS.
    1. Create a data volume on ZStack Cloud. The volume QoS is not limited.
    2. Run the following fio command to pressurize the disk I/O. the data volume IOPS is 3198.
      fio -filename=/tmp/test -direct=1 -iodepth 1 -thread -rw=read -ioengine=psync -bs=16k -size=4G -numjobs=10 -runtime=80 -group_reporting -name=mytest
      Figure 12. IOPS of Data Volume With Unlimited QoS


    3. Set the data volume QoS to 5 MB/s. Run the fio command to pressurize the disk I/O for 80 seconds. The data volume IOPS is 299.
      Figure 13. IOPS of Data Volume With Limited QoS


    4. As proved in step b and c, the QoS you set takes effect and the data volume IOPS reduces to a threshold level. You can also see the volume IOPS trend if you attach this data volume to a VM instance.
      Figure 14. Monitoring Data of Data Volume


    Now, you have set a QoS for a data volume successfully. For more information about data volumes, see volume-relevant chapters in User Guide.

Set Individual QoS for Virtual IP

About this task

You can set an individual QoS for public/flat network VIPs. In addition, public network VIP can use a shared bandwidth to enjoy a QoS service. This topic describes how to set an individual QoS for a virtual IP (VIP) and check the VIP QoS.

Before you begin the practice, make sure that you have deployed ZStack Cloud of the latest version.

To set a QoS for a VIP, follow these steps:
  • Create a VIP.
  • Add/delete a VIP QoS.
  • Check the VIP QoS.

Procedure

  1. Create a VIP.
    On the main menu of ZStack Cloud, choose Resource Center > Network Service > Basic Network Service > VIP. On the Custom page, click Create VIP. Then, the Create VIP page is displayed. You can set a QoS for the VIP you are creating through following parameters:
    • You can limit the network bandwidth of public VIPs and flat network VIPs. You can set the QoS for a custom VIP when you create the VIP or after the VIP is created.
      • Public Network VIP: Supports 3 options: Unlimited, Add QoS, and Bind Shared Bandwidth. Default: Unlimited.
        • Unlimited: Does not limit the VIP network bandwidth.
        • Add QoS: Adds a QoS for this VIP individually. Set the following parameters:
          • Port: Optional. Specify a port to set QoS rule for the port.
            Note:
            • Enter an integer that ranges from 1 to 65535.
            • If left blank, the QoS rule takes effect on ports from 1 to 65535.
          • Upstream Bandwidth: Optional. Set the upstream bandwidth for a VIP.
            Note:
            • Enter an integer. Unit: Kbps, Mbps, and Gbps.
            • If left blank, the upstream bandwidth is not limited.
          • Downstream Bandwidth: Optional. Set the downstream bandwidth for a VIP.
            Note:
            • Enter an integer. Unit: Kbps, Mbps, and Gbps.
            • If left blank, the downstream bandwidth is not limited.
        • Bind Shared Bandwidth: Binds the VIP to a shared bandwidth to make it share bandwidth resources and central speed limit with other VIPs.
      • Flat Network VIP: Supports 2 options: Unlimited and Add QoS. Default: Unlimited.
        • Unlimited: Does not limit the VIP network bandwidth.
        • Add QoS: Adds a QoS for this VIP individually. Set the following parameters:
          • Port: Optional. Specify a port to set QoS rule for the port.
            Note:
            • Enter an integer that ranges from 1 to 65535.
            • If left blank, the QoS rule takes effect on ports from 1 to 65535.
          • Upstream Bandwidth: Optional. Set the upstream bandwidth for a VIP.
            Note:
            • Enter an integer. Unit: Kbps, Mbps, and Gbps.
            • If left blank, the upstream bandwidth is not limited.
          • Downstream Bandwidth: Optional. Set the downstream bandwidth for a VIP.
            Note:
            • Enter an integer. Unit: Kbps, Mbps, and Gbps.
            • If left blank, the downstream bandwidth is not limited.

    In this scenario, use the option Add QoS to set an individual QoS for the VIP.

  2. Add/delete a VIP QoS.

    You cannot modify an existing VIP QoS, but you can add/delete a QoS for a VIP on the QoS tab of the VIP details page. Both custom and system VIPs support this action.

    Figure 15. Add/Delete QoS


  3. Check the VIP QoS
    Assume that the network bandwidth is 500 Mbps in this practice. Use the VIP to provide an EIP service and attach it to a VM instance. Take this VM instance as a sender and another VM instance/host as a receiver. Run iperf3 commands to check the VIP QoS.
    1. Create a VIP on ZStack Cloud to provide an EIP service. Attach the EIP to a VM instance. The VIP QoS is not limited.
    2. Run iperf3 -s on the VM instance/host as the receiver and iperf3 -c x.x.x.x(the receiver IP) -i 1 -t 1000 on the VM instance as the sender to check the upstream/downstream bandwidth.
      Figure 16. Upstream/Downstream Bandwidth of VIP With Unlimited QoS


    3. Set the VIP QoS as 50 MB/s and check the VIP upstream/downstream bandwidth.
      Figure 17. Upstream/Downstream Bandwidth of the VIP With Limited QoS


What to do next

Now, you have set an individual QoS for a VIP successfully. For more information about VIP, see VIP-relevant chapters in User Guide.

Set QoS for VPC vRouter

About this task

This topic describes how to set a QoS for a VPC vRouter and check the VPC vRouter QoS.

A VPC vRouter QoS limit the I/O bandwidth of flows passing through the VPC vRouter interface. The upstream bandwidth is flows going into the VPC vRouter. The downstream bandwidth is flows going out the VPC vRouter.

Before you begin this practice, make sure that you have deployed a ZStack Cloud of the latest version.

To set a QoS for a VPC vRouter, follow these steps:
  • Create a VPC vRouter.
  • Create a VPC network.
  • Create a VM instance.
  • Modify the VPC vRouter QoS.
  • Check the VPC vRouter QoS.

Procedure

  1. Create a VPC vRouter.

    On the main menu of ZStack Cloud, choose Resource Center > > vRouter > VPC vRouter. On the VPC vRouter page, click Create VPC vRouter. On the Create VPC vRouter page, set necessary parameters and create a VPC vRouter. For detailed information, see VPC-vRouter-relevant chapters in User Guide.

  2. Create a VPC network.

    On the main menu of ZStack Cloud, choose Resource Center > Network Resource > L3 Network Resources > VPC Network. On the VPC Network page, click Create VPC Network. Then, the Create VPC Network page is displayed. Use the VPC vRouter you created before to create a VPC network. For detailed information, see VPC-relevant chapters in User Guide.

  3. Create a VM instance.

    On the main menu of ZStack Cloud, choose Resource Center > Resource Pool > Virtual Resource > VM Instance. On the VM Instance page, click Create VM Instance. Then, the Create VM Instance page is displayed. On this page, choose Standard Creation and use the VPC network you created before to create a VM instance.

  4. Modify the VPC vRouter QoS.
    On the Network tab of the VPC vRouter details page, you can modify QoS of the associated VPC network and public network.
    Figure 18. Modify VPC vRouter QoS


  5. Check the VPC vRouter QoS.
    Assume that the network bandwidth is 500 Mbps in this practice. Take the VM instance you create in this practice as the sender and another VM instance on the public network as a receiver. Run iperf3 commands to check the VPC vRouter QoS.
    1. Create a VM instance based on the public network on ZStack Cloud. The QoS of the instance offering the VM based on is not limited. Make sure that the sender and receiver can intercommunicate with each other.
    2. Run iperf3 -s on the receiver and iperf3 -c x.x.x.x(the receriver IP) -i 1 -t 1000 on the sender to check the bandwidth speed.
      Figure 19. Upstream/Downstream Bandwidth of VPC vRouter With Unlimited QoS


    3. Set the VPC vRouter QoS to 50 MB/s and check the bandwidth speed again.
      Figure 20. Upstream/Downstream Bandwidth of VPC vRouter With Limited QoS


    4. As proved in step b and c, the VPC vRouter QoS takes effect and the VPC vRouter bandwidth reduces to the threshold level.

What to do next

Now, you have set a QoS for a VPC vRouter successfully.

Set QoS for Backup Job

About this task

This topic describes how to set a QoS for a backup job and check the backup job QoS.

Before you begin this practice, installed the latest h76c ZStack Cloud and deployed necessary resources.

You need a Backup Service License in addition to a base license.
Note: c72版 ZStack Cloud does not support Backup Service.
To set a QoS for a backup job, follow these steps:
  • Create a backup job.
  • Modify the backup job QoS.
  • Check the backup job QoS.

Procedure

  1. Create a backup job.
    On the main menu of ZStack Cloud, choose Platform O&M > Backup Management > Backup Job. On the Backup Job page, click VM/Volume > Create Backup Job. Then, the Create Backup Job page is displayed. On this page, you can set QoS for the backup job you are creating through following parameters:
    • Set QoS: Optional. You can set network QoS and disk QoS for the backup job.
      • Downstream Bandwidth: Set the maximum downstream bandwidth. Unit: Kbps, Mbps, and Gbps. Valid values: 8 Kbps to 30 Gbps. If you do not specify the downstream bandwidth, this bandwidth is unlimited.
      • Upstream Bandwidth: Set the maximum upstream bandwidth. Unit: Kbps, Mbps, and Gbps. Valid values: 8 Kbps to 30 Gbps. If you do not specify the upstream bandwidth, this bandwidth is unlimited.
      • Disk Read Speed: Set the maximum read speed. Unit: MB/s and GB/s. Valid values: 1MB/s to 100GB/s. If you do not specify the disk read speed, this speed is unlimited.
      • Disk Write Speed: Set the maximum write speed. Unit: MB/s and GB/s. Valid values: 1MB/s to 100GB/s. If you do not specify the disk write speed, this speed is unlimited.
      Note: We recommend that you set a QoS based on your physical network environments and the concurrent number of implemented backup jobs.
  2. Modify the backup job QoS

    On the details page of the backup job, you can click Edit QoS to modify the downstream/upstream bandwidth and disk read/write speed. The modification takes effect when the job automatically creates a back up for the next time.

    Figure 21. Modify Backup Job QoS


  3. Check the backup job QoS
    Assume that the network bandwidth is 500 Mbps in this practice. Prepare two same volumes, volume1 and volume2, to create backup jobs. Run iftop commands to check QoS of the backup jobs.
    1. Create backup job1 based on volume1. The QoS of backup job1 is unlimited. Use iftop to monitor the network bandwidth speed.
      Figure 22. Backup Job With Unlimited QoS


    2. Create backup job 2 based on volume 2. The QoS of backup job 2 is 40 Mbps. Use iftop to monitor the network bandwidth speed.
      Figure 23. Backup Job With Limited QoS


    3. As proved in step a and b, the QoS you set for backup job2 takes effect and the backup job bandwidth reduces to a threshold level. Choose Backup Management > Backup Service > Local Backup Data > Volume. Click the volume 1 and 2 respectively and enter corresponding back up details pages. On details pages, you can see the time consumptions of these 2 backup jobs.

What to do next

Now, you have set a QoS for a backup job. For more information, see Backup Service Tutorial.

Set QoS for V2V Conversion Host

About this task

This topic describes how to set a QoS for a V2V conversion host and check the setting.

Before you begin this practice, make sure that you have deployed a latest ZStack CloudPrivate Cloud.

Take over KVM to ZStack CloudPrivate Cloud.

To use Migration Service, install a Migration Service license in addition to the base license.

To set a QoS for a V2V conversion host, follow these steps:
  • Add a V2V conversion host.
  • Modify the QoS of the V2V conversion host.
  • Check the QoS of the V2V conversion host.

Procedure

  1. Add a V2V conversion host.
    On the main menu of ZStack Cloud, choose Platform O&M > Migration Service > V2V Conversion Host. On the V2V Conversion Host page, click Add V2V Conversion Host. Then, the Add V2V Conversion Host page is displayed. On this page, you can set a QoS for the V2V conversion host you are adding through following parameters:
    • Upstream Bandwidth: Optional. Set a maximum upstream bandwidth. This parameter limits the speed at which the V2V conversion host uploads data to the target primary storage. Units: Mbps and Gbps. Valid values: 1024 Mbps to 32 Gbps.
    • Downstream Bandwidth: Optional. Set a maximum downstream bandwidth. This parameter limits the speed at which the V2V conversion host downloads data from the target primary storage. Units: Mbps and Gbps. Valid values: 1024 Mbps to 32 Gbps.
  2. Modify the QoS of the V2V migration host.

    You can modify the QoS of the V2V migration host on its details page.

    Figure 24. Modify QoS of V2V Migration Host


  3. Check the QoS of the V2V conversion host.
    Assume that the network bandwidth is 500 Mbps in this practice. Use iftop commands to check the QoS of the V2V conversion host.
    1. Add a V2V conversion host to ZStack CloudPrivate Cloud. The QoS of the V2V conversion host is unlimited.
    2. Create a V2V job and set the QoS of the V2V conversion host to 100 Mbps. Run iftop -i ifb0 on the V2V conversion host to query the bandwidth speed.
      Figure 25. Network Bandwidth of V2V Conversion Host With Unlimited QoS


    3. As proved in the step a and b, the QoS you set takes effect and the network bandwidth reduces to the threshold level. You can see the time consumed by V2V jobs on the V2V Migration page.

What to do next

Now, you have set a QoS for a V2V jobs successfully. For more information, see V2V Migration Tutorial.
Network QoS & Disk QoS Tutorial | 5.5.30 | ZStack Cloud · ZCF | ZStack Resource Center