Since -maxmempool
is 450 MB by default it’s quite possible for a user to accidentally OOM a low
memory device if they increase -dbcache
beyond the default.
Explain that mempool memory is added to -dbcache #13676
pull Sjors wants to merge 1 commits into bitcoin:master from Sjors:2018/07/dbcache-ibd-mempool changing 1 files +1 −1-
Sjors commented at 1:18 pm on July 16, 2018: member
-
fanquake added the label Docs on Jul 16, 2018
-
in src/init.cpp:366 in a9b242c53b outdated
362@@ -363,7 +363,7 @@ void SetupServerArgs() 363 gArgs.AddArg("-conf=<file>", strprintf("Specify configuration file. Relative paths will be prefixed by datadir location. (default: %s)", BITCOIN_CONF_FILENAME), false, OptionsCategory::OPTIONS); 364 gArgs.AddArg("-datadir=<dir>", "Specify data directory", false, OptionsCategory::OPTIONS); 365 gArgs.AddArg("-dbbatchsize", strprintf("Maximum database write batch size in bytes (default: %u)", nDefaultDbBatchSize), true, OptionsCategory::OPTIONS); 366- gArgs.AddArg("-dbcache=<n>", strprintf("Set database cache size in megabytes (%d to %d, default: %d)", nMinDbCache, nMaxDbCache, nDefaultDbCache), false, OptionsCategory::OPTIONS); 367+ gArgs.AddArg("-dbcache=<n>", strprintf("Set database cache size in megabytes. During initial sync memory from the mempool is added (see -maxmempool). (%d to %d, default: %d)", nMinDbCache, nMaxDbCache, nDefaultDbCache), false, OptionsCategory::OPTIONS);
promag commented at 8:33 pm on July 16, 2018:Use the same terminology found below?https://github.com/bitcoin/bitcoin/blob/a9b242c53beb3be45e9d49af965bec835b3a7abc/src/init.cpp#L475Sjors force-pushed on Jul 17, 2018Sjors commented at 8:25 am on July 17, 2018: memberTweaked the message to use “initial block download” instead of “initial sync” and use<n> megabytes
convention. Also keeping(4 to ..., default: 450)
directly after the first sentence, instead of at the very end (I think that’s more readable).randolf approvedskeees commented at 5:12 pm on August 1, 2018: contributorWould the same OOM issue also be encountered during periods of time when mempools are full and not just in IBD? Maybe just clarify that the process can use up to dbcache + maxmempool space?jonasschnelli commented at 6:55 am on August 2, 2018: contributorAgree with @skeees. Users need to be aware that
MAXMEMPOOLLIMIT+DBCACHE
is what they should count for, regardless of IBD/In-sync.But the – in this PR – updated
-dbcache
message seems to make it more clear.utACK 2f631f0
DrahtBot commented at 2:32 pm on August 29, 2018: memberThe following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Conflicts
No conflicts as of last run.
DrahtBot added the label Needs rebase on Sep 5, 2018leishman commented at 8:31 pm on September 5, 2018: contributorI personally don’t think the message is clear enough to prevent users from over-allocating. Perhaps something along the lines of: “During initial block download, the amount of memory used may be up to maxmempoollimit + dbcache”. ? Or something like this?sipa commented at 8:37 pm on September 5, 2018: memberThat’s not just the case during IBD.
At any point in time, the total memory is limited by the headers in memory, network buffers, validation caches, UTXO set cache, mempool, plus some overhead.
When the mempool limit is not reached, the UTXO set cache is allowed to grow and use the mempool space as well, but this shouldn’t affect users’ expectations of memory usage. It’d also independent of IBD or not.
Sjors force-pushed on Sep 6, 2018Sjors commented at 3:03 pm on September 6, 2018: memberOk, I tried a new wording:
0 -dbcache=<n> 1 Maximum database cache size <n> megabytes (4 to 16384, default: 450). In 2 addition, unused mempool memory is shared for this cache (see 3 -maxmempool).
Sjors renamed this:
Explain that mempool memory is added to -dbcache during IBD
Explain that mempool memory is added to -dbcache
on Sep 6, 2018DrahtBot removed the label Needs rebase on Sep 6, 2018DrahtBot added the label Needs rebase on Jan 30, 2019Explain that unused mempool memory is added to -dbcache 7cb1a1401dSjors force-pushed on Jan 31, 2019DrahtBot removed the label Needs rebase on Jan 31, 2019laanwj merged this on Feb 21, 2019laanwj closed this on Feb 21, 2019
laanwj referenced this in commit a83aedca18 on Feb 21, 2019Sjors deleted the branch on Feb 21, 2019vijaydasmp referenced this in commit 3f5f4c3354 on Sep 5, 2021vijaydasmp referenced this in commit 91928401a2 on Sep 6, 2021DrahtBot locked this on Dec 16, 2021
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: 2024-11-17 15:12 UTC
More mirrored repositories can be found on mirror.b10c.me