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

Tracking issue: Performance benchmarks and profiling #262

Open
Davidson-Souza opened this issue Oct 23, 2024 · 1 comment
Open

Tracking issue: Performance benchmarks and profiling #262

Davidson-Souza opened this issue Oct 23, 2024 · 1 comment
Labels
chore Cleaning, refactoring, reducing complexity code quality Generally improves code readability and maintainability

Comments

@Davidson-Souza
Copy link
Collaborator

We would definitely benefit from some benchmarking and profiling of the current code, to find bottlenecks and choke points. This issue will keep track of them.

Here are some suggestions of things that could give us a good insight:

  • Flame graphs: A simple, yet powerful profiling that can help us find places that are bottlenecking our code.
  • Code benchmarks: The first step was made in Add criterion benches and restructure testdata #259, including more benchmarks would be very useful
  • Memory profiling: Look for how we use memory and CPU cache. I would divide this into two categories:
    • heap allocation
    • cache friendless
  • Figure out how well our current I/O code behaves, and if we can reduce how much we syscall/wait for data
  • (anything else??)
@Davidson-Souza Davidson-Souza added chore Cleaning, refactoring, reducing complexity code quality Generally improves code readability and maintainability labels Oct 23, 2024
@Davidson-Souza
Copy link
Collaborator Author

I've captured two flamegraphs on 6a286a6. Both are captured during block download, but one is while downloading mainly empty blocks, and the other after 350k, where it gets more full.

Both flamegraphs are with the default assumevalid, and I'm using --connect with another node running on my own home network.

It's funny how in the first one, our logger is a big resource taker. I guess we should go back to only logging every 10k blocks or something.

flamegraph_first
flamegraph

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Cleaning, refactoring, reducing complexity code quality Generally improves code readability and maintainability
Projects
None yet
Development

No branches or pull requests

1 participant