[lxc-users] Fwd: Linux container network bandwidth
Nguyễn Thành Long
longnt at viegrid.com
Wed Jul 9 15:00:01 UTC 2014
Hi Divya,
I also have had a similar problem and stuck on it till now. I didn't use 1)
cos I used an unprivileged container. But I think your problem is *0x1001. *Try
replacing with *0x00100001*. ( = 10:1)
The format for net_cls.classid is 0xAAAABBBB; AAAA is the major handle
number and BBBB is the minor handle number.
*http://serverfault.com/questions/435103/lxc-bandwidth-control-using-tc
<http://serverfault.com/questions/435103/lxc-bandwidth-control-using-tc>*
Hope this helps.
On Fri, Jul 4, 2014 at 4:56 PM, Divya Vyas <edivya.vyas at gmail.com> wrote:
> Hi All,
>
> I am running multiple containers and I want to limit the network
> bandwidth.
> But I am not getting the desired output. Here is my method:
>
>
> 1) echo 0x1001 > /sys/fs/cgroup/lxc/<containerA>/net_cls.classid
>
>
>
> 2) tc qdisc add dev br0 root handle 10: htb
>
>
> 3) tc class add dev br0 parent 10: classid 10:1 htb rate 40mbit
>
>
> 4) tc filter add dev br0 parent 10: protocol ip prio 10 handle 1: cgroup
>
>
> 5) Used iperf to test the network bandwidth but not showing the desired output.
>
>
> I tried adding class to eth0 instead of br0 also but no change .
>
>
>
> Is anybody tried this kind of feature? I am not sure whether my testing procedure is wrong .
>
>
> Thanks,
>
> Divya
>
>
>
>
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20140709/8398014f/attachment.html>
More information about the lxc-users
mailing list