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

Enable AutoFDO for Nebula Graph #4636

Open
lipzhu opened this issue Sep 9, 2022 · 6 comments
Open

Enable AutoFDO for Nebula Graph #4636

lipzhu opened this issue Sep 9, 2022 · 6 comments
Labels
type/enhancement Type: make the code neat or more efficient

Comments

@lipzhu
Copy link
Contributor

lipzhu commented Sep 9, 2022

Introduction
Hi Nebula Graph dev team,

We are working on the performance evaluation of Nebula Graph in Intel's ICX server, and found the metrics of front-end bound is high(LIB), for example, the Go2Step scenarior, the front-end bound of storaged process is ~32% and even more higher.
Then we did some experiments for the front-end bound issue, like enabling AutoFDO, and found the Go2Step beanchmark performance can increase ~7%(Both the avg/P(95) latency).
The next, we are going to apply the AutoFDO to all scenariors in nebula bench, do you have comments or suggestions ?
P.S. The test result is based on the version of release-3.1 branch of Nebula Graph in Intel(R) Xeon(R) Platinum 8380 CPU.

@lipzhu lipzhu added the type/enhancement Type: make the code neat or more efficient label Sep 9, 2022
@wey-gu
Copy link
Contributor

wey-gu commented Sep 9, 2022

Wow, amazing @lipzhu, welcome to the community!

Would you mind sharing the change via PR, or explaining specific changes in this thread?

@lipzhu
Copy link
Contributor Author

lipzhu commented Sep 15, 2022

@wey-gu, sorry for the later response, we just reproduce the performance increase in master by enabling the AutoFDO. And the best result is found in FindShortestPath scenario, it can increase 10+%.
In general it has 2 major steps:

  1. Collect the perf data for different processes (graphd, metad, storaged), in our test environment, we use the 5 bench scenario to generate the perf data(maybe in production env, it can be TopN query), and merge the perf data into a single gcov file, you can achieve this by https://github.com/google/autofdo
  2. Compile the nebula package with the gcov which generated by 1st step with the option -fauto-profile=/path/xxx.gcov

References:
https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/45290.pdf

@lipzhu
Copy link
Contributor Author

lipzhu commented Sep 15, 2022

I can draft a document to describe the details to enable the AutoFDO for Nebula.

@wey-gu
Copy link
Contributor

wey-gu commented Sep 15, 2022

Dear @lipzhu ,

I am impressed by AutoFDO's performance gain, and especially, by your efforts/work on this.

It's really awesome, plz allow my silly question, regarding the perf data(gcov file), which I think would be crucial to be prepared(on which scenarios), is it possible that certain other scenarios could suffer from performance regression on this optimization? Or, it's considered as a general optimization(that is, we should expect no perf regression for all types of queries).

And, looking forward to your documentation, could we publish it to the nebulagraph blog when it's done?(also, if possible, we would like to invite you to the community meeting for sharing things about this work, too)

Thanks!

@lipzhu
Copy link
Contributor Author

lipzhu commented Sep 23, 2022

Hi @wey-gu ,

is it possible that certain other scenarios could suffer from performance regression on this optimization?

Maybe, but I rarely saw this situation, some scenarios didn't benefit from the AutoFDO binary. And Google have a paper(I paste in previous comments) to describe the situation(e.g. they collect profile data from a AutoFDO binary) they saw the regressions, and the impact is small compared with the performance gain, this maybe the reason they widely use the AutoFDO in their products.

@wey-gu
Copy link
Contributor

wey-gu commented Feb 1, 2023

@lipzhu, would you mind reaching us via mail(with an address that we could send to) so that we could share with you some contributor souvenirs and the certificate?

wey.gu(at)vesoft.com
cc @lisahui

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Type: make the code neat or more efficient
Projects
None yet
Development

No branches or pull requests

2 participants