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

Add GetNeighborsBenchmark #2270

Merged
merged 5 commits into from
Aug 6, 2020
Merged

Add GetNeighborsBenchmark #2270

merged 5 commits into from
Aug 6, 2020

Conversation

critical27
Copy link
Contributor

@critical27 critical27 commented Aug 4, 2020

Add GetNeighborsBenchmark, no concurrency, used to compare with 2.0 under almost same data.

The copy of lastRank and lastDstId has trivial impact in 1.0, so leave it alone. @dangleptr.

GetNeighborsBenchmark.cpprelative time/iter iters/s
============================================================================
OneVertexOneProperty 629.54us 1.59K
OneVertexOnePropertyWithFilter 72.33% 870.39us 1.15K
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems the more data filtered out, the better performance acquired.
So the bottleneck is encoder(RowWriter) ?

Copy link
Contributor Author

@critical27 critical27 Aug 5, 2020

Choose a reason for hiding this comment

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

Hard to say whether bottleneck is encoder or not. With bigger filter_ratio, it will need to eval the exp which is more likely to be useless. But with a small filter_ratio, we can filter out more data, so there will be less data to encode. We can only say with a big filter_ratio, it has worse performance.

The result in 2.0 is same.

Copy link
Contributor

Choose a reason for hiding this comment

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

What if we comment the collector? What's the performance looks like?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like this, do not collect any value.
image

Copy link
Contributor

Choose a reason for hiding this comment

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

Good job.
By the way, I think that even with the same data, there is no comparison between filters and no filters, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, you're right.

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like this, do not collect any value.
image

Em.... So we can ensure the cost comes from encoder.

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's run the benchmark for a long time, and check the perf top about it. @critical27

namespace nebula {
namespace storage {

// only add two tag and two edge
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment is not right,
Here have 10 tags and 10,000 edges

Copy link
Contributor Author

@critical27 critical27 Aug 6, 2020

Choose a reason for hiding this comment

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

My bad, fixed.

GetNeighborsBenchmark.cpprelative time/iter iters/s
============================================================================
OneVertexOneProperty 629.54us 1.59K
OneVertexOnePropertyWithFilter 72.33% 870.39us 1.15K
Copy link
Contributor

Choose a reason for hiding this comment

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

Good job.
By the way, I think that even with the same data, there is no comparison between filters and no filters, right?

Copy link
Contributor

@panda-sheep panda-sheep left a comment

Choose a reason for hiding this comment

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

Excellent!

@dutor dutor merged commit b0b6a4e into vesoft-inc:master Aug 6, 2020
@critical27 critical27 deleted the bench branch August 6, 2020 06:46
xuguruogu pushed a commit to xuguruogu/nebula that referenced this pull request Sep 12, 2020
* add getneighbors benchmark

* address @CPWstatic's comments

* fix filter_ratio, update bm

* address @panda-sheep's comments

Co-authored-by: dangleptr <37216992+dangleptr@users.noreply.github.com>
tong-hao pushed a commit to tong-hao/nebula that referenced this pull request Jun 1, 2021
* add getneighbors benchmark

* address @CPWstatic's comments

* fix filter_ratio, update bm

* address @panda-sheep's comments

Co-authored-by: dangleptr <37216992+dangleptr@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-testing PR: ready for the CI test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants