26.7. Limit network bandwidth for a guest

26.7. Limit network bandwidth for a guest

In some environments it may be required to limit the network bandwidth available to certain guests. This can be used to implement basic Quality of Service on a host running multiple virtual machines. By default the virtual machine will be able to use any bandwidth setting available on your physical network card supports. The physical network card must be mapped to one of virtual machine's virtual network interfaces. In Red Hat Virtualization the “rate” parameter part of the VIF entries can be used to achieve the goal of throttling certain virtual machines.

This list covers the variables


The rate= option can be added to the VIF= entry in a virtual machine configuration file to limit a virtual machine's network bandwidth or to specify a specific granularity of credits during a specified time window.

time window

The time window is optional to the rate= option:

The default time window is 50ms.

A smaller time window will provide less burst transmission, however, the replenishment rate and latency will increase.

The default 50ms time window is a good balance between latency and throughput and in most cases will not require changing.

Examples of rate parameter values and uses.


Limit the outgoing network traffic from the guest to 10MB/s.


Limit the outgoing network traffic from the guest to 250KB/s.


Limit bandwidth to 10MB/s and provide the guest with a 50KB chunk every 50ms.

In the virtual machine configuration a sample VIF entry would look like the following:

vif = [ 'rate=10MB/s , mac=00:16:3e:7a:55:1c, bridge=xenbr1']

This rate entry would limit the virtual machine's interface to 10MB/s for outgoing traffic

Note: This documentation is provided {and copyrighted} by Red Hat®, Inc. and is released via the Open Publication License. The copyright holder has added the further requirement that Distribution of substantively modified versions of this document is prohibited without the explicit permission of the copyright holder. The CentOS project redistributes these original works (in their unmodified form) as a reference for CentOS-5 because CentOS-5 is built from publicly available, open source SRPMS. The documentation is unmodified to be compliant with upstream distribution policy. Neither CentOS-5 nor the CentOS Project are in any way affiliated with or sponsored by Red Hat®, Inc.