Article ID: 117355, created on Sep 18, 2013, last review on May 11, 2014

  • Applies to:
  • Operations Automation
  • Panels
  • Virtuozzo
  • Virtuozzo containers for Linux
  • Virtuozzo hypervisor

Symptoms

Containers experience network connectivity problems:

  • Packets are dropped when running.

    ping <CT_IP_Address>
    
  • There is high latency when trying to reach the container.

Cause

Traffic shaping is incorrectly configured.

Resolution

  1. Check whether traffic shaping for the virtual environments is enabled on the node:

    [root@cs09 ~]# egrep 'RATE|TRAF|BOUND' /etc/sysconfig/vz
    TRAFFIC_SHAPING="yes"
    TOTALRATE="*:1:20000"
    RATE="*:1:8"
    
    
    [root@eq010212 ~]# egrep 'RATE|TRAF|BOUND' /etc/sysconfig/vz 
    TRAFFIC_SHAPING=yes 
    TOTALRATE="bond0.2620:1:102400"
    RATE="bond0.2620:1:8"
    

    The RATE parameter specifies the guaranteed outgoing traffic rate that a virtual machine or container receives.

    The RATEBOUND parameter specifies whether the network bandwidth available to a virtual machine or container for outgoing traffic is limited by the bandwidth specified in the RATE variable.

    (In the above examples, the default rate is 8kbit/s.)

  2. Shaping can be enabled or disabled for the container specifically:

    [root@eq010212 ~]# grep -i rate /etc/vz/conf/*.conf
    /etc/vz/conf/101.conf:#RATE="eth0:1:1024 "
    /etc/vz/conf/101.conf:RATEBOUND="no"
    /etc/vz/conf/133.conf:RATEBOUND="yes"
    /etc/vz/conf/133.conf:RATE="eth0:1:102400 "
    /etc/vz/conf/147.conf:RATE="eth0:1:1024 "
    /etc/vz/conf/147.conf:RATEBOUND="no"
    /etc/vz/conf/151.conf:RATEBOUND="yes"
    /etc/vz/conf/151.conf:RATE="eth0:1:10240 "
    /etc/vz/conf/156.conf:RATEBOUND="yes"
    /etc/vz/conf/156.conf:RATE="eth0:1:102400 "
    
  3. Please make sure that the device specified in the container configuration is the same as in the "TOTALRATE" parameter (if "TOTALRATE" includes a particular device.)

    In the example from step 2., if the "TOTALRATE" parameter is "bond0.2620:1:102400" and not "*:1:8", traffic shaping will not work correctly and trying to set the rate manually with "eth0" specified will result in an error message:

    # vzctl set CTID --rate eth0:1:102400
    Invalid rate: Device could not be found in TOTALRATE
    
  4. To check whether traffic shaping is in effect, execute the following:

    [root@eq010212 ~]# tc class list dev bond0.2620
    class cbq 1: root rate 102400Kbit (bounded,isolated) prio no-transmit
    class cbq 1:2 parent 1: leaf 2: rate 102400Kbit (bounded) prio 1
    class cbq 2: root rate 102400Kbit (bounded,isolated) prio no-transmit
    class cbq 2:65 parent 2: rate 8000bit prio 1
    class cbq 2:af parent 2: rate 10240Kbit (bounded) prio 1
    class cbq 2:85 parent 2: rate 102400Kbit (bounded) prio 1
    class cbq 2:d8 parent 2: rate 1024Kbit prio 1
    class cbq 2:9c parent 2: rate 102400Kbit (bounded) prio 1
    class cbq 2:ab7 parent 2: rate 10240Kbit prio 1
    class cbq 2:bc parent 2: rate 10240Kbit (bounded) prio 1
    class cbq 2:b2 parent 2: rate 102400Kbit (bounded) prio 1
    class cbq 2:93 parent 2: rate 1024Kbit prio 1
    class cbq 2:b6 parent 2: rate 1024Kbit prio 1
    class cbq 2:97 parent 2: rate 10240Kbit (bounded) prio 1
    class cbq 2:b5 parent 2: rate 1024Kbit prio 1
    

    In this output, container IDs are represented in HEX format, e.g., 65 = 101, AF = 175, and so on.

  5. To confirm whether traffic shaping is causing network problems, it can be temporarily turned off:

    # service vz shaperoff
    

    To turn it back on, execute the following:

    # service vz shaperon
    

Search Words

container is unreachable

connectivity problems

dropped packets

latency

slow ping

vzbackup shutting down POA networking

vzbackup killing POA networking

traffic shaping

vps slowness

a26b38f94253cdfbf1028d72cf3a498b 2897d76d56d2010f4e3a28f864d69223 d02f9caf3e11b191a38179103495106f e8e50b42231236b82df27684e7ec0beb 0dd5b9380c7d4884d77587f3eb0fa8ef 5356b422f65bdad1c3e9edca5d74a1ae caea8340e2d186a540518d08602aa065 614fd0b754f34d5efe9627f2057b8642 56797cefb1efc9130f7c48a7d1db0f0c

Email subscription for changes to this article
Save as PDF