From patchwork Mon Mar 16 11:10:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Numan Siddique X-Patchwork-Id: 1255399 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ovn.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48gtsN3T4lz9sPJ for ; Mon, 16 Mar 2020 22:11:20 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id C9C2F87BB4; Mon, 16 Mar 2020 11:11:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rRh0MO5K_hMH; Mon, 16 Mar 2020 11:11:18 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by fraxinus.osuosl.org (Postfix) with ESMTP id 1DD3F87A64; Mon, 16 Mar 2020 11:11:18 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 08676C18DA; Mon, 16 Mar 2020 11:11:18 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 135CDC013E for ; Mon, 16 Mar 2020 11:11:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 0169F896C8 for ; Mon, 16 Mar 2020 11:11:17 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SShyvC8bcxC5 for ; Mon, 16 Mar 2020 11:11:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [217.70.178.231]) by hemlock.osuosl.org (Postfix) with ESMTPS id 76700895FC for ; Mon, 16 Mar 2020 11:11:15 +0000 (UTC) Received: from nummac.local (unknown [27.7.184.93]) (Authenticated sender: numans@ovn.org) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 3078510000B; Mon, 16 Mar 2020 11:10:46 +0000 (UTC) From: numans@ovn.org To: dev@openvswitch.org Date: Mon, 16 Mar 2020 16:40:34 +0530 Message-Id: <20200316111034.1686721-1-numans@ovn.org> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Subject: [ovs-dev] [PATCH ovn 0/6] Incremental processing improvements. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" From: Numan Siddique (Removed the RFC tag and Submitting these patches as formal patches now) This patch series tries to handle port binding, datapath binding and ovs interface changes incrementally. Below are the results of some testing I did with ovn-fake-multinode setup Test setup ------ 1. ovn-central fake node running OVN dbs and 2 compute nodes running ovn-controller. 2. Before running the tests, used an existing OVN db with the below resources No of logical switches - 53 No of logical ports - 1256 No of logical routers - 9 No of logical router ports - 56 No of port groups - 152 No of logical flows - 45447 Port bindings on compute-1 - 19 Port bindings on compute-2 - 18 No of OF flows on compute-1 - 84996 No of OF flows on compute-2 - 84901 3. The test does the following - Creates 2 logical switches (one for each compute node) and connect to a logical router for each compute node. - 100 logical ports are created (50 per lswitch), a simple ACL is added and the address set is created for each port. - Each port is bound on the respective compute node and the test pings the IP of the port (from another port belonging to the same lswitch created earlier). Below are the results with OVN master +----------------------------------------------------------------------------------------------------------+ | Response Times (sec) | +----------------------------------+--------+--------+--------+--------+--------+--------+---------+-------+ | action | min | median | 90%ile | 95%ile | max | avg | success | count | +----------------------------------+--------+--------+--------+--------+--------+--------+---------+-------+ | ovn.create_or_update_address_set | 0.484 | 0.507 | 0.526 | 0.537 | 0.547 | 0.51 | 100.0% | 100 | | ovn.create_port_acls | 0.948 | 1.014 | 1.05 | 1.06 | 1.089 | 1.016 | 100.0% | 100 | | ovn_network.bind_port | 1.244 | 1.294 | 1.333 | 1.346 | 1.397 | 1.301 | 100.0% | 100 | | ovn.bind_ovs_vm | 0.379 | 0.432 | 0.463 | 0.469 | 0.472 | 0.434 | 100.0% | 100 | | ovn.bind_internal_vm | 0.824 | 0.861 | 0.897 | 0.906 | 0.941 | 0.868 | 100.0% | 100 | | ovn_network.wait_port_ping | 7.153 | 7.183 | 7.214 | 7.22 | 7.237 | 7.185 | 100.0% | 100 | | total | 10.373 | 10.479 | 10.544 | 10.551 | 10.581 | 10.483 | 100.0% | 100 | +----------------------------------+--------+--------+--------+--------+--------+--------+---------+-------+ Load duration: 1048.8911039829254 Full duration: 1050.4055325984955 Below are the results with these patches +-------------------------------------------------------------------------------------------------------+ | Response Times (sec) | +----------------------------------+-------+--------+--------+--------+-------+-------+---------+-------+ | action | min | median | 90%ile | 95%ile | max | avg | success | count | +----------------------------------+-------+--------+--------+--------+-------+-------+---------+-------+ | ovn.create_or_update_address_set | 0.479 | 0.492 | 0.513 | 0.52 | 0.531 | 0.495 | 100.0% | 100 | | ovn.create_port_acls | 0.946 | 0.964 | 0.998 | 1.001 | 1.041 | 0.969 | 100.0% | 100 | | ovn_network.bind_port | 1.22 | 1.297 | 1.342 | 1.36 | 1.402 | 1.298 | 100.0% | 100 | | ovn.bind_ovs_vm | 0.373 | 0.418 | 0.436 | 0.455 | 0.472 | 0.42 | 100.0% | 100 | | ovn.bind_internal_vm | 0.818 | 0.88 | 0.911 | 0.93 | 0.982 | 0.878 | 100.0% | 100 | | ovn_network.wait_port_ping | 3.812 | 3.854 | 3.906 | 3.934 | 4.015 | 3.861 | 100.0% | 100 | | total | 6.977 | 7.165 | 7.277 | 7.308 | 7.401 | 7.176 | 100.0% | 100 | +----------------------------------+-------+--------+--------+--------+-------+-------+---------+-------+ Load duration: 718.401807308197 Full duration: 719.8932237625122 Testing the same with fresh OVN dbs didn't show any improvements in the timings. RFC v2 -> v1 --------- * Fixed the 2 failing test cases. * Updated the commit messages. RFC v1 -> RFC v2 --------- * Added 2 new patches * Patch 5 (ofctrl_check_and_add_flow) was submitted earlier too and the previous discussion is here - https://patchwork.ozlabs.org/patch/1202417/ * Patch 6 handles I-P for ct_zone and OVS interface changes in flow_output_run stage. Numan Siddique (6): Refactor binding_run()to take two context argument - binding_ctx_in and binding_ctx_out. ovn-controller: Refactor binding.c ovn-controller: I-P for port binding in runtime_data stage ovn-controller: I-P for datapath binding ofctrl_check_and_add_flow: Replace the actions of an existing flow if actions have changed. ovn-controller: I-P for ct zone and OV Numan Siddique (6): Refactor binding_run()to take two context argument - binding_ctx_in and binding_ctx_out. ovn-controller: Store the local port bindings in the runtime data I-P state. ovn-controller: I-P for SB port binding and OVS interface in runtime_data. ovn-controller: I-P for datapath binding ofctrl_check_and_add_flow: Replace the actions of an existing flow if actions have changed. ovn-controller: I-P for ct zone and OVS interface changes in flow output stage. controller/binding.c | 1112 ++++++++++++++++++++++++----------- controller/binding.h | 58 +- controller/lflow.c | 13 + controller/lflow.h | 2 + controller/ofctrl.c | 23 +- controller/ovn-controller.c | 332 ++++++++--- controller/ovn-controller.h | 22 + controller/physical.c | 48 ++ controller/physical.h | 5 +- controller/pinctrl.c | 19 +- controller/pinctrl.h | 4 +- tests/ovn-performance.at | 22 +- 12 files changed, 1197 insertions(+), 463 deletions(-)