[ovs-discuss] a suggestion to improve performance when adding lots of ports

ychen ychen103103 at 163.com
Tue Nov 25 09:36:31 UTC 2014


hi:
   I have found that when adding lots of ports, system consumes more and more time when ports number increasing.
  And the main time is consumed on encapsulation and decapsulation the JSON message between vsctl and ovsdb-server.
  when vsctl starts, it will first send monitor request to ovsdb-server, and then db-server send all the records with the related column to vsctl
  please notice the word "all records", so that when ports number gets larger, system will need more time to encap and decap the JSON message between vsctl and db-server.


  I suggest to slightly modify the RPC  method "Monitor" in RFC 7047. The main idea is only monitor specified records when add /del/set/get port.
  The original Monitor method is like that:
  Each <monitor-request> is an object with the following members:
"columns": [<column>*] optional
"select": <monitor-select> optional
The columns, if present, define the columns within the table to be
monitored. <monitor-select> is an object with the following members:
"initial": <boolean> optional
"insert": <boolean> optional
"delete": <boolean> optional

"modify": <boolean> optional
  And I want give this method a slight change:
<monitor-select> is an object with the following members:
"initial": <boolean> optional
"insert": <boolean> optional
"delete": <boolean> optional

"modify": <boolean> optional
"where": [<condition>*] optional
for example, when add or del a port p0, first we will send a monitor request like this:
method="monitor", params=["Open_vSwitch",null,{"Port":{"columns":["bridges","fake_bridge","interfaces","name","tag"],"select":{"where":[["name","==","p0"]]}},"Interface":{"columns":["name","ofport","type"],"select":{"where":[["name","==","p0"]]}},"Bridge":{"columns":["controller","fail_mode","name"],"select":{"where":[["name","==","br0"]]}},"Controller":{"columns":[]},"Open_vSwitch":{"columns":["bridges","cur_cfg"]}}]
then ovsdb-server should only reply with the specified record p0, so that we can save lots of time when monitoring. 
I have done a test with this method, with 4000 ports, the time consuming can be decreased from about 2800s to about 500s.








  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20141125/e2494e97/attachment-0002.html>


More information about the discuss mailing list