[lxc-users] Limit container network bandwidth

Kupser, Johannes johannes at kupser.es
Fri Feb 28 09:26:23 UTC 2014


Hey there,

I have several containers behind the default lxc-bridge (lxcbr0). Now I
want to limit network bandwidth for containers.

I enabled net_cls cgroup and added a classid to the container config
(lxc.cgroup.net_cls.classid = 0x100001) to use traffic control to filter
the marked packages. And other containers got other classid, of course.

Now I'm not sure on which interface I have to setup my tc rules
(qdisc,class and filter) because want to share my bandwidth to all
containers. Meaning containers can use bandwidth from others if they don't
need their own network at the moment (plain borrowing). I thought it is
possible to set the tc rules on lxcbr0 because it holds the veth-devices of
the containers but I doesn't work.

I followed the instructions on
https://www.kernel.org/doc/Documentation/cgroups/net_cls.txt but I have no
iptables rules added.

I test my scenarios with simple wget command within the containers. The
containers net_cls cgroup classid is not filtered by tc because the limits
are not working.

Any pointers would be a great help.
Thank.

Johannes






-- 


Johannes Kupser

web: www.kupser.es
fon: 0171 - 5488955
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20140228/85425ae9/attachment.html>


More information about the lxc-users mailing list