Article ID: 124000, created on Dec 21, 2014, last review on May 12, 2016

  • Applies to:
  • Virtuozzo 6.0
  • Virtuozzo containers for Linux


It is often necessary to limit the amount of traffic the particular environment can use or guarantee some minimum traffic rate to an environment.

How can it be achieved with Virtuozzo or Virtuozzo сontainers?


Presently, only outgoing traffic is managed. Incoming traffic shaping is resource inefficient and implementation details are being checked in the internal request #PSBM-17545 if this can be supported in the future. This kind of traffic management is not yet implemented to avoid performance degradation and high resource consumption: if packets are delivered to the host server, it is better to pass them to the virtual environment.

To enable outgoing traffic shaping, define network classes as described in the documentation. By default, there is one network class defined: whole IP address space. You might need different classes and limits for locally accessible resources.

From the overall bandwidth of the physical interface, some rate can be reserved for the hardware node. This is achieved by setting totalrate to value lower than the interface's bandwidth. Since totalrate is defined on per-class basis and classes are mutually exclusive, the amount of reserved rate for the node will be calculated as sum of totalrate values extracted from bandwidth.

Every virtual environment can be configured to have certain rate from the configured totalrate, per every network class. If the environment should be limited to that rate and not able to consume more network speed than this value, it should have ratebound set to "yes".

All these parameters are described in the documentation.

Example of configuration

Let us assume that there is an interface eth0 connected to the 1GBit local network and with the external connection with 100MBit and with 10Mbit external traffic reserved for the node's needs. With this setup, there can be two network classes, one - local network, and another - external network.

  1. Configure network classes in /etc/sysconfig/vz-scripts/network_classes.

    2 ## replace this range with the proper one
  2. Configure network shaping settings in the global configuration file /etc/sysconfig/vz.

    BANDWIDTH="eth0:1000000" ## 1Gbit local connection
    TOTALRATE="eth0:1:90000 eth0:2:900000" ## 90Mbit for class 1, 900Mbit for class 2 to all VEs
    RATE="eth0:1:1000 eth0:2:50000" ## 1Mbit for class 1, 50Mbit for class 2 for a VE by default
    RATEBOUND="yes" ## set RATE as limit by default

    (Please note, "RATE" and "RATEBOUND" are applicable to containers only. Virtual machines should be configured explicitly.)

  3. Start network traffic shaping:

    ~# service vz shaperon
  4. Configure traffic shaping details for environments as described in the documentation.

Configuring in VA

Please follow the below mentioned document to configure traffic shaping in VA:

Search Words


traffic shaping incoming

Bad upload bandwidth


limit traffic

vz-start ERROR

traffic shaping

limit trafic

e8e50b42231236b82df27684e7ec0beb 2897d76d56d2010f4e3a28f864d69223 d02f9caf3e11b191a38179103495106f c62e8726973f80975db0531f1ed5c6a2 0dd5b9380c7d4884d77587f3eb0fa8ef

Email subscription for changes to this article
Save as PDF