It seems that there are two way to limit the network usage of containers.
One is with net_cls and the other one is net_prio。The first one can be used
with "tc" to limit bandwidth while the second one manipulate the priority of
package sent from container. I've tried net_cls with tc by
set
# net classid 1:10
lxc.cgroup.net_cls.classid = 0x10010
in lxc config file and run tc.sh to setup tc queue discipline
# cat tc.sh
tc qdisc add dev virbr0 root handle 1: htb
tc class add dev virbr0 parent 1: classid 1:10 htb rate 1kbit ceil 2kbit
Note: The container use virbr0 created by libvirt as net interface, iptable is
configured to make it possible to access server running inside the container
from outside.
But in my test, network is not limited at all. What's wrong?
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users