Cache size optimizations #1981

pull sipa wants to merge 1 commits into bitcoin:master from sipa:caches changing 7 files +27 −14
  1. sipa commented at 5:09 PM on November 4, 2012: member

    Tweaks for LevelDB's caches.

  2. Cache size optimizations 1c83b0a377
  3. jgarzik commented at 6:31 PM on November 4, 2012: contributor

    ACK

  4. BitcoinPullTester commented at 12:19 PM on November 5, 2012: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/1c83b0a3771bc601fdc75588f2cd45318b19c526 for binaries and test log.

  5. gavinandresen commented at 7:10 PM on November 8, 2012: contributor

    ACK

  6. Diapolo commented at 9:34 PM on November 8, 2012: none

    I'm interested, what benefit does this induce performance wise? Any numbers or some more details?

  7. sipa commented at 10:16 PM on November 8, 2012: member

    Before, the LevelDB write buffer was always 4 MiB, the LevelDB cache for both databases (one very small, one somewhat larger), and the coin cache was flushed everytime 5000 transactions changed.

    This commit makes the -dbcache value better respected, by splitting it over all types of caches, using a meaningful distribution (I tried a few variations). The result is far fewer flushes during IBD, lower memory usage (as it's 25 MiB total now, instead of 2x 25 MiB in addition to the coin cache and write buffer) and the available cache size is used more evenly.

    Performance-wise: I got a 1.4x speedup for a -reindex to block 193000.

  8. sipa referenced this in commit 16d9d61f99 on Nov 8, 2012
  9. sipa merged this on Nov 8, 2012
  10. sipa closed this on Nov 8, 2012

  11. laudney referenced this in commit 3a1d8f0c8f on Mar 19, 2014
  12. KolbyML referenced this in commit 3f6f501c80 on Dec 5, 2020
  13. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-19 09:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me