QoS: neutron bandwidth limit method

asked 2017-08-17 04:44:21 -0500

garyphone gravatar image

updated 2017-08-22 14:54:49 -0500

rbowen gravatar image

now I am learning the neutron QoS service in the OpenStack. Here is a rule namely "bandwidth limit". With the user guide of OpenStack Documentation, I can limit the bandwidth of the network and after using by Iperf, I have verified that the limit of bandwidth is working.

I guess I used the Linuxbridge configuration instead of OpenVswitch configuration.

Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
[  4] local port 5001 connected with port
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0- 6.5 sec  1.25 MBytes  1.62 Mbits/sec

Now I am confused what is the method in neutron that could limit the bandwidth of the network or port. By checking the source codes I have not found the method of the bandwidth limit.

Is anybody who knows the method in neutron? And which parts play the important role in limiting the bandwidth?

I have checked the traffic control in linux, the path is neutron/agent/linux/tc_lib.py. I am not sure, if it is immediately available after changing the code in tc_lib.py.

Thanks for your help:), I am glad to hear from your answer.

edit retag flag offensive close merge delete


In Pike, according to http://git.openstack.org/cgit/opensta..., methods set_filters_bw_limit in tc_lib for egress, set_tbf_bw_limit for ingress.

Bernd Bausch gravatar imageBernd Bausch ( 2017-08-17 18:14:00 -0500 )edit

You might find https://docs.openstack.org/neutron/la... useful as well.

By the way, after changing the code, you need to restart the agent I would think.

Bernd Bausch gravatar imageBernd Bausch ( 2017-08-17 18:17:48 -0500 )edit

@Bernd Bausch, thanks for your reply. I believe it is reasonable. But I am still confused, what if I wanna to cause a packet loss in neutron, how can I change the code or which part of codes should I change? I would like to simulate a packet loss in this situation..

garyphone gravatar imagegaryphone ( 2017-08-21 01:37:51 -0500 )edit

Sorry, I don't know the Neutron code at that level. I suggest the openstack-dev mailing list for such questions, or the Neutron IRC channel.

Bernd Bausch gravatar imageBernd Bausch ( 2017-08-21 09:07:42 -0500 )edit