cloudstack-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Lee Green <>
Subject Re: Compute Offering - Network Rate
Date Thu, 13 Aug 2020 19:59:02 GMT
On 8/13/2020 10:22 AM, Hean Seng wrote:
> Hi
> Cloudstack 4.14 ,  Advance Network with GiuestNetwork have Public IP
> Create a compute offering with 10Mbps, but vm created stil able to burst to
> 200Mps
> Any one know how to solve this

The virtualization hypervisor is responsible for enforcing network 
limits. Which virtualization hypervisor are you using? Xen? KVM? VMware?

For KVM hosts, libvirt has the capability to throttle bandwidth. It has 
three knobs for inbound and outbound bandwidth -- average bandwidth, 
peak bandwidth, and burst number of bytes. To see the XML being 
generated for your virtual machine, turn on debugging on the agent on 
one of your hostsĀ  in /etc/cloudstack/agent/log4j-cloud.xml (change all 
INFO to DEBUG then restart the agent), then start the instance on that 
specific host. Then look for the XML in the log file in 
/var/log/cloudstack/agent/agent.log which should have a segment in it 
like this for the network interface: [note -- all file locations are for 
CentOS 7]

   *<bandwidth> <inbound average='1000' peak='5000' burst='5120'/> 
<outbound average='128' peak='256' burst='256'/> </bandwidth> ... *

For information on what that means:

Hmm, yeah, just checked the source.

if ((s_libvirtVersion >= 9004) && (_networkRateKBps > 0)) {// supported from
libvirt 0.9.4 netBuilder.append("<bandwidth>\n");
     netBuilder.append("<inbound average='" +_networkRateKBps +"' peak='" +_networkRateKBps
     netBuilder.append("<outbound average='" +_networkRateKBps +"' peak='" +_networkRateKBps

According to the source code, average and peak for both inbound and 
outbound are set to the max bandwidth in the offering, while 'burst' is 
not defined. Note the limitation documented in the above libvirt 
document: the 'peak' is ignored in the outbound setting, because of 
Linux OS network layer limitations. Cloudstack properly produces the 
tag, but the KVM hypervisor ignores it. If the hypervisor ever actually 
respects the limit Cloudstack is sending it the right data, but 
Cloudstack can't force the hypervisor to do something it can't currently do.

In other words, the behavior you're seeing appears to be a result of 
limitations of KVM on Linux if that's the hypervisor you're using. 
Apparently only the 'average' is respected for outbound data traffic, 
meaning you'll be able to burst on outbound traffic and it'll be 
throttled only once the average exceeds the limit.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message