[ovs-dev] [Simple DB Stats 11/11] bridge: Don't replicate columns that vswitchd doesn't need.
Justin Pettit
jpettit at nicira.com
Wed Jun 23 01:39:35 UTC 2010
Looks good.
--Justin
On Jun 10, 2010, at 5:14 PM, Ben Pfaff wrote:
> Not replicating unneeded columns has some value in avoiding CPU time and
> bandwidth to the database, but in ovs-vswitchd in particular it has much
> greater value in avoiding another reconfiguration step. When ovs-vsctl
> is used in its default mode this essentially avoids half of the
> reconfigurations that ovs-vswitchd currently does. What happens now is:
>
> 1. ovs-vsctl updates the database and increments next_cfg.
> 2. ovs-vswitchd notices the change to the database, reconfigures
> itself, then increments cur_cfg to match next_cfg.
> 3. The database sends the change to cur_cfg back to ovs-vswitchd,
> which causes ovs-vswitchd to reconfigure itself a second time.
>
> By not replicating cur_cfg we avoid step 3 and save a whole reconfiguration
> step.
>
> Also, now that the database contains interface statistics, this avoids
> reconfiguring every time that statistics are updated.
> ---
> vswitchd/bridge.c | 12 ++++++++++++
> 1 files changed, 12 insertions(+), 0 deletions(-)
>
> diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
> index 92dde8a..1c75551 100644
> --- a/vswitchd/bridge.c
> +++ b/vswitchd/bridge.c
> @@ -278,6 +278,18 @@ bridge_init(const char *remote)
> /* Create connection to database. */
> idl = ovsdb_idl_create(remote, &ovsrec_idl_class);
>
> + ovsdb_idl_omit(idl, &ovsrec_open_vswitch_col_cur_cfg);
> + ovsdb_idl_omit(idl, &ovsrec_open_vswitch_col_external_ids);
> +
> + ovsdb_idl_omit(idl, &ovsrec_bridge_col_external_ids);
> +
> + ovsdb_idl_omit(idl, &ovsrec_port_col_external_ids);
> + ovsdb_idl_omit(idl, &ovsrec_port_col_fake_bridge);
> +
> + ovsdb_idl_omit(idl, &ovsrec_interface_col_external_ids);
> + ovsdb_idl_omit(idl, &ovsrec_interface_col_ofport);
> + ovsdb_idl_omit(idl, &ovsrec_interface_col_statistics);
> +
> /* Register unixctl commands. */
> unixctl_command_register("fdb/show", bridge_unixctl_fdb_show, NULL);
> unixctl_command_register("bridge/dump-flows", bridge_unixctl_dump_flows,
> --
> 1.7.1
>
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev_openvswitch.org
More information about the dev
mailing list