Re: [lxc-devel] limit the netwok traffic of container from the host

2013-07-02 Thread lsmushroom
yes , we do not need to add restrictions on both end.The peer option will only replace the target device specified by the key word "dev" with its peer end. For example , the veth pair name is veth-vps1 , and the peer end is eth0 : tc qdisc add dev veth-vps1 root tbf rate 0.05mbit burst 5kb latency

Re: [lxc-devel] limit the netwok traffic of container from the host

2013-07-02 Thread Gao feng
On 07/01/2013 04:04 PM, lsmushroom wrote: > Sorry for the late response. For your question , you could not limit the > network traffic in that way. Because TC will only limit the traffic send out > from the target device . And for the device of > veth type , the device on the host end will “send

Re: [lxc-devel] limit the netwok traffic of container from the host

2013-07-02 Thread Serge Hallyn
Quoting lsmushroom (lsmushr...@126.com): > Sorry, I really get confused. Can you show me your testing procedure ? > Below is my testing result , the veth pair name is veth-vps1: > > > 1) Add qdisc on veth-vps1 > tc qdisc add dev veth-vps1 root tbf rate 0.05mbit burst 5kb latency 70ms > peakrate

Re: [lxc-devel] limit the netwok traffic of container from the host

2013-07-02 Thread lsmushroom
Sorry, I really get confused. Can you show me your testing procedure ? Below is my testing result , the veth pair name is veth-vps1: 1) Add qdisc on veth-vps1 tc qdisc add dev veth-vps1 root tbf rate 0.05mbit burst 5kb latency 70ms peakrate 1mbit minburst 1540 2) Send packet from the containe

Re: [lxc-devel] limit the netwok traffic of container from the host

2013-07-01 Thread Serge Hallyn
Quoting lsmushroom (lsmushr...@126.com): > Sorry for the late response. For your question , you could not limit > the network traffic in that way. Because TC will only limit the But it worked for me... Are you saying it will limit only traffic to, but not from, the container? > traffic send out

Re: [lxc-devel] limit the netwok traffic of container from the host

2013-07-01 Thread lsmushroom
Sorry for the late response. For your question , you could not limit the network traffic in that way. Because TC will only limit the traffic send out from the target device . And for the device of veth type , the device on the host end will “send out” the traffic to the container , and it will

Re: [lxc-devel] limit the netwok traffic of container from the host

2013-06-14 Thread Serge Hallyn
Quoting lsmushroom (lsmushr...@126.com): > Hi All, > Recently , we have been trying to find out a suitable way to > limit network traffic generated from the process running in the > container. The network type we used for our container is veth. > And we have tried TC combi

Re: [lxc-devel] limit the netwok traffic of container from the host

2013-06-14 Thread Serge Hallyn
Quoting lsmushroom (lsmushr...@126.com): > Hi All, > Recently , we have been trying to find out a suitable way to limit > network traffic generated from the process running in the container. The > network type we used for our container is veth. And we have tried TC > combined with cgroup