Coinview UTXO is too bloated (Explore alternatives to dbreeze database) #2414
Comments
Analysis of the Bitcoin UTXO set: https://eprint.iacr.org/2017/1095.pdf quoting:
An article summarizing about this and proposing an alternavite solution involving Patricia Trie: https://medium.com/codechain/codechains-merkleized-utxo-set-c76c9376fd4f |
this change is quote old (1 years old) here an excerpt about performance improvement in that version:
|
an interesting read about patricia trie implementation by CodeChain |
nice I found you created an issue one year ago referencing this change hehe |
Not related to size but to performance, quoting an excerpt DBreeze documentation (https://github.com/hhblaze/DBreeze/blob/master/Documentation/_DBreeze.Documentation.actual.pdf)
I think we can take advantage of this during our flushes |
about size, this comment could be an hint: |
quoting always documentation
this answers to the commented code (that thus is degrading performance) StratisBitcoinFullNode/src/Stratis.Bitcoin.Features.Consensus/CoinViews/DBreezeCoinView.cs Line 203 in fec7693
documentation knows that :) |
this could explain size problem |
OMG ok yeah that defo could explain the bloating |
I create a simple utility to unload and reload the data in the tables to see if it would reclaim some space. While it did get some space back, the results where a bit underwhelming as I was only able to see about a 4% reduction in the overall size of the files on disk. In my case that was about 25GB so it provided some benefit but I was hoping more. I went ahead an posted the code https://github.com/Tuppence-io/Stratis.Utility.CompressDatabase |
Thanks @blane-nelson for the results. We don't do too many deletes on a normal node operations, we do delete on reorgs but those are quite rare so I would not expect to see much reduction, the conclusion here is that we need to store less data or change the store, We do have a refactor task to explore alternative databases, the result of such a research will be made available at due time. |
Related #2373 |
Some research about moving store can be done using this site |
After syncing the Bitcoin main chain to height 470k the folder size of the coinview DB is 480GB and the size of the block store is 120GB, this does not sound right (to compare bitcoin core is 200GB all together) somewhere we store data inefficiently or bloat data in store.
This is an investigative task to:
The text was updated successfully, but these errors were encountered: