Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions doc/reduce-memory.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,13 @@ The size of some in-memory caches can be reduced. As caches trade off memory usa

## Number of peers

- `-maxconnections=<n>` - the maximum number of connections, this defaults to 125. Each active connection takes up some
memory. This option applies only if incoming connections are enabled, otherwise the number of connections will never
be more than 10. Of the 10 outbound peers, there can be 8 full-relay connections and 2 block-relay-only ones.
- `-maxconnections=<n>` - the maximum number of connections, which defaults to 125. Each active connection takes up some
memory. This option applies only if inbound connections are enabled; otherwise, the number of connections will not
be more than 11. Of the 11 outbound peers, there can be 8 full-relay connections, 2 block-relay-only ones,
and occasionally 1 short-lived feeler or extra outbound block-relay-only connection.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not actually sure all these details are needed for a 'reducing memory usage' document, all in all it was simply intended as suggestion to reduce the number 😄
But of course getting it correct instead of having outdated information here is an improvement.


- These limits do not apply to connections added manually with the `-addnode` configuration option or
the `addnode` RPC, which have a separate limit of 8 connections.

## Thread configuration

Expand Down
7 changes: 6 additions & 1 deletion share/examples/bitcoin.conf
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,12 @@
# Port on which to listen for connections (default: 8333, testnet: 18333, signet: 38333, regtest: 18444)
#port=

# Maximum number of inbound+outbound connections.
# Maximum number of inbound + outbound connections (default: 125). This option
# applies only if inbound connections are enabled; otherwise, the number of connections
# will not be more than 11: 8 full-relay connections, 2 block-relay-only ones, and
# occasionally 1 short-lived feeler or extra outbound block-relay-only connection.
# These limits do not apply to connections added manually with the -addnode
# configuration option or the addnode RPC, which have a separate limit of 8 connections.
#maxconnections=

#
Expand Down