Using tc tbf on veth to limit ingress bandwidth works, but I don't know the detail

心已入冬 提交于 2019-12-12 17:53:14

问题


I found the Docker container's veth on the host, and used the following command to limit the ingress bandwidth of the container.

tc qdisc add dev veth root tbf rate 200mbit latency 50ms burst 800000

It works. However, I have another container, both of them are having heavy ingress traffic. My NIC's capacity is 1000m. As I understand, the ingress traffic goes to docker0 bridge first, and then goes into veth then leaves through the peer inside the container(net namespace).

I assume there will be two 500mbps go through each veths(which is the case when not using tc), one of them shrinks to 200mbit due to tbf. I tested it to validate my assumption, but there is one 800mbps traffic and one 200 mbps traffic. I thought the tbf only works after the traffic hits the veth, but apparently I'm wrong. Which part leads to this result?

来源:https://stackoverflow.com/questions/38369626/using-tc-tbf-on-veth-to-limit-ingress-bandwidth-works-but-i-dont-know-the-deta

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!