Bitcoin Forum
December 14, 2024, 06:33:41 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoin Full node and LN into RPi 3  (Read 281 times)
osoverflow (OP)
Full Member
***
Offline Offline

Activity: 547
Merit: 105


Bitcoin ya no es el futuro, es el presente


View Profile WWW
May 10, 2019, 01:02:57 PM
Merited by bones261 (2), ABCbits (1)
 #1

HI! I'm trying to run bitcoind in a full node way into a RPi3.

I mounted an external disk with enough space, and started the bitcoind service, but after a day syncing the chain, everything crashed, I suppose is because a global out of memory problem.

This is my bitcoin.conf file, do you know how to run the process with low memory consumption?
Code:
server=1
listen=1
daemon=1
txindex=1
dbcache=100
logips=1
maxconnections=40
maxuploadtarget=5000
maxorphantx=10
maxmempool=50
upnp=1
rest=1
walletrbf=1
usehd=1
zmqpubhashblock=tcp://127.0.0.1:29000
zmqpubhashtx=tcp://127.0.0.1:29000
zmqpubrawblock=tcp://127.0.0.1:29000
zmqpubrawtx=tcp://127.0.0.1:29000

Bienvenidos a la nueva tecnología
DaCryptoRaccoon
Hero Member
*****
Offline Offline

Activity: 1241
Merit: 623


OGRaccoon


View Profile
May 10, 2019, 01:07:35 PM
Merited by bones261 (2), ABCbits (1)
 #2

Did you add enough swap space? this can cause the RPI to crash.

To add a 1gb swap file, in /swapfile:

Code:
sudo dd if=/dev/zero of=/swapfile bs=1024M count=1000
sudo mkswap /swapfile
sudo swapon /swapfile


┏━━━━━━━━━━━━━━━━━┓
┃     𝔱𝔥𝔬𝔲 𝔰𝔥𝔞𝔩𝔱 𝔴𝔬𝔯ⱪ 𝔣𝔬𝔯 𝔶𝔬𝔲𝔯 𝔟𝔞𝔤𝔰       ┃
┃                ➤21/M                      ┃
┃ ███▓▓  ███▓▓  ███▓▓  ███▓▓┃
osoverflow (OP)
Full Member
***
Offline Offline

Activity: 547
Merit: 105


Bitcoin ya no es el futuro, es el presente


View Profile WWW
May 10, 2019, 04:02:01 PM
 #3

Did you add enough swap space? this can cause the RPI to crash.

To add a 1gb swap file, in /swapfile:

Code:
sudo dd if=/dev/zero of=/swapfile bs=1024M count=1000
sudo mkswap /swapfile
sudo swapon /swapfile



Good catch! I will create it. I also read about enabling zram, to compress ram, but my linux version (Libre Elec) has no support for that.

Bienvenidos a la nueva tecnología
ABCbits
Legendary
*
Offline Offline

Activity: 3094
Merit: 8176


Crypto Swap Exchange


View Profile
May 10, 2019, 06:33:17 PM
Merited by bones261 (2)
 #4

Alternatively, you can configure Bitcoin Core to use less RAM by modify mempool, UTXO cache and signature cache size.
Example from https://bitcoin.stackexchange.com/a/50743 :

Code:
-blocksonly -dbcache=20 -maxsigcachesize=4 -maxconnections=4 -rpcthreads=1

Take note the sync process will be longer due to less cache used.

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Rath_
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1876
Merit: 3139



View Profile
May 10, 2019, 09:18:12 PM
 #5

Why don't you sync with the chain on your PC? The processing power of Pi restricts the speed of sync and this might be also a workaround for your problem.
osoverflow (OP)
Full Member
***
Offline Offline

Activity: 547
Merit: 105


Bitcoin ya no es el futuro, es el presente


View Profile WWW
May 14, 2019, 09:07:32 PM
 #6

Why don't you sync with the chain on your PC? The processing power of Pi restricts the speed of sync and this might be also a workaround for your problem.

I want to test all the process in a weak environment to tune it Smiley

Bienvenidos a la nueva tecnología
DaveF
Legendary
*
Offline Offline

Activity: 3696
Merit: 6686


Crypto Swap Exchange


View Profile WWW
May 15, 2019, 11:22:03 AM
 #7

Why don't you sync with the chain on your PC? The processing power of Pi restricts the speed of sync and this might be also a workaround for your problem.

I want to test all the process in a weak environment to tune it Smiley

Some thoughts:

The question becomes then how weak an environment do you want?

You are using an external drive, but you can get 512GB good fast name brand SD cards for ~$125 USD (Samsung / Sandisk / PNY) you can get off brand ones that are still OK for less. But their performance sucks.

You are using an external drive, which is good. BUT are you using a 5400 RPM or a 7200 RPM or a SSD?

Setting up the swap space and configuring node are going to be ALMOST the same process, BUT not 100% the same. You are going to get different answers in what is going to get you the best way to do it depending on what else you have. With a good fast SD & SSD you can use more swap with a smaller performance hit to other I/O  operations then with a generic slow SD and 5400 RPM drive.

And don't get me started on USB -> SATA adapter quality & speed.

-Dave

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
osoverflow (OP)
Full Member
***
Offline Offline

Activity: 547
Merit: 105


Bitcoin ya no es el futuro, es el presente


View Profile WWW
May 20, 2019, 09:53:01 PM
Merited by bones261 (2)
 #8

Why don't you sync with the chain on your PC? The processing power of Pi restricts the speed of sync and this might be also a workaround for your problem.

I want to test all the process in a weak environment to tune it Smiley

Some thoughts:

The question becomes then how weak an environment do you want?

You are using an external drive, but you can get 512GB good fast name brand SD cards for ~$125 USD (Samsung / Sandisk / PNY) you can get off brand ones that are still OK for less. But their performance sucks.

You are using an external drive, which is good. BUT are you using a 5400 RPM or a 7200 RPM or a SSD?

Setting up the swap space and configuring node are going to be ALMOST the same process, BUT not 100% the same. You are going to get different answers in what is going to get you the best way to do it depending on what else you have. With a good fast SD & SSD you can use more swap with a smaller performance hit to other I/O  operations then with a generic slow SD and 5400 RPM drive.

And don't get me started on USB -> SATA adapter quality & speed.

-Dave


For me the task is to use a single PI for multiple tasks. I have a RPi3 with Kodi, and bought an external 7200rpm 8TB disk and connected to it to store my media, and also to serve as a NAS for my home. And I was wondering if it could serve for bitcoin and lightning node, just after I got my new internet connection.

It happens that it can!

I only created the swap file, and started bitcoind with optimized parameters, and it is syncing, very slow, but advancing.

I'm not in hurry for it to finish, but when it finish, I think in couple weeks, I will setup the lightning node there.

Bienvenidos a la nueva tecnología
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!