I wanted to know whether ovs community have any suggestions to resolve this problem. now this problem also appear on openstack, the error log "Unable to add port tapcfca4a52-37 to OVS bridge br-int" appeared when there is nearly 1000 ports on one compute node. but with command "add-port --timeout=50" the phenomenon disappeared.
At 2014-12-05 10:08:56, "ychen" <ychen103...@163.com> wrote: hi, This a patch for performance optimization when adding lots of ports. The patch is based on version 2.3.0, and I have run all the testsuites. The main optimize points are : 1) monitor some special records instead of monitor all the records 2) remove column "ports" in table "Bridge", replaced with adding "bridges" in table "Port" At 2014-11-25 23:40:09, "Ben Pfaff" <b...@nicira.com> wrote: >On Tue, Nov 25, 2014 at 05:36:31PM +0800, ychen wrote: >> 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. > >Sounds great, please submit patches when you have them ready.
_______________________________________________ discuss mailing list discuss@openvswitch.org http://openvswitch.org/mailman/listinfo/discuss