...
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
| | |
|---|
| Anshul Gangwar | Incorporating comments. | 03/27/2014 |
| Rajesh Battala | Initial Revision | |
Glossary
VM - virtual machine running on hypervisor
NIC - network interface controller which is attached to VM
Feature Specifications
In this feature we are starting to use the network rate parameter which is sent with StartCommand.StartCommand is used to deploy the VM.Network rate parameter is Currently network rate parameter which is passed during deployment of VM is not honored honoured in Hyper-V. With this we will apply that parameter to maximum bandwidth allowed for VM. This 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 network rate is applied as mentioned in network throtling .
- to see whether the network rate gets applied to max bandwidth successfully, one can verify in settings by seeing the setting: One can see whether settings got applied successfully by verifying the VM -> settings--> network adapter --> bandwidth management --> maximum bandwidth in Hyper-V Manager.To see how network throttling rate applies on VM see network throtling
- 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
This requires only Hyper-V Agent Side Changes.
One more Management Class named - In this feature we are starting to use the network rate parameter which is sent with StartCommand.
- StartCommand is used to deploy the VM.
- StartCommand contains the NICs information.
- NIC contains network rate parameter.
- We were ignoring network rate parameter previously, now we are talking 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
will be added . This - : 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: