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
  1. Sjors commented at 1:18 pm on July 16, 2018: member

    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.

  2. fanquake added the label Docs on Jul 16, 2018
  3. 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#L475
  4. Sjors force-pushed on Jul 17, 2018
  5. Sjors commented at 8:25 am on July 17, 2018: member
    Tweaked 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).
  6. randolf approved
  7. skeees commented at 5:12 pm on August 1, 2018: contributor
    Would 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?
  8. jonasschnelli commented at 6:55 am on August 2, 2018: contributor

    Agree 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

  9. DrahtBot commented at 2:32 pm on August 29, 2018: member

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Conflicts

    No conflicts as of last run.

  10. DrahtBot added the label Needs rebase on Sep 5, 2018
  11. leishman commented at 8:31 pm on September 5, 2018: contributor
    I 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?
  12. sipa commented at 8:37 pm on September 5, 2018: member

    That’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.

  13. Sjors force-pushed on Sep 6, 2018
  14. Sjors commented at 3:03 pm on September 6, 2018: member

    Ok, 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).
    
  15. Sjors renamed this:
    Explain that mempool memory is added to -dbcache during IBD
    Explain that mempool memory is added to -dbcache
    on Sep 6, 2018
  16. DrahtBot removed the label Needs rebase on Sep 6, 2018
  17. DrahtBot added the label Needs rebase on Jan 30, 2019
  18. Explain that unused mempool memory is added to -dbcache 7cb1a1401d
  19. Sjors force-pushed on Jan 31, 2019
  20. Sjors commented at 9:58 am on January 31, 2019: member
    Rebased after #15163, using MiB now.
  21. DrahtBot removed the label Needs rebase on Jan 31, 2019
  22. laanwj merged this on Feb 21, 2019
  23. laanwj closed this on Feb 21, 2019

  24. laanwj referenced this in commit a83aedca18 on Feb 21, 2019
  25. Sjors deleted the branch on Feb 21, 2019
  26. vijaydasmp referenced this in commit 3f5f4c3354 on Sep 5, 2021
  27. vijaydasmp referenced this in commit 91928401a2 on Sep 6, 2021
  28. DrahtBot locked this on Dec 16, 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: 2024-12-19 06:12 UTC

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