Open
Conversation
Convert all DirectDbWriter usage in utxo_set.rs to BatchDbWriter: - write_many: use WriteBatch for batched DB writes - write_diff: reuse existing write_diff_batch - write_from_iterator_without_cache: use WriteBatch - Add write_many_without_cache for IBD (batch + skip cache) Closes kaspanet#768
During IBD, UTXO chunks imported from peers do not benefit from caching. Switch to write_many_without_cache which uses BatchDbWriter and skips cache population.
UtxoSetStore trait is no longer needed since write_many_without_cache is a direct method on DbUtxoSetStore, not a trait method.
Collaborator
|
Did you run practical tests regarding the effect of this? can you share the results? |
Collaborator
|
also how does this compare with https://github.com/kaspanet/rusty-kaspa/pull/781/changes ? |
Collaborator
|
I think #850 also revolves around the same aspects. |
Author
|
I interpreted "the effect of this" as the performance difference between Results (Windows 11, release build):
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace
DirectDbWriterwithWriteBatch/BatchDbWriterin IBD and pruning UTXO write paths (write_many,write_from_iterator_without_cache,write_diff). Also addswrite_many_without_cachefor the IBD import path where cache population is unnecessary.Closes #768