sipa
commented at 7:08 PM on March 30, 2017:
member
It seems that our conversion from CCoinsCacheDB into a CDBBatch, and the following processing of the batch by LevelDB causes a spike in memory usage. In various experiments (all on x86_64, though), I've determined that this spike is between x1.5 and x1.9.
Take this into account ahead of time before deciding whether to flush or not.
Compensate for memory peak at flush time7228ce853d
laanwj added this to the milestone 0.14.1 on Mar 30, 2017
laanwj added the label Resource usage on Mar 30, 2017
gmaxwell
commented at 7:09 PM on March 30, 2017:
contributor
Please tag as 0.14.1.
laanwj added the label UTXO Db and Indexes on Mar 30, 2017
laanwj added this to the "For backport" column in a project
theuni
commented at 11:56 PM on March 30, 2017:
member
@sipa are any of your experiments relatively simple to reproduce? I'd like to step through the high usage spots to get a better feel for what's happening.
sipa
commented at 12:02 AM on March 31, 2017:
member
@theuni Using the top commit at https://github.com/sipa/bitcoin/commits/repmemusage I've done tests with reindexes and syncs from scratch, killing and restarting bitcoind at certain memory usage points. Then looked at (MAX_RSS - 280MB) / (last_reported_cache=_line).
laanwj
commented at 9:43 AM on March 31, 2017:
member
utACK7228ce8
laanwj merged this on Mar 31, 2017
laanwj closed this on Mar 31, 2017
laanwj referenced this in commit 9ab26bf7e4 on Mar 31, 2017
laanwj referenced this in commit 0b5e162b84 on Mar 31, 2017
morcos
commented at 12:01 PM on March 31, 2017:
member
@sipa I still object to this PR without at least some increase in the default dbcache. I believe that in the event the mempool is full and there is no loan available then performance will be unnecessarily poor. I think 300 MB (with this new calculation) is approximately the bare minimum we can achieve without likely exceeding it by accident when connecting a block. It is not appropriate for a default.
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-05-20 06:55 UTC