Tweaks for LevelDB's caches.
Cache size optimizations #1981
pull sipa wants to merge 1 commits into bitcoin:master from sipa:caches changing 7 files +27 −14-
sipa commented at 5:09 PM on November 4, 2012: member
-
Cache size optimizations 1c83b0a377
-
jgarzik commented at 6:31 PM on November 4, 2012: contributor
ACK
-
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.
-
gavinandresen commented at 7:10 PM on November 8, 2012: contributor
ACK
-
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?
-
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.
- sipa referenced this in commit 16d9d61f99 on Nov 8, 2012
- sipa merged this on Nov 8, 2012
- sipa closed this on Nov 8, 2012
- laudney referenced this in commit 3a1d8f0c8f on Mar 19, 2014
- KolbyML referenced this in commit 3f6f501c80 on Dec 5, 2020
- DrahtBot locked this on Sep 8, 2021