[Tutorial] How to setup QoS on Open vSwitch

There are two ways to do that:

1. Interface Rate Limiting ( on Interface )
  • For instance:
         > sudo ovs-vsctl set Interface eth1 ingress_policing_rate=10000
         > sudo ovs-vsctl set Interface eth1 ingress_policing_burst=1000

 2. Port  QoS Policy ( on Port )
  • For instance:
         > sudo ovs-vsctl set port eth1 qos=@newqos \
             -- --id=@newqos create qos type=linux-htb \
             other-config:max-rate=200000000 queues=0=@q0,1=@q1 \
             -- --id=@q0 create queue \
             other-config:min-rate=100000000 \
             other-config:max-rate=100000000 \
              -- --id=@q1 create queue \
             other-config:min-rate=50000000 \
             other-config:max-rate=50000000
  • Qos can have more than 1 queue

Comments

Marco said…
Have you tested the point 1 - 1. Interface Rate Limiting ( on Interface )?

Because I have tested with the configuration equal to what you have and the rate limitation do not work.

Have you tested with netperf or iperf?

Regards,
Marco
Thank you for your question. Actually I didn't test this. But, my information is from Open vSwitch offical web site as the following URL:
http://openvswitch.org/support/config-cookbooks/qos-rate-limiting/
They indeed do the test with netperf and it indeed works.


Marco said…
Hello,

Thanks for the tip.

In point 2 in the command is really necessary after the "...type=linux-htb" the command "other-config:max-rate=200000000"?
What for the "other-config:max-rate=200000000" is used if the queues have there one "other-config:max-rate" defined?

Can you advise me?

Best Regards,
Marco
About point 2, it is related with Port QoS Policy. A port could be assigned more than one QoS policy. So it is the reason why my example has 2 queues with that port. You definitely can remove them once your QoS setting is fitted for your requirement. For more information in details, please refer to this URL:
http://workshop.netfilter.org/2010/wiki/images/archive/4/4f/20101019141223!Openvswitch.en.pdf
At page 22 ~ 26, you will see more explaination there.
lanny wan said…
hi danny..
did u try that QoS configuration?
now i'm trying to implement it onto my network within my tap interface, n i use ingress policing, but it failed,

n if i limiting using egress, it only worked for eth not for my tap.

if u suceed make it using those conf, can u explain me why my conf getting fail?
i've already asking this question on OVS mailing list, but still couldn't get the fit answer,,

thanx..
lanni
Hi lanny,
As I mentioned in early comment, I didn't test in real case. Sorry! Why I survey QoS is because I once wanted to add extension QoS function in Quantum OVS plug-in. But, I didn't do it.
I don't know your configuration. Could you let me see yours?

Popular posts from this blog

[Open vSwitch] How to get port statistics from interface in OVS

[Quagga] How to compile and install Quagga on Ubuntu 12.04

[JSON] How to use jansson lib to generate JSON data in C