Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 2092473: libovsdb perf backports #1119

Merged

Conversation

dcbw
Copy link
Member

@dcbw dcbw commented Jun 1, 2022

Carry a couple upstream libovsdb performance/scale patches

ovn-org/libovsdb#312
ovn-org/libovsdb#311
ovn-org/libovsdb#308

And one bug fix that makes 308 apply cleanly:
ovn-org/libovsdb#307

andreaskaris and others added 4 commits June 1, 2022 10:20
If NativeToOVS was successful, then simply assign the value and break
out of the switch statement, but continue with the loop. Prior to this
change, only a single pointer value was assigned, and then regardless of
success or failure, ApplyModifications returned with the error code,
even if it was nil. That skipped other valid Modifications if several of
them assigned a NativeToOvs pointer value.

Signed-off-by: Andreas Karis <ak.karis@gmail.com>

ovn-org/libovsdb#307
…ation

tCache.Row() clones the model to get 'existing'. The another explicit
Clone() is done to get 'modified' which is passed to ApplyModifications()
and updated with the ovsdb row update. If 'modified' and 'existing'
are different, then 'modified' is passed to Update() which does two more
clones. First for the original row to (presumably?) nothing in the old
row changes underneath Update() while it's processing the update.
Finally Update() clones 'modified' and assigns that as the new row
in the cache.

So, we clone the cache row into 'existing', clone that into 'modified',
update 'modified', clone 'modified' again to update the cache, and then
throw it away. Ideally we could assign 'modified' to the cache instead of
clone it again, but we have to pass it to the event handlers and we have
to ensure it won't be changed underneath the event handler after we've
released the row cache lock.

Since Populate2() owns 'modified' (at least until it hands it off to
the event handler) we can change a few things around and get rid of the
first clone from 'existing' to 'modified'. 'existing'-s only purpose
was to enable the model.Equal() comparison to know if we should actually
update the cache, but since ApplyModifications() makes the changes it
knows when 'modified' is changed. Use that instead of model.Equal().

Lastly, the event handler also used 'existing' but since we're
replacing the original model in the row cache with 'modified' we can
return the original model for the event handler in place of 'existing'
since 'existing' was (previous to this patch) cloned from the original
model anyway.

All this avoids a Clone() in a hotpath. Testcases and benchmarks added.

ovn-org/libovsdb#308
Lift the new value access out of the hot loop and save
a bunch of time iterating over large sets.

ovn-org/libovsdb#311
…s in hotpaths

Arguments to log functions still get evaluated by Go even though
the Log() function will never be called due to the V(5).

So stop burning a ton of time constructing debug logging strings
that will never get printed anywhere, unless we've actually
got debug logging enabled.

ovn-org/libovsdb#312
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 1, 2022
@tssurya
Copy link
Contributor

tssurya commented Jun 1, 2022

/lgtm
doesn't need bz?

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 1, 2022
@dcbw dcbw changed the title libovsdb perf backports Bug 2092473: libovsdb perf backports Jun 1, 2022
@openshift-ci openshift-ci bot added bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels Jun 1, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 1, 2022

@dcbw: This pull request references Bugzilla bug 2092473, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.11.0) matches configured target release for branch (4.11.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @anuragthehatter

In response to this:

Bug 2092473: libovsdb perf backports

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 2 against base HEAD 4e57473 and 8 for PR HEAD 529d4b4 in total

Copy link
Contributor

@flavio-fernandes flavio-fernandes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@dcbw
Copy link
Member Author

dcbw commented Jun 1, 2022

/retest

ns/e2e-statefulset-4151 pod/ss-0 node/ip-10-0-220-171.us-west-2.compute.internal - 6.02 seconds after deletion - reason/FailedCreatePodSandBox Failed to create pod sandbox: rpc error: code = Unknown desc = failed to add hostport mapping for sandbox k8s_ss-0_e2e-statefulset-4151_db6fa1a8-776f-47f0-bde4-5e8838bf13bf_0(f6245b7bce7ff97e12beff55a8e1bbf68869b26d9d94d1f6f834291b9abc90b2): cannot open hostport 21017 for pod k8s_ss-0_e2e-statefulset-4151_db6fa1a8-776f-47f0-bde4-5e8838bf13bf_0_: listen tcp4 :21017: bind: address already in use}

is a CRIO error, not an OVN one....

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 1, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dcbw, flavio-fernandes, tssurya

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@dcbw
Copy link
Member Author

dcbw commented Jun 1, 2022

/override ci/prow/e2e-aws-ovn-windows

until the kube versioning check is figured out

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 1, 2022

@dcbw: Overrode contexts on behalf of dcbw: ci/prow/e2e-aws-ovn-windows

In response to this:

/override ci/prow/e2e-aws-ovn-windows

until the kube versioning check is figured out

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 1 against base HEAD 4e57473 and 7 for PR HEAD 529d4b4 in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 4e57473 and 6 for PR HEAD 529d4b4 in total

@dcbw
Copy link
Member Author

dcbw commented Jun 2, 2022

/retest-required

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 2, 2022

@dcbw: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-openstack-ovn 529d4b4 link false /test e2e-openstack-ovn
ci/prow/e2e-vsphere-ovn 529d4b4 link false /test e2e-vsphere-ovn
ci/prow/okd-e2e-gcp-ovn 529d4b4 link false /test okd-e2e-gcp-ovn
ci/prow/e2e-hypershift 529d4b4 link false /test e2e-hypershift
ci/prow/e2e-vsphere-windows 529d4b4 link false /test e2e-vsphere-windows

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@openshift-merge-robot openshift-merge-robot merged commit f88113a into openshift:master Jun 2, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 2, 2022

@dcbw: All pull requests linked via external trackers have merged:

Bugzilla bug 2092473 has been moved to the MODIFIED state.

In response to this:

Bug 2092473: libovsdb perf backports

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@dcbw
Copy link
Member Author

dcbw commented Jun 2, 2022

/cherry-pick release-4.10

@openshift-cherrypick-robot

@dcbw: new pull request created: #1124

In response to this:

/cherry-pick release-4.10

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants