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

Chain filters cpu utilization (#16817) #16857

Merged
merged 1 commit into from
Jul 1, 2021

Conversation

dpsutton
Copy link
Contributor

@dpsutton dpsutton commented Jul 1, 2021

Porting #16817 to release-x.39.x

  • Breadth first search on graph for chain filters
  • abandons at max-depth and looks in breadth first fashion rather than
    descending as far as possible on each possible path
  • Add loop detection

not actually fooled by loops since we abandon after a certain path
length. But will remove some false starts before they have to be
killed by the path length check.

  • Add seen optimization of nodes

We reach nodes in the shortest path possible, so keep a list of nodes
visited and don't revisit them: we got to them as fast as possible,
and once there, there's no new nodes that we can see from that vantage
point.

This allows a serious speedup and should hopefully fully resolve the
cpu issues seen by some.

  • alignment

* Breadth first search on graph for chain filters

- abandons at max-depth and looks in breadth first fashion rather than
descending as far as possible on each possible path

* Add loop detection

not actually fooled by loops since we abandon after a certain path
length. But will remove some false starts before they have to be
killed by the path length check.

* Add seen optimization of nodes

We reach nodes in the shortest path possible, so keep a list of nodes
visited and don't revisit them: we got to them as fast as possible,
and once there, there's no new nodes that we can see from that vantage
point.

This allows a serious speedup and should hopefully fully resolve the
cpu issues seen by some.

* alignment
@dpsutton dpsutton requested a review from rlotun July 1, 2021 21:48
@codecov
Copy link

codecov bot commented Jul 1, 2021

Codecov Report

❗ No coverage uploaded for pull request base (release-x.39.x@f538050). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@                Coverage Diff                @@
##             release-x.39.x   #16857   +/-   ##
=================================================
  Coverage                  ?   84.75%           
=================================================
  Files                     ?      406           
  Lines                     ?    32342           
  Branches                  ?     2328           
=================================================
  Hits                      ?    27411           
  Misses                    ?     2603           
  Partials                  ?     2328           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f538050...ebb1b1a. Read the comment docs.

@dpsutton dpsutton merged commit 9eb5eec into release-x.39.x Jul 1, 2021
@dpsutton dpsutton deleted the backport-chain-filter-fix branch July 1, 2021 22:22
@dpsutton dpsutton added this to the 0.39.5 milestone Jul 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants