vinteumorg / Floresta

A fully-validating Bitcoin node powered by Utreexo, with an integrated Electrum Server
MIT License
176 stars 37 forks source link

Tracking issue: Performance benchmarks and profiling #262

Open Davidson-Souza opened 1 week ago

Davidson-Souza commented 1 week ago

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:

Davidson-Souza commented 1 week ago

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