Previous page

Next page

Locate page in Contents

Print this page

Configuring Network Bandwidth Management

The network bandwidth for outgoing traffic a virtual machine and Container receives is controlled by two parameters: RATE and RATEBOUND .

Note: Incoming traffic cannot be controlled in the current version of Parallels Server Bare Metal.

The RATE parameter specifies the guaranteed outgoing traffic rate that a virtual machine or Container receives. This rate can be specified differently for different network classes. Bandwidth values are specified in Kb/s. It is recommended to increase this value in 8 Kb/s chunks and to set it no lower than 8 Kb/s. The example below demonstrates how to set the RATE parameter for the MyVM virtual machine and Container 101 to 16 Kb/s for network class 1 on the eth0 network adapter:

# pctl set MyVM --rate 1:16

The VM has been successfully configured.

# pctl set 101 --rate eth0:1:16 --save

Saved parameters for Container 101

Note: For Containers, you can also configure the RATE parameter for different network adapters. For virtual machines, you can set this parameter for the default network adapter (usually eth0 ) only. The rates for all other network adapters can be configured in the /etc/vz/vz.conf global configuration file.

The RATEBOUND parameter specifies whether the network bandwidth available to virtual machine or Container for outgoing traffic is limited by the bandwidth specified in the RATE variable. By default, this parameter is turned off for all newly created virtual machines and Containers. That means that virtual machines and Containers are allowed to take free bandwidth from the TOTALRATE pool. You can turn the RATEBOUND parameter on by using the --ratebound option of the pctl set command, for example:

# pctl set MyVM --ratebound on

The VM has been successfully configured.

# pctl set 101 --ratebound yes --save

Saved parameters for Container 101

The actual network bandwidth available to virtual machines and Containers depends on the number of virtual machines and Containers and the total sum of the RATE values, and normally does not coincide with the bandwidth specified in their own RATE parameters. If the RATEBOUND parameter is turned on, the virtual machine or Container bandwidth is limited by the value of the RATE parameter.

If the the RATE and RATEBOUND parameters are not set for individual virtual machines and Containers, the values from the /etc/vz/vz.conf configuration file are taken. By default, Parallels Server Bare Metal does not set RATEBOUND , which corresponds to no , and RATE is set to eth0:1:8 .

The network bandwidth management in Parallels Server Bare Metal works in the following way. The bandwidth pool for a given network class (configurable through the TOTALRATE variable in the global configuration file) is divided among the virtual machines and Containers transmitting data proportionally to their RATE settings. If the total value of the RATE variables of all virtual machines and Containers transmitting data does not exceed the TOTALRATE value, each virtual machine or Container gets the bandwidth equal or greater than its RATE value (unless the RATEBOUND variable is enabled for this virtual machine or Container). If the total value of the RATE variables of all virtual machines and Containers transmitting data exceeds the TOTALRATE value, each virtual machine or Container may get less than its RATE value.

The example below illustrates the scenario when Containers 101 and 102 have RATEBOUND set to no , and the MyVM virtual machine has RATEBOUND set to yes . With the default TOTALRATE of 4096 Kb/s and RATE of 8 Kb/s, the bandwidth pool will be distributed according to the following table:

Container 101

Container 102

MyVM

Consumed bandwidth

transmits

idle

idle

Container 101: 4096 Kb/s

idle

idle

transmits

MyVM: 8 Kb/s

transmits

transmits

idle

Container 101: 2048 Kb/s
Container 102: 2048 Kb/s

transmits

idle

transmits

Container 101: 4032 Kb/s
MyVM: 8 Kb/s

transmits

transmits

transmits

Container 101: 2016 Kb/s
Container 102: 2016 Kb/s
Container 103: 8 Kb/s

Once you configure the bandwidth settings, activate your changes by running the following command:

# /etc/init.d/vz shaperrestart

Stopping shaping: Ok

Starting shaping: Ok

Set shaping on running Container: Ok

This command clears off all existing shaping settings and sets them again using the configuration files of running virtual machines and Containers.