How to tell bitcoind to use more memory and CPU

6

1

I just updated my node to 0.12 and its going through its long verification process but I noticed that its not using very much memory/cpu

pi         602 10.5 19.4 352220 184312 ?       Ssl  21:57   1:28 /usr/local/bin/bitcoind -datadir=/home/pi/bitcoinData/.bitcoin -daemon

How can I configure it to optimise all available memory and cpu? I recall a option to bump up the cache from a default of 50 or 100mb but cannot find the option.

I have a 1GB PI 2. Any recommendations on maximum memory to use? I was thinking 900mb if possible.

Thank you for your tips, and any optimizations to make this run best would be great!

xenostar

Posted 2016-05-17T22:17:12.643

Reputation: 61

Answers

6

It will by default use all CPU cores available.

However, if the database cache is too small, your node will spend its time fetching and writing database entries from/to disk, rather than verification

You can set the size of the database cache using a bitcoin.conf setting dbcache=N, where N is the number of megabytes of RAM.

Pieter Wuille

Posted 2016-05-17T22:17:12.643

Reputation: 54 032

Thank you very much Pieter! I did not expect you to answer the question, thanks for taking the time out of your day to solve a minor issue!

When upgrading to 12.0 from 11.99, how long do you think the verification process should take for all blocks on a RPi2?

error: couldn't connect to server

Im getting that after running bitcoin-cli getinfo and its said that for approx 5 hours now. – xenostar 2016-05-18T04:27:19.927

@Murch may be able to answer how long, I think it took him several weeks. Not sure what dbcache setting he used. Note that a Pi is always going to be somewhat memory deprived. The UTXO set is 1.5 GB on disk and a multiple of that in memory, so it will be (re)loading parts of that constantly as well.Jannes 2016-05-18T11:20:01.110

@xenostar: I ran a full synchronization on a Raspberry Pi 2 with 12rc01, IIRC it took more than four weeks.Murch 2016-06-13T15:18:48.940