doc: add reduce-memory.md #16339

pull fanquake wants to merge 1 commits into bitcoin:master from fanquake:doc-reduce-memory-usage changing 2 files +50 −0
  1. fanquake commented at 1:18 AM on July 5, 2019: member

    Following some discussion in https://github.com/bitcoin-core/docs/issues/50, this adds Wladimir's reducing bitcoind memory usage gist to /doc.

    The conclusion seemed to be that if the main repo already has reduce-traffic.md, then we could also add reduce-memory.md.

  2. fanquake added the label Docs on Jul 5, 2019
  3. fanquake force-pushed on Jul 5, 2019
  4. in doc/reduce-memory.md:11 in 341e5a673a outdated
       6 | +## In-memory caches
       7 | +
       8 | +The size of some in-memory caches can be reduced. As caches trade off memory usage for performance, reducing these usually have a negative effect on performance.
       9 | +
      10 | +- `-dbcache=<n>` - the UTXO database cache size, this defaults to `450` (since 0.14.1). The unit is MiB (1024)
      11 | +  - Before 0.11.0 the computation here was off, so a factor of about five times more memory was used than specified.
    


    hebasto commented at 2:38 AM on July 5, 2019:

    Could pre-0.11 versions mention be removed?

  5. in doc/reduce-memory.md:13 in 341e5a673a outdated
       8 | +The size of some in-memory caches can be reduced. As caches trade off memory usage for performance, reducing these usually have a negative effect on performance.
       9 | +
      10 | +- `-dbcache=<n>` - the UTXO database cache size, this defaults to `450` (since 0.14.1). The unit is MiB (1024)
      11 | +  - Before 0.11.0 the computation here was off, so a factor of about five times more memory was used than specified.
      12 | +  - The minimum value for `-dbcache` is 4.
      13 | +  - A lower dbcache makes initial sync time much longer. After the initial sync, the effect is less pronounced for most use-cases, unless fast validation of blocks is important, such as for mining.
    


    hebasto commented at 2:40 AM on July 5, 2019:

    Could dbcache word be code-styled i.e. -dbcache?

  6. in doc/reduce-memory.md:18 in 341e5a673a outdated
      13 | +  - A lower dbcache makes initial sync time much longer. After the initial sync, the effect is less pronounced for most use-cases, unless fast validation of blocks is important, such as for mining.
      14 | +
      15 | +## Memory pool
      16 | +
      17 | +- To protect against mempool flooding set `minrelaytxfee=0.00005` and `limitfreerelay=5`. See the 0.11.0 release notes at https://github.com/bitcoin/bitcoin/blob/v0.11.0/doc/release-notes.md#transaction-flooding . **This is no longer necessary for 0.12.0 and above**.
      18 | +
    


    hebasto commented at 2:42 AM on July 5, 2019:

    Could pre-0.12 versions mention be removed?

  7. hebasto commented at 2:44 AM on July 5, 2019: member

    Approach ACK 341e5a673a9dd3ef9d225e49362a600d7bd4f213

  8. practicalswift commented at 2:58 PM on July 5, 2019: contributor

    utACK 341e5a673a9dd3ef9d225e49362a600d7bd4f213 modulo @hebasto's nits :-)

  9. flack commented at 6:42 PM on July 5, 2019: contributor

    Shouldn't this be linked to from README.md?

  10. docs: add reduce-memory.md
    Co-Authored-By: Wladimir J. van der Laan <laanwj@gmail.com>
    64b27c46e4
  11. fanquake force-pushed on Jul 6, 2019
  12. fanquake commented at 2:47 AM on July 6, 2019: member

    Have removed the old version mentions, as well as fixed some styling and wording.

    Shouldn't this be linked to from README.md?

    Added a link from /doc/README.md

  13. practicalswift commented at 5:56 AM on July 6, 2019: contributor

    ACK 64b27c46e4c21fc7902a69d8ddb6791ef417c4af

  14. hebasto commented at 6:07 AM on July 6, 2019: member

    ACK 64b27c46e4c21fc7902a69d8ddb6791ef417c4af, I have reviewed the changes and they look OK, I agree they can be merged. Also a link from /doc/README.md has been tested.

  15. in doc/reduce-memory.md:9 in 64b27c46e4
       0 | @@ -0,0 +1,49 @@
       1 | +# Reduce Memory
       2 | +
       3 | +There are a few parameters that can be dialed down to reduce the memory usage of `bitcoind`. This can be useful on embedded systems or small VPSes.
       4 | +
       5 | +## In-memory caches
       6 | +
       7 | +The size of some in-memory caches can be reduced. As caches trade off memory usage for performance, reducing these will usually have a negative effect on performance.
       8 | +
       9 | +- `-dbcache=<n>` - the UTXO database cache size, this defaults to `450`. The unit is MiB (1024).
    


    promag commented at 3:02 PM on July 6, 2019:
    defaults to `450 MiB` (1 MiB = 1024 bytes).
    

    fanquake commented at 12:36 AM on July 8, 2019:

    Thanks. However given the 4 ACKs I'm going to merge this.

  16. promag commented at 3:05 PM on July 6, 2019: member

    Noice ACK, just had a quick look and also didn't confirm since x.x.x versions - not sure if it's relevant here.

  17. jonasschnelli commented at 9:45 PM on July 7, 2019: contributor

    Good idea! ACK 64b27c46e4c21fc7902a69d8ddb6791ef417c4af

  18. fanquake merged this on Jul 8, 2019
  19. fanquake closed this on Jul 8, 2019

  20. fanquake referenced this in commit 2b465195e0 on Jul 8, 2019
  21. fanquake deleted the branch on Jul 8, 2019
  22. jnewbery commented at 9:05 AM on July 8, 2019: member

    ACK 64b27c46e4c21fc7902a69d8ddb6791ef417c4af

    Thanks @laanwj and @fanquake for adding this.

  23. jasonbcox referenced this in commit caadd6e2d1 on Oct 9, 2020
  24. random-zebra referenced this in commit 4c564dd875 on Mar 24, 2021
  25. PastaPastaPasta referenced this in commit e015d9e4f2 on Jun 27, 2021
  26. PastaPastaPasta referenced this in commit 6caf042746 on Jun 28, 2021
  27. PastaPastaPasta referenced this in commit 39e41d9af8 on Jun 29, 2021
  28. PastaPastaPasta referenced this in commit f5d841b953 on Jul 1, 2021
  29. PastaPastaPasta referenced this in commit 9c8d1fe99d on Jul 1, 2021
  30. ikeedge commented at 3:09 AM on July 3, 2021: none

    M

  31. fanquake locked this on Jul 5, 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: 2026-04-22 18:14 UTC

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