Skip to content

IBD: Batch UTXO set writes #768

@coderofstuff

Description

@coderofstuff

In consensus/src/model/sstores/utxo_set.rs the write_many function will use a DirectDBWriter to write to the UTXOs to the database.

It seems like converting using a WriteBatch to write the data as an entire batch would make this area less hot (See Extras section below)

Writing to cache can also be skipped

TODO

  • Investigate if converting to BatchDbWriter indeed results in performance improvements (either faster completion or less CPU intensiveness)
  • (if so) Implement a write_many_without_cache, and update UtxoSetStore::write_many to use write_many_without_cache passing in a BatchDbWriter instead of a DirectDbWriter instance

Extras

Flamegraph when using Direct DB Writer (Current)

Image

Flamegraph when using Batched Writer (suggested)

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions