Bitcoin Forum
June 14, 2024, 05:03:04 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: What is the minimum memory requirements for bitcoind?  (Read 2954 times)
kefky (OP)
Newbie
*
Offline Offline

Activity: 50
Merit: 0



View Profile
February 14, 2015, 10:17:30 AM
 #1

I've installed bitcoind 0.9.4 on a VPS with 512MB memory (+1024MB swap) but the deamon isn't  too responsive. The full blockchain is already downloaded and it seems to be running stable but it responds to RPC calls very slow, if it all. 512 MB ram isn't enough for it?
Newar
Legendary
*
Offline Offline

Activity: 1358
Merit: 1001


https://gliph.me/hUF


View Profile
February 14, 2015, 10:43:34 AM
 #2


It runs, so it's enough.  Grin

I had it running until very recently on a RaspberryPi. Just don't expect to do much else with it.

I take it you have port 8333 open; how many connections do you get out of it?

OTC rating | GPG keyid 1DC91318EE785FDE | Gliph: lightning bicycle tree music | Mycelium, a swift & secure Bitcoin client for Android | LocalBitcoins
ranochigo
Legendary
*
Offline Offline

Activity: 2982
Merit: 4193



View Profile
February 14, 2015, 10:58:59 AM
 #3

512mb would be the bare minimum to run Bitcoind. To run it with some connections, try using 1GB of ram. It is not possible to upgrade ram on this version of raspberry pi however. Do note that SDcard's lifespan will be reduced under heavy load of read and writes.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
Newar
Legendary
*
Offline Offline

Activity: 1358
Merit: 1001


https://gliph.me/hUF


View Profile
February 14, 2015, 11:36:44 AM
 #4

[...] Do note that SDcard's lifespan will be reduced under heavy load of read and writes.

That's where a cheap external HDD comes in handy.  Wink

OTC rating | GPG keyid 1DC91318EE785FDE | Gliph: lightning bicycle tree music | Mycelium, a swift & secure Bitcoin client for Android | LocalBitcoins
kefky (OP)
Newbie
*
Offline Offline

Activity: 50
Merit: 0



View Profile
February 14, 2015, 11:38:46 AM
 #5

I take it you have port 8333 open; how many connections do you get out of it?

Sure 8333 is open.
Between 20-40.
shorena
Copper Member
Legendary
*
Offline Offline

Activity: 1498
Merit: 1520


No I dont escrow anymore.


View Profile WWW
February 14, 2015, 12:42:46 PM
 #6

I take it you have port 8333 open; how many connections do you get out of it?

Sure 8333 is open.
Between 20-40.

You could reduce the memory footprint via the confic file.

e.g.

Code:
disablewallet=1
dbcache=4

Im not really here, its just your imagination.
kefky (OP)
Newbie
*
Offline Offline

Activity: 50
Merit: 0



View Profile
February 14, 2015, 12:46:35 PM
 #7


Code:
disablewallet=1
dbcache=4

Thanks, I'll try these settings.
kefky (OP)
Newbie
*
Offline Offline

Activity: 50
Merit: 0



View Profile
February 14, 2015, 02:31:34 PM
 #8

Code:
dbcache=4

"dbcache" option is not suggested:

https://gitorious.org/bitcoin/luke-jr-bitcoin/commit/2e3c76bf9857f5ac2814df9fd6b9b5b7a7eff88a
shorena
Copper Member
Legendary
*
Offline Offline

Activity: 1498
Merit: 1520


No I dont escrow anymore.


View Profile WWW
February 14, 2015, 02:51:51 PM
 #9


I dont know, gmaxwell DnT suggested it when I someone else had problems with memory and it worked like a charm. Let me dig that thread up. See the thread linked below[1]. I remember that it reduced the amount of RAM my node needs, while I had problems with 2 GB before.

free -m:
Code:
             total       used       free     shared    buffers     cached
Mem:          2048       2018         29          5          0       1592
-/+ buffers/cache:        425       1622
Swap:            0          0          0

[1] https://bitcointalk.org/index.php?topic=659040.0

Im not really here, its just your imagination.
xingming
Sr. Member
****
Offline Offline

Activity: 322
Merit: 250


Writing to dispel society's myths.


View Profile
February 14, 2015, 04:41:20 PM
 #10

Bitcoin-Qt (a.k.a. Bitcoin Core), the reference implementation, is mostly written in C++. There are other clients written in different languages, Python and Java are both popular.

The c++ for a huge softwaer will need about at least 1.5 GB ram to run normally

btchris
Hero Member
*****
Offline Offline

Activity: 672
Merit: 504

a.k.a. gurnec on GitHub


View Profile WWW
February 14, 2015, 05:15:47 PM
 #11


I dont know, gmaxwell DnT suggested it when I someone else had problems with memory and it worked like a charm. Let me dig that thread up. See the thread linked below[1]. I remember that it reduced the amount of RAM my node needs, while I had problems with 2 GB before.

It used to be that Berkeley DB was used for the wallet, block indexes and tx indexes. -dbcache affected the in-memory cache for Berkeley DB. Version 0.8.0 moved the block and tx indexes to Google's LevelDB (it's faster), and kept the wallet in Berkeley DB format (presumably so that the wallet.dat format remained unchanged for backwards compatibility). In 0.8.0, -dbcache affected both the Berkeley DB and LevelDB caches.

The patch referenced above was introduced in 0.8.2, and it modified the -dbcache option so that it only affected the LevelDB caches (since the wallet is relatively small, there shouldn't be any need to adjust it's cache size, so it was hard-coded to 1 MiB). The default -dbache in 0.8.0 was 25 MiB.

Version 0.9.0 increased the default to 100 MiB. It has a hard-coded minimum of 4 MiB (and a maximum of 1 GiB on 32-bit machines, 4 GiB on 64-bit machines). I'd imagine setting it down to 4 MiB would have a noticeable affect.
sho_road_warrior
Member
**
Offline Offline

Activity: 114
Merit: 10

PMs blocked, send answers to main.


View Profile
February 15, 2015, 06:01:02 AM
 #12

-snip-

It used to be that Berkeley DB was used for the wallet, block indexes and tx indexes. -dbcache affected the in-memory cache for Berkeley DB. Version 0.8.0 moved the block and tx indexes to Google's LevelDB (it's faster), and kept the wallet in Berkeley DB format (presumably so that the wallet.dat format remained unchanged for backwards compatibility). In 0.8.0, -dbcache affected both the Berkeley DB and LevelDB caches.

The patch referenced above was introduced in 0.8.2, and it modified the -dbcache option so that it only affected the LevelDB caches (since the wallet is relatively small, there shouldn't be any need to adjust it's cache size, so it was hard-coded to 1 MiB). The default -dbache in 0.8.0 was 25 MiB.

Version 0.9.0 increased the default to 100 MiB. It has a hard-coded minimum of 4 MiB (and a maximum of 1 GiB on 32-bit machines, 4 GiB on 64-bit machines). I'd imagine setting it down to 4 MiB would have a noticeable affect.

Makes sense, thanks for the explanation. I was sure I did not imagine it reducing the memory impact, but its almost 6 months now so I wasnt entirely sure.

┏(-_-)┛┗(-_- )┓┗(-_-)┛┏(-_-)┓
kefky (OP)
Newbie
*
Offline Offline

Activity: 50
Merit: 0



View Profile
February 15, 2015, 10:02:18 AM
 #13

I'd imagine setting it down to 4 MiB would have a noticeable affect.


But if I use "disablewallet=1" the "dbcache=4" option won't reduce the needed amount of RAM, or am I wrong?

(By the way I've upgraded the RAM size to 1024 MB of my VPS and now bitcoind is more responsive, but still far from the perfect!)
btchris
Hero Member
*****
Offline Offline

Activity: 672
Merit: 504

a.k.a. gurnec on GitHub


View Profile WWW
February 15, 2015, 01:41:02 PM
 #14

But if I use "disablewallet=1" the "dbcache=4" option won't reduce the needed amount of RAM, or am I wrong?

(By the way I've upgraded the RAM size to 1024 MB of my VPS and now bitcoind is more responsive, but still far from the perfect!)

I guess my post was too long, sorry Wink

disablewallet=1 disables the wallet cache, which is 1MiB. It won't save you much, but it doesn't hurt.

dbcache=4 decreases the other caches to 4 MiB, which by default total 100 MiB. Setting this too low might decrease performance, though... I don't know what a good number would be, but if DnT and shorena both say 4 is a good starting point, I'd trust them, and then maybe tweak it up a bit if you have any spare ram.
shorena
Copper Member
Legendary
*
Offline Offline

Activity: 1498
Merit: 1520


No I dont escrow anymore.


View Profile WWW
February 15, 2015, 05:21:17 PM
 #15

But if I use "disablewallet=1" the "dbcache=4" option won't reduce the needed amount of RAM, or am I wrong?

(By the way I've upgraded the RAM size to 1024 MB of my VPS and now bitcoind is more responsive, but still far from the perfect!)

I guess my post was too long, sorry Wink

disablewallet=1 disables the wallet cache, which is 1MiB. It won't save you much, but it doesn't hurt.

dbcache=4 decreases the other caches to 4 MiB, which by default total 100 MiB. Setting this too low might decrease performance, though... I don't know what a good number would be, but if DnT and shorena both say 4 is a good starting point, I'd trust them, and then maybe tweak it up a bit if you have any spare ram.

Its a bit unresponsive from time to time yes, but it holds 50 connections without any issues. Its just that the shells scripts I use to query data from bitcoind do not finish sometimes within 30 seconds. This will result in "unknown" values and as a consequence white lines in the pictures the node generates. E.g. last night at ~0050.


Im not really here, its just your imagination.
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!