Search code examples
centoscontainersiptablesbandwidthopenvz

Limit network bandwith per container with OpenVZ


I want to limit network usage per container (e.g. upload and download thresholds). Can I do that via configuration or via vzctl somehow to set constraints on sent/received traffic?

I've found documentation on traffic shaping but there is no prctl utility installed on my system. Is there a way to install it manually on Centos (Linux version 2.6.32-042stab140.4 (kbuild-rh6-x64) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-18) (GCC) )) or what's the right method of setting such a limits?


Solution

  • Ok, so I've found this solution based on tc utility which does the job.