Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Cache size optimizations #1981

merged 1 commit into from Nov 8, 2012


None yet
5 participants

sipa commented Nov 4, 2012

Tweaks for LevelDB's caches.


jgarzik commented Nov 4, 2012


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


gavinandresen commented Nov 8, 2012


Diapolo commented Nov 8, 2012

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


sipa commented Nov 8, 2012

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 added a commit that referenced this pull request Nov 8, 2012

Merge pull request #1981 from sipa/caches
Cache size optimizations

@sipa sipa merged commit 16d9d61 into bitcoin:master Nov 8, 2012

laudney pushed a commit to reddcoin-project/reddcoin that referenced this pull request Mar 19, 2014

Merge pull request #1981 from sipa/caches
Cache size optimizations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment