[ovs-discuss] ovsdb-idl.run-msg many update msgs about br-ex and controller

顾兆伦 gu_zhaolun at 163.com
Mon Sep 11 08:27:45 UTC 2017


Hi all, sorry to bother you.

    When I use python/ovs, idl.run() always costs about 50 ms to execute, and it runs 50times, what is too long for me. When I check the msg(msg=self._sesson.recv()), I found this:




notification, method="update", params=

[

    null,

    {

        "Controller":{

            "12f645b2-8915-4e07-a36e-c0aa7b8def6f":{

                "new":{

                    "connection_mode":[

                        "set",

                        [

 

                        ]

                    ],

                    "controller_burst_limit":[

                        "set",

                        [

 

                        ]

                    ],

                    "controller_rate_limit":[

                        "set",

                        [

 

                        ]

                    ],

                    "enable_async_messages":[

                        "set",

                        [

 

                        ]

                    ],

                    "external_ids":[

                        "map",

                        [

 

                        ]

                    ],

                    "inactivity_probe":[

                        "set",

                        [

 

                        ]

                    ],

                    "is_connected":false,

                    "local_gateway":[

                        "set",

                        [

 

                        ]

                    ],

                    "local_ip":[

                        "set",

                        [

 

                        ]

                    ],

                    "local_netmask":[

                        "set",

                        [

 

                        ]

                    ],

                    "max_backoff":[

                        "set",

                        [

 

                        ]

                    ],

                    "other_config":[

                        "map",

                        [

 

                        ]

                    ],

                    "role":"other",

                    "status":[

                        "map",

                        [

                            [

                                "last_error",

                                "Connection refused"

                            ],

                            [

                                "sec_since_disconnect",

                                "52983"

                            ],

                            [

                                "state",

                                "BACKOFF"

                            ]

                        ]

                    ],

                    "target":"tcp:127.0.0.1:6640"

                },

                "old":{

                    "status":[

                        "map",

                        [

                            [

                                "last_error",

                                "Connection refused"

                            ],

                            [

                                "sec_since_disconnect",

                                "52978"

                            ],

                            [

                                "state",

                                "BACKOFF"

                            ]

                        ]

                    ]

                }

            },

            "2747af3f-5e13-4b61-9e65-de6c43565771":{

                "new":{

                    "connection_mode":[

                        "set",

                        [

 

                        ]

                    ],

                    "controller_burst_limit":[

                        "set",

                        [

 

                        ]

                    ],

                    "controller_rate_limit":[

                        "set",

                        [

 

                        ]

                    ],

                    "enable_async_messages":[

                        "set",

                        [

 

                        ]

                    ],

                    "external_ids":[

                        "map",

                        [

 

                        ]

                    ],

                    "inactivity_probe":[

                        "set",

                        [

 

                        ]

                    ],

                    "is_connected":false,

                    "local_gateway":[

                        "set",

                        [

 

                        ]

                    ],

                    "local_ip":[

                        "set",

                        [

 

                        ]

                    ],

                    "local_netmask":[

                        "set",

                        [

 

                        ]

                    ],

                    "max_backoff":[

                        "set",

                        [

 

                        ]

                    ],

                    "other_config":[

                        "map",

                        [

 

                        ]

                    ],

                    "role":"other",

                    "status":[

                        "map",

                        [

                            [

                                "last_error",

                                "Connection refused"

                            ],

                            [

                                "sec_since_connect",

                                "481307"

                            ],

                            [

                                "sec_since_disconnect",

                                "52975"

                            ],

                            [

                                "state",

                                "BACKOFF"

                            ]

                        ]

                    ],

                    "target":"tcp:127.0.0.1:6633"

                },

                "old":{

                    "status":[

                        "map",

                        [

                            [

                                "last_error",

                                "Connection refused"

                            ],

                            [

                                "sec_since_connect",

                                "481302"

                            ],

                            [

                                "sec_since_disconnect",

                                "52970"

                            ],

                            [

                                "state",

                                "BACKOFF"

                            ]

                        ]

                    ]

                }

            },

            "611f1621-c11e-431e-9ccf-c656ce27a8fb":{

                "new":{

                    "connection_mode":[

                        "set",

                        [

 

                        ]

                    ],

                    "controller_burst_limit":[

                        "set",

                        [

 

                        ]

                    ],

                    "controller_rate_limit":[

                        "set",

                        [

 

                        ]

                    ],

                    "enable_async_messages":[

                        "set",

                        [

 

                        ]

                    ],

                    "external_ids":[

                        "map",

                        [

 

                        ]

                    ],

                    "inactivity_probe":[

                        "set",

                        [

 

                        ]

                    ],

                    "is_connected":false,

                    "local_gateway":[

                        "set",

                        [

 

                        ]

                    ],

                    "local_ip":[

                        "set",

                        [

 

                        ]

                    ],

                    "local_netmask":[

                        "set",

                        [

 

                        ]

                    ],

                    "max_backoff":[

                        "set",

                        [

 

                        ]

                    ],

                    "other_config":[

                        "map",

                        [

 

                        ]

                    ],

                    "role":"other",

                    "status":[

                        "map",

                        [

                            [

                                "last_error",

                                "Connection refused"

                            ],

                            [

                                "sec_since_connect",

                                "481307"

                            ],

                            [

                                "sec_since_disconnect",

                                "52975"

                            ],

                            [

                                "state",

                                "BACKOFF"

                            ]

                        ]

                    ],

                    "target":"tcp:127.0.0.1:6633"

                },

                "old":{

                    "status":[

                        "map",

                        [

                            [

                                "last_error",

                                "Connection refused"

                            ],

                            [

                                "sec_since_connect",

                                "481302"

                            ],

                            [

                                "sec_since_disconnect",

                                "52970"

                            ],

                            [

                                "state",

                                "BACKOFF"

                            ]

                        ]

                    ]

                }

            },

            "cd5e3aaa-c34f-4e3b-90d0-d7918ccbe44c":{

                "new":{

                    "connection_mode":[

                        "set",

                        [

 

                        ]

                    ],

                    "controller_burst_limit":[

                        "set",

                        [

 

                        ]

                    ],

                    "controller_rate_limit":[

                        "set",

                        [

 

                        ]

                    ],

                    "enable_async_messages":[

                        "set",

                        [

 

                        ]

                    ],

                    "external_ids":[

                        "map",

                        [

 

                        ]

                    ],

                    "inactivity_probe":[

                        "set",

                        [

 

                        ]

                    ],

                    "is_connected":false,

                    "local_gateway":[

                        "set",

                        [

 

                        ]

                    ],

                    "local_ip":[

                        "set",

                        [

 

                        ]

                    ],

                    "local_netmask":[

                        "set",

                        [

 

                        ]

                    ],

                    "max_backoff":[

                        "set",

                        [

 

                        ]

                    ],

                    "other_config":[

                        "map",

                        [

 

                        ]

                    ],

                    "role":"other",

                    "status":[

                        "map",

                        [

                            [

                                "last_error",

                                "Connection refused"

                            ],

                            [

                                "sec_since_disconnect",

                                "52983"

                            ],

                            [

                                "state",

                                "BACKOFF"

                            ]

                        ]

                    ],

                    "target":"tcp:127.0.0.1:6640"

                },

                "old":{

                    "status":[

                        "map",

                        [

                            [

                                "last_error",

                                "Connection refused"

                            ],

                            [

                                "sec_since_disconnect",

                                "52978"

                            ],

                            [

                                "state",

                                "BACKOFF"

                            ]

                        ]

                    ]

                }

            }

        },

        "Interface":{

            "b8cc1681-336e-4594-b248-a2d580a08188":{

                "new":{

                    "admin_state":"up",

                    "bfd":[

                        "map",

                        [

 

                        ]

                    ],

                    "bfd_status":[

                        "map",

                        [

 

                        ]

                    ],

                    "cfm_fault":[

                        "set",

                        [

 

                        ]

                    ],

                    "cfm_fault_status":[

                        "set",

                        [

 

                        ]

                    ],

                    "cfm_flap_count":[

                        "set",

                        [

 

                        ]

                    ],

                    "cfm_health":[

                        "set",

                        [

 

                        ]

                    ],

                    "cfm_mpid":[

                        "set",

                        [

 

                        ]

                    ],

                    "cfm_remote_mpids":[

                        "set",

                        [

 

                        ]

                    ],

                    "cfm_remote_opstate":[

                        "set",

                        [

 

                        ]

                    ],

                    "duplex":[

                        "set",

                        [

 

                        ]

                    ],

                    "external_ids":[

                        "map",

                        [

 

                        ]

                    ],

                    "ifindex":35,

                    "ingress_policing_burst":0,

                    "ingress_policing_rate":0,

                    "lacp_current":[

                        "set",

                        [

 

                        ]

                    ],

                    "link_resets":2,

                    "link_speed":[

                        "set",

                        [

 

                        ]

                    ],

                    "link_state":"up",

                    "mac":[

                        "set",

                        [

 

                        ]

                    ],

                    "mac_in_use":"00:e0:ec:26:11:26",

                    "mtu":1500,

                    "name":"br-ex",

                    "ofport":65534,

                    "ofport_request":[

                        "set",

                        [

 

                        ]

                    ],

                    "options":[

                        "map",

                        [

 

                        ]

                    ],

                    "other_config":[

                        "map",

                        [

 

                        ]

                    ],

                    "statistics":[

                        "map",

                        [

                            [

                                "collisions",

                                0

                            ],

                            [

                                "rx_bytes",

                                58710822005

                            ],

                            [

                                "rx_crc_err",

                                0

                            ],

                            [

                                "rx_dropped",

                                0

                            ],

                            [

                                "rx_errors",

                                0

                            ],

                            [

                                "rx_frame_err",

                                0

                            ],

                            [

                                "rx_over_err",

                                0

                            ],

                            [

                                "rx_packets",

                                252640161

                            ],

                            [

                                "tx_bytes",

                                51285614482

                            ],

                            [

                                "tx_dropped",

                                0

                            ],

                            [

                                "tx_errors",

                                0

                            ],

                            [

                                "tx_packets",

                                271858552

                            ]

                        ]

                    ],

                    "status":[

                        "map",

                        [

                            [

                                "driver_name",

                                "openvswitch"

                            ]

                        ]

                    ],

                    "type":"internal"

                },

                "old":{

                    "statistics":[

                        "map",

                        [

                            [

                                "collisions",

                                0

                            ],

                            [

                                "rx_bytes",

                                58710655381

                            ],

                            [

                                "rx_crc_err",

                                0

                            ],

                            [

                                "rx_dropped",

                                0

                            ],

                            [

                                "rx_errors",

                                0

                            ],

                            [

                                "rx_frame_err",

                                0

                            ],

                            [

                                "rx_over_err",

                                0

                            ],

                            [

                                "rx_packets",

                                252639814

                            ],

                            [

                                "tx_bytes",

                                51285578043

                            ],

                            [

                                "tx_dropped",

                                0

                            ],

                            [

                                "tx_errors",

                                0

                            ],

                            [

                                "tx_packets",

                                271858232

                            ]

                        ]

                    ]

                }

            },

            "f613516b-26d1-4079-ab10-6f5f63acc46b":{

                "new":{

                    "admin_state":"up",

                    "bfd":[

                        "map",

                        [

 

                        ]

                    ],

                    "bfd_status":[

                        "map",

                        [

 

                        ]

                    ],

                    "cfm_fault":[

                        "set",

                        [

 

                        ]

                    ],

                    "cfm_fault_status":[

                        "set",

                        [

 

                        ]

                    ],

                    "cfm_flap_count":[

                        "set",

                        [

 

                        ]

                    ],

                    "cfm_health":[

                        "set",

                        [

 

                        ]

                    ],

                    "cfm_mpid":[

                        "set",

                        [

 

                        ]

                    ],

                    "cfm_remote_mpids":[

                        "set",

                        [

 

                        ]

                    ],

                    "cfm_remote_opstate":[

                        "set",

                        [

 

                        ]

                    ],

                    "duplex":"full",

                    "external_ids":[

                        "map",

                        [

 

                        ]

                    ],

                    "ifindex":2,

                    "ingress_policing_burst":0,

                    "ingress_policing_rate":0,

                    "lacp_current":[

                        "set",

                        [

 

                        ]

                    ],

                    "link_resets":2,

                    "link_speed":10000000000,

                    "link_state":"up",

                    "mac":[

                        "set",

                        [

 

                        ]

                    ],

                    "mac_in_use":"00:e0:ec:26:11:26",

                    "mtu":1500,

                    "name":"xgbe0",

                    "ofport":1,

                    "ofport_request":[

                        "set",

                        [

 

                        ]

                    ],

                    "options":[

                        "map",

                        [

 

                        ]

                    ],

                    "other_config":[

                        "map",

                        [

 

                        ]

                    ],

                    "statistics":[

                        "map",

                        [

                            [

                                "collisions",

                                0

                            ],

                            [

                                "rx_bytes",

                                51314052777

                            ],

                            [

                                "rx_crc_err",

                                0

                            ],

                            [

                                "rx_dropped",

                                0

                            ],

                            [

                                "rx_errors",

                                0

                            ],

                            [

                                "rx_frame_err",

                                0

                            ],

                            [

                                "rx_over_err",

                                0

                            ],

                            [

                                "rx_packets",

                                272075658

                            ],

                            [

                                "tx_bytes",

                                58713734927

                            ],

                            [

                                "tx_dropped",

                                0

                            ],

                            [

                                "tx_errors",

                                0

                            ],

                            [

                                "tx_packets",

                                252685876

                            ]

                        ]

                    ],

                    "status":[

                        "map",

                        [

                            [

                                "driver_name",

                                "ixgbe"

                            ],

                            [

                                "driver_version",

                                "3.15.1"

                            ],

                            [

                                "firmware_version",

                                "0x800004e0, 1.307.0"

                            ]

                        ]

                    ],

                    "type":""

                },

                "old":{

                    "statistics":[

                        "map",

                        [

                            [

                                "collisions",

                                0

                            ],

                            [

                                "rx_bytes",

                                51314016222

                            ],

                            [

                                "rx_crc_err",

                                0

                            ],

                            [

                                "rx_dropped",

                                0

                            ],

                            [

                                "rx_errors",

                                0

                            ],

                            [

                                "rx_frame_err",

                                0

                            ],

                            [

                                "rx_over_err",

                                0

                            ],

                            [

                                "rx_packets",

                                272075337

                            ],

                            [

                                "tx_bytes",

                                58713568303

                            ],

                            [

                                "tx_dropped",

                                0

                            ],

                            [

                                "tx_errors",

                                0

                            ],

                            [

                                "tx_packets",

                                252685529

                            ]

                        ]

                    ]

                }

            }

        }

    }

]

  I want to know why idl.run() recv so many update msgs about br-ex and controller, it’s because of ‘tx_packets’ changed? How to avoid this so I can take less time 

Time to execute run() method.







Thank you all.






--
顾兆伦,
浙江大学
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-discuss/attachments/20170911/967bb67f/attachment-0001.html>


More information about the discuss mailing list