Hello,<br><br>As mentioned in our previous email, we were having issues getting bandwidth limitation working on cgroup ( with net_cls ) and tc. We've been running various tests and scenarios but found no way to enable proper limitation. Throughout our testing we've created a virtual machine running a 2.6.35 kernel where the limitation was indeed working.<br>
<br>We've browsed recent commits in the Linux-2.6 kernel source code and discovered that ever since version 2.6.35 (actually ever since this commit[1] was integrated), there is a change in getting the packet classid - the classid is stored and read as a member of a struct sock. As this is also used by LXC, it means that ever since 2.6.35, bandwidth limitation using tc is working for cgroups.<br>
<br>In order to prove this, we've compiled the latest 2.6.34 and 2.6.35 kernels (2.6.34.8 and 2.6.35.11). We've used tc, cgroup (net_cls) and iperf to test this.<br><br>On the latter version ( 2.6.35.11 ) the limitation is working accordingly, while on the former ( 2.6.34.8 ) the limitation is not working at all. We believe the above mentioned commit[1] is responsible for solving this issue and post-2.6.35 kernels should have no problems using cgroup-based bandwidth limitation (for example, within LXC).<br>
<br>We were thinking whether it would be a good idea to integrate an option for bandwidth limitation into an LXC container configuration file (such as lxc.network.bwlimit). This would allow a rapid setup of an LXC container and network limitation. This could, of course, be set up using tc (it would take a bit more effort, though). What do you think?<br>
<br>Thank you,<br>Ana & Irina.<br><br>[1] <a href="http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f845172531fb7410c7fb7780b1a6e51ee6df7d52">http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f845172531fb7410c7fb7780b1a6e51ee6df7d52</a><br>
<br>