I’ve been noticing gradually increasing memory usage bitcoin core v22.0. I’ve been running this node for a couple of years with the same hardware and general setup and have only noticed this in the past few months, around the time I upgraded to v22, which makes me suspect it may be related.
I’m seeing bitcoind memory usage slowly climb over weeks/months of uptime. Right now it’s at 3.4 GB memory usage and as I recall I’ve seen it over 5 GB before in an incident where it caused the machine to run out of RAM, which is when I first noticed this. If I restart bitcoind, RAM usage goes back to a normal level and stays there for a while.
I do recall seeing a lot of BlockUntilSyncedToCurrentChain: txindex is catching up on block notifications
messages in the logs when RAM usage was over 5GB and my node was barely responsive to RPC calls, but I’m not sure if this has anything to do with the issue.
I’m using dbcache=1024
which would explain some of the RAM usage but not all of it.
Other config settings that may be relevant:
0txindex=1
1peerblockfilters=1
2blockfilterindex=1
3
4maxconnections=100
5
6rpcthreads=64
7rpcworkqueue=256
8rpcservertimeout=120
9
10zmqpubrawblockhwm=100000
11zmqpubrawtxhwm=100000
Otherwise, I’m using this node to run an lnd node (with zmq block/tx notifications) and electrumx server. There’s a medium-sized watch-only wallet that’s loaded. There’s also a small script I run with blocknotify
.
This is all running on an RPI4 with 8GB RAM, using raspbian buster w/ the OS and block indexes on an SSD.
I’d be interested if others have seen anything similar out of their nodes or if perhaps this RAM usage is normal given how I’m using it, but I am pretty sure this wasn’t happening a year ago with similar usage patterns.