Quantcast
Channel: Active questions tagged bitcoin-core-development - Bitcoin Stack Exchange
Viewing all articles
Browse latest Browse all 60

Various caches are defined in the Bitcoin source code. What do these caches refer to?

$
0
0

The source code is as follows:

//! -dbcache default (MiB) static const int64_t nDefaultDbCache = 450;//! -dbbatchsize default (bytes)static const int64_t nDefaultDbBatchSize = 16 << 20;//! max. -dbcache (MiB)static const int64_t nMaxDbCache = sizeof(void*) > 4 ? 16384 : 1024;//! min. -dbcache (MiB)static const int64_t nMinDbCache = 4;//! Max memory allocated to block tree DB specific cache, if no -txindex (MiB)static const int64_t nMaxBlockDBCache = 2;//! Max memory allocated to block tree DB specific cache, if -txindex (MiB)// Unlike for the UTXO database, for the txindex scenario the leveldb cache make// a meaningful difference: https://github.com/bitcoin/bitcoin/pull/8273#issuecomment-229601991static const int64_t nMaxTxIndexCache = 1024;//! Max memory allocated to all block filter index caches combined in MiB.static const int64_t max_filter_index_cache = 1024;//! Max memory allocated to coin DB specific cache (MiB)static const int64_t nMaxCoinsDBCache = 8;

I have 5 questions.

  1. What do these caches represent?
  2. What is the relationship between UTXO cache and these caches?
  3. What is the relationship between levelDB's own cache and UTXO cache?
  4. What is the current UTXO cache size?
  5. What does the memtable in levelDB correspond to in the Bitcoin system?

Viewing all articles
Browse latest Browse all 60

Latest Images

Trending Articles





Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>