Bitcoin Forum
May 13, 2024, 07:37:08 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoind using all my RAM  (Read 89 times)
naufragus (OP)
Newbie
*
Offline Offline

Activity: 29
Merit: 50


View Profile
April 18, 2021, 01:02:21 AM
Last edit: April 18, 2021, 01:14:20 AM by naufragus
Merited by DdmrDdmr (1)
 #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.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715585828
Hero Member
*
Offline Offline

Posts: 1715585828

View Profile Personal Message (Offline)

Ignore
1715585828
Reply with quote  #2

1715585828
Report to moderator
1715585828
Hero Member
*
Offline Offline

Posts: 1715585828

View Profile Personal Message (Offline)

Ignore
1715585828
Reply with quote  #2

1715585828
Report to moderator
nc50lc
Legendary
*
Offline Offline

Activity: 2408
Merit: 5600


Self-proclaimed Genius


View Profile
April 18, 2021, 04:28:38 AM
 #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=<n> that you're missing.

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

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
ABCbits
Legendary
*
Offline Offline

Activity: 2870
Merit: 7496


Crypto Swap Exchange


View Profile
April 18, 2021, 09:37:54 AM
Merited by naufragus (1)
 #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=<n> that you're missing.

-maxmempool=<n> default value is 300MB, which doesn't explain why OP's bitcoind RAM usage is about 4GB.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
naufragus (OP)
Newbie
*
Offline Offline

Activity: 29
Merit: 50


View Profile
April 18, 2021, 10:25:11 AM
Last edit: April 19, 2021, 12:23:36 PM by naufragus
 #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!
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!