The optional RATE
parameter allows you to guarantee virtual machines and containers outgoing bandwidth to destinations in a specific network class on a specific Ethernet device. The guaranteed bandwidth is not a limit (unless the RATEBOUND
parameter is also set to on
, see below). A virtual machine or container can additionally obtain unused bandwidth from the bandwidth pool defined by TOTALRATE
.
You can set the guaranteed bandwidth in two ways:
-
For all virtual machines and containers on the host by setting
RATE
in the global configuration file/etc/vz/vz.conf
.The parameter is set as
<NIC>:<network_class>:<bandwidth_in_Kbps>
. For example, to guarantee all virtual machines and containers on the host the bandwidth of at least 8 Kbps for outgoing traffic in network class 1 on the Ethernet deviceenp0s5
, set theRATE
parameter toenp0s5:1:8
. -
For specific virtual machines or containers by means of the
prlctl set --rate
command.For example, to guarantee the container
MyCT
the bandwidth of at least 16 Kbps for outgoing traffic in network class 1, run# prlctl set MyCT --rate 1:16
This command sets the bandwidth for the default network adapter only. If you need to set bandwidth for other network adapters, set
RATE
in/etc/vz/vz.conf
.
Note
Note: It is recommended to increase RATE
value in 8 Kbps increments and set it to at least 8 Kbps.
The optional RATEBOUND
parameter specifies whether the network bandwidth guaranteed by RATE
is also a limit. By default, this feature is disabled for all newly created virtual machines and containers so they may additionally obtain unused bandwidth from the pool set by TOTALRATE
.
You can limit bandwidth of virtual machines and containers to the guaranteed value as follows:
-
For all virtual machines and containers on the host by setting
RATEBOUND
in the global configuration file/etc/vz/vz.conf
(omitted by default). -
For specific virtual machines or containers by means of the
prlctl set --ratebound
command. For example:# prlctl set MyCT --ratebound yes
If set, values of RATE
and RATEBOUND
provided for specific virtual machines and containers are chosen over global values in /etc/vz/vz.conf
.