Author

Topic: Bitcoind using all my RAM (Read 108 times)

newbie
Activity: 29
Merit: 50
April 18, 2021, 05:25:11 AM
#4
There's a documentary ...
No, it's not normal behavior. Can you share command you use to run bitcoind?

Have you restarted the node after adding the configurations? Because you have to.

Thanks for that link reference! That is really good.
I did restart the node after changing configs.
Will reboot the server and start ONLY bitcoind to be sure that no other service is interfering with its RAM usage, just to be sure..
Will also try to decrease mempool db a little from defaults.

No, it's not normal behavior. Can you share command you use to run bitcoind?

That is a Manjaro system updated in the beginning of the month with latest version.
The config file is located in a usd hd together with blockchain data.
The command I use to start the daemon as a normal user is:
Code:
% bitcoind -conf=/media/usbhd/blockchain/bitcoin.conf

Now that I know that is not the expected RAM usage, I will try to investigate it in the following days.

Thanks for the answers. In the meantime, I will be checking this thread and will report later.
Thanks guys!


PS: I rebooted the server and mostly the excessive ram usage was gone. bitcoind does seem to build cached memory, but that is not a problem.
I started a shell daemon which monitors mempool median fees through bitcoin-cli and bitcoind used memory increased. The cause seems to be my shell daemon probably, but RAM usage does not go down when it is killed.. Will check into that... Cheers!
legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
April 18, 2021, 04:37:54 AM
#3
No, it's not normal behavior. Can you share command you use to run bitcoind?

But seeing that you've already tweaked most of the mentioned configurations, it's only -maxmempool= that you're missing.

-maxmempool= default value is 300MB, which doesn't explain why OP's bitcoind RAM usage is about 4GB.
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
April 17, 2021, 11:28:38 PM
#2
There's a documentary specifically written for that purpose: https://github.com/bitcoin/bitcoin/blob/master/doc/reduce-memory.md
But seeing that you've already tweaked most of the mentioned configurations, it's only -maxmempool= that you're missing.

Have you restarted the node after adding the configurations? Because you have to.
newbie
Activity: 29
Merit: 50
April 17, 2021, 08:02:21 PM
#1
I am setting a home server for multiple purposes.
However, bitcoind is using a lot of RAM.
I wish to limit resource usage as I would prefer more RAM
was available for other tasks..

I tried setting some configs as per the following post:
https://bitcoin.stackexchange.com/questions/50580/how-to-run-bitcoind-in-a-low-memory-environment

Is there anything else I can do or is that just bitcoind normal behaviour to consume as much RAM as the kernel will let it have?

Here are my configs:
Code:
datadir=/media/usbhd/blockchain
txindex=1
rpcuser=XXX
rpcpassword=YYY
dbcache=300
onlynet=onion
listen=0
listenonion=0
maxconnections=8
proxy=127.0.0.1:9050
discover=0

Code:
% free -h
               total        used        free      shared  buff/cache   available
Mem:           5,7Gi       4,1Gi       1,1Gi       6,0Mi       419Mi       1,3Gi
Swap:          3,9Gi       660Mi       3,3Gi

And here is htop output:
https://imgur.com/a/wXjtqPL

OBs: the node is fully sync'ed.
Jump to: