Pages:
Author

Topic: bitcoin core uses a lot of RAM. Recommended amount? (Read 11502 times)

newbie
Activity: 31
Merit: 0
good jod
tks
donator
Activity: 1218
Merit: 1079
Gerald Davis
Ah, that's good to know.

I'd already allowed ufw through port 8333 but hadn't forwarded the port in my router. I've done that now and currently have 11 connections, so I must be running in full node mode.  Smiley

That would be correct.   One thing I would add is you can limit the number of connections ( maxconnections=n in either the config file or on command line).  The default is 125.  Understand however you can only set a limit, the number of peers that actually connect to you will vary depending on how many peers need outgoing connections, how many addressable peers exist, and how reliable other peers see you (in terms of uptime).  It is very likely that you will not reach the max connections but that is actually a good thing, it means there is "spare capacity" for outbound only nodes.
sr. member
Activity: 294
Merit: 250
Ah, that's good to know.

I'd already allowed ufw through port 8333 but hadn't forwarded the port in my router. I've done that now and currently have 11 connections, so I must be running in full node mode.  Smiley
donator
Activity: 1218
Merit: 1079
Gerald Davis
Cheers,

Just tried it and connections=6 after startup, then increased to 8 moments after. That means I've got a two-way node running, right?

Not necessarily.  All nodes will attempt to establish 8 outbound connections (but no more).  So 8 connections could just indicate all of your connections are outbound.  9+ would indicate at least one inbound connection.
sr. member
Activity: 294
Merit: 250
Cheers,

Just tried it and connections=6 after startup, then increased to 8 moments after. That means I've got a two-way node running, right?
full member
Activity: 218
Merit: 102
legendary
Activity: 1974
Merit: 1029
How can I now check that it's running OK: i.e. that I'm connected to nodes and I have incoming and outgoing traffic?

If you're running < 0.9: bitcoind getinfo
If < 0.9.2: bitcoin-cli getinfo
If >= 0.9.2: bitcoin-cli getnetworkinfo

That doesn't show traffic, though. There are other tools you can use for that.
sr. member
Activity: 294
Merit: 250
I've got bitcoind running by using the suggested username and randomly generated password it gives you, by inserting them into a bitcoind.conf file.

It's currently using about 850MB RAM and the CPU is idling, after it used a lot of CPU for a minute or two. I assume that was when it was updating what I've missed in the blockchain over the last couple of days.

How can I now check that it's running OK: i.e. that I'm connected to nodes and I have incoming and outgoing traffic?

It's easy to see in bitcoin-qt but as bitcoind is headless I'm not sure if it's actually working as a node.
zvs
legendary
Activity: 1680
Merit: 1000
https://web.archive.org/web/*/nogleg.com
Here's my bitcoind, I restarted it not too long ago:

15194 zevus      20   0 2740M 1513M  4992 S 21.9  4.7  2h08:28 bitcoind
15195 zevus      20   0 2740M 1513M  4992 S  0.0  4.7  0:02.46 bitcoind
15196 zevus      20   0 2740M 1513M  4992 S  0.0  4.7  0:00.33 bitcoind
15197 zevus      20   0 2740M 1513M  4992 S  0.0  4.7  0:00.32 bitcoind
15198 zevus      20   0 2740M 1513M  4992 S  0.0  4.7  0:00.32 bitcoind
15199 zevus      20   0 2740M 1513M  4992 S  0.0  4.7  0:00.31 bitcoind
15200 zevus      20   0 2740M 1513M  4992 S  0.0  4.7  0:00.34 bitcoind
15201 zevus      20   0 2740M 1513M  4992 S  0.0  4.7  0:00.32 bitcoind
15202 zevus      20   0 2740M 1513M  4992 S  0.0  4.7  0:00.33 bitcoind
15211 zevus      20   0 2740M 1513M  4992 S 12.0  4.7  1h12:37 bitcoind
15212 zevus      20   0 2740M 1513M  4992 S  0.0  4.7  0:01.62 bitcoind
15213 zevus      20   0 2740M 1513M  4992 S  0.0  4.7  0:00.85 bitcoind
15214 zevus      20   0 2740M 1513M  4992 S 10.0  4.7 55:37.93 bitcoind
15215 zevus      20   0 2740M 1513M  4992 S  0.0  4.7  0:00.22 bitcoind
15216 zevus      20   0 2740M 1513M  4992 S  0.0  4.7  0:00.01 bitcoind
15217 zevus      20   0 2740M 1513M  4992 S  0.0  4.7  0:00.00 bitcoind
15218 zevus      20   0 2740M 1513M  4992 S  0.0  4.7  0:00.00 bitcoind
15219 zevus      20   0 2740M 1513M  4992 S  0.0  4.7  0:00.00 bitcoind

Essentially the base client with a few network optimizations (re: how it used to get the vast majority of the transactions and blocks on blockchain.info).

Since I restarted it not too long ago it only has abt 600 connections now.  It usually maxes out at around 2GB of active memory ~750 connections or so.  I have it set to a max of 1000 but I haven't seen it over 750 in quite a while... obv varies a bit with the # of transactions in memory...

ed: oh, wallet is disabled, & a few other changes, like significantly less stored addresses etc.
hero member
Activity: 602
Merit: 500
In math we trust.
So, anyone using bitcoin core with only 4gb RAM? If I limit my incoming or outgoing connections will my node use less RAM?



Well I have been using bitcoin core since I came into bitcoin last August and I have only 2gb of rab!
sr. member
Activity: 294
Merit: 250
Thanks,

I've copied and pasted the sample bitcoin.conf file from here:

https://en.bitcoin.it/wiki/Running_Bitcoin#Bitcoin.conf_Configuration_File

It still terminates but I haven't changed any values in .conf yet.

I've got to go out now but will have a look later.
legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
Last night I bought 8gb dual-channel Corsair Vengeance RAM from eBay, so I can't wait for that to turn up in the next couple of days.  Cheesy

I want to try running the headless version in the meantime and check out how much it uses compared to QT, but I'm a bit of a noob.

How do I execute the headless version. Is it bitcoind?

When I try running bitcoind in the terminal it runs for 30 seconds and then terminates with the following message:

It is recommended you use the following random password:
rpcuser=bitcoinrpc
rpcpassword=65cBHynVPD1Ffod8JPtMvw6eMuEsq1ASDNEYLQL1i2Ya
(you do not need to remember this password)
The username and password MUST NOT be the same.
If the file does not exist, create it with owner-readable-only file permissions.
It is also recommended to set alertnotify so you are notified of problems;
for example: alertnotify=echo %s | mail -s "Bitcoin Alert" [email protected]

Do I need to edit a configuration file to keep it running?
This is what I used to make a BTC node. http://pastebin.com/qbmSNhWK You need to make a configuration file.
sr. member
Activity: 294
Merit: 250
Last night I bought 8gb dual-channel Corsair Vengeance RAM from eBay, so I can't wait for that to turn up in the next couple of days.  Cheesy

I want to try running the headless version in the meantime and check out how much it uses compared to QT, but I'm a bit of a noob.

How do I execute the headless version. Is it bitcoind?

When I try running bitcoind in the terminal it runs for 30 seconds and then terminates with the following message:

It is recommended you use the following random password:
rpcuser=bitcoinrpc
rpcpassword=65cBHynVPD1Ffod8JPtMvw6eMuEsq1ASDNEYLQL1i2Ya
(you do not need to remember this password)
The username and password MUST NOT be the same.
If the file does not exist, create it with owner-readable-only file permissions.
It is also recommended to set alertnotify so you are notified of problems;
for example: alertnotify=echo %s | mail -s "Bitcoin Alert" [email protected]

Do I need to edit a configuration file to keep it running?
legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
If you want to let more people connect to your node, try to get at least 1Gb of ram if not use swap to increase your ram. Mine can let 80 people to connect to my node with 2gb of ram.
legendary
Activity: 1974
Merit: 1029
My 24/7 node is stable around 600 Mb.
copper member
Activity: 1498
Merit: 1528
No I dont escrow anymore.
BTC wallets tend to take up a ton of RAM (except for lite ones).  Armory once took up a whole 3 gigs and tried to keep eating more before it froze.  Upgrading will make your life so much easier.  As others have said, you can probably get a little more performance by adjusting the video memory.

Idk, bitcoin core 0.9.2 is using ~220 MB currently. Thats less than my browsers (~300 MB [FF] and ~260 MB [Chrome]).
electrum uses ~23MB
multibit ~80 MB (mostly java)
multidoge ~70 MB (mostly java)

bitcoin core (0.9.1. IIRC) also runs fine on an old machine with 2 Gigs.

This should be no problem.

Id try down-/upgrading to 0.9.1 / 0.9.2.1. and see if anything changes.
legendary
Activity: 1218
Merit: 1003
We are the champions of the night
BTC wallets tend to take up a ton of RAM (except for lite ones).  Armory once took up a whole 3 gigs and tried to keep eating more before it froze.  Upgrading will make your life so much easier.  As others have said, you can probably get a little more performance by adjusting the video memory.
donator
Activity: 1218
Merit: 1079
Gerald Davis
I'm using an AMD APU, DeathAndTaxes, without a dedicated graphics card. It automatically assigns a portion of RAM as video memory. They're designed to have faster graphics depending on the speed of your main memory.

I understood that, I believe that the amount reserved is adjustable in the bios or at least it is on most systems.  If you can get by with reserving 256MB or 512MB for the GPU then reserving more is just wasting RAM.
sr. member
Activity: 294
Merit: 250
I'm using an AMD APU, DeathAndTaxes, without a dedicated graphics card. It automatically assigns a portion of RAM as video memory. They're designed to have faster graphics depending on the speed of your main memory.

I'll check out your other points tomorrow when I'm home as I'm posting from my phone right now.

I've been hankering for 8gb RAM for a while now and this might sway it.

Oh, and I haven't made a single transaction with bitcoin core. I'm just running it as a node. I load up electrum if I need to make a transaction.

donator
Activity: 1218
Merit: 1079
Gerald Davis
A bitcoin client is a database; blocks, transactions, keys, and outputs all need to be queried to make everything work behind the scenes.  Reading from disk is horribly slow compared to main memory.  A joke among db administrators is the proper amount of memory for a database server is ... more.

700MB seems unusually high once the client is up to date.  With default options I usually see about 250MB to 300MB.  There isn't a significant difference between the memory useage of bitcoind and bitcoin-qt so I doubt that is the issue.  Is the wallet particularly large (in terms of # of addresses and transactions)?  That probably makes a significant difference.

You have a couple of options.
1) I would check your bios.  If you are just watching videos or playing casual games I doubt you need 1GB of video RAM.  There may be an option to reduce that.

2) By default both bitcoin-qt and bitcoind devote 100MB to a db cache.  This can be adjusted from 4MB to 4096MB with the command line argument -dbcache= where n is the size of the cache in MBs.  You can also put it in the bitcoin.conf file.  WARNING:  I have only ever increased it, never reduced it below the default 100MB.

3) Personally I would double the RAM on the system.  RAM is dirt cheap.  Maybe this is just the db admin in me talking but I have heard anyone complaining about having too much RAM.  CPU is rarely the bottleneck for most processes these days.
Pages:
Jump to: