Bug Reference

CLOUDSTACK-6262

Branch

4.4, Master

Introduction

Network throttling is the process of controlling the network access and bandwidth usage based on certain rules. It controls the maximum bandwidth which can be allocated to VM. The benefit here is that you may have very noisy VMs on host that consume a lot of bandwidth, and they can be stepped down yet still given an adequate amount of connectivity.

Purpose

This is functional specification for Enabling Network throttling for VMs on Hyper-V

References

Document History

Author
Description
Date
Anshul GangwarIncorporating comments.03/27/2014
Rajesh BattalaInitial Revision 

Glossary

VM - virtual machine running on hypervisor

NIC - network interface controller which is attached to VM

Feature Specifications

Currently network rate parameter which is passed during deployment of VM is not honoured in Hyper-V. In this feature we will apply network rate parameter to maximum bandwidth allowed for VM. This network rate  parameter will be applied to NIC and controls the max data transfer date rate of the NIC and will apply to both ingress and egress traffic combined . By setting the maximum bandwidth allowed for VM, we are throttling the network appropriately.

Test Guidelines

Functional
  • The following table gives you an overview of how network rate is applied on different types of networks in CloudStack

    Networks
    Network Rate Is Taken from
    Guest network of Virtual Router
    Guest Network Offering
    Public network of Virtual Router
    Guest Network Offering
    Storage network of Secondary Storage VM
    System Network Offering
    Management network of Secondary Storage VM
    System Network Offering
    Storage network of Console Proxy VM
    System Network Offering
    Management network of Console Proxy VM
    System Network Offering
    Storage network of Virtual Router
    System Network Offering
    Management network of Virtual Router
    System Network Offering
    Public network of Secondary Storage VM
    System Network Offering
    Public network of Console Proxy VM
    System Network Offering
    Default network of a guest VM
    Compute Offering
    Additional networks of a guest VM
    Corresponding Network Offerings

    Verify whether rates are applied to VMs as mentioned in above table.For more details see network throtling .

  • to see whether the network rate gets applied to max bandwidth successfully, one can verify in settings by seeing the setting: VM -> settings--> network adapter --> bandwidth management --> maximum bandwidth in Hyper-V Manager.
  • verify whether the networks are throttled as mentioned in network throtling .

Support-ability Characteristics

Logs can be looked up at the following location

  • Management server logs for network rate which will limit the max bandwidth allowed. All the requests forwarded to the Hyper-V agent can also be seen here.
  • The Hyper-V agent logs can be seen in windows event viewer on the respective hosts. The logs can be filtered by source "CloudStack Hyper-V Agent".
  • Hyper-V specific logs can be viewed in the event viewer under "Application and Services Logs" >> Microsoft >> Windows >> "Hyper-V-VMMS".

Use cases

With this we can control the max bandwidth allocated for VM, which helps in controlling the bandwidth alloction to noisy VMs which otherwise may consume the whole bandwidth and degrades the performance

Architecture and Design description

  • In this feature we are starting to use the network rate parameter which is sent with StartCommand in VM specs to hyper-v agent
    • StartCommand is used to deploy the VM.
    • VM specs in StartCommand contains the NICs information.
      • NIC contains network rate parameter.
      • We were ignoring network rate parameter previously, now we are taking network rate parameter and applying it to NIC when we are creating NIC.

New Methods
  • SetBandWidthLimit(ulong limit, EthernetPortAllocationSettingData portPath) : this method applies the network rate to maximum bandwidth allowed for VM
New Management class 
  • ROOT.virtualization.v2.Msvm_EthernetSwitchPortBandwidthSettingData.cs : this class will allow us to manage the bandwidth settings of VM.

Web Services APIs

No new APIs are added for this feature. Existing APIs which will be used for this feature are

  • createNetworkOffering, one can specify the networkrate for network throttling
  • createServiceOffering, one can specify the networkrate for network throttling

To see how network throttling rate applies on VM see network throtling .

UI flow

No new UI screens are introduced by this feature. Also, no changes need to be made in UI for enabling network throttling for VMs on Hyper-V. The UI workflow looks as follows.

Specifying Network Rate

There are two places where one can specify the network rate for network throttling

  • One can specify network rate parameter  while creating service offering
  • One can specify network rate parameter while creating network offering

To see how network throttling rate applies on VM see network throtling .

IP Clearance

  No IP dependencies are introduced by this feature.

Appendix

Appendix A:

Appendix B:

  • No labels