Author

Topic: Full node on Raspberry 3: Out of memory (Read 172 times)

full member
Activity: 199
Merit: 128
January 04, 2020, 07:09:50 AM
#7
You need to configure your Bitcoin Core to use less resource. Try this answer https://bitcoin.stackexchange.com/a/50743

Awesome, I left out the mempool and lowered the signaturecache as well, and now memory usage flows around 500MB (I have 1GB).

Looks like I can move on, many thanks everyone!
legendary
Activity: 2646
Merit: 1722
https://youtu.be/DsAVx0u9Cw4 ... Dr. WHO < KLF
January 04, 2020, 06:13:20 AM
#6
It looks like compile may run out of memory.

You could try 'free -m' option to check your free memory then if you need to you can add some swap space with the code below.

You many need to use sudo command for the swap space.

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


After compiling turn OFF swap

Code:
Code:
sudo swapoff /swapfile
sudo rm /swapfile

I'd be inclined to make the swapfile persistent, I usually do ...

Code:
sudo dd if=/dev/zero of=/swapfile bs=64M count=16

where count=4 = 256 MB , count=8 = 512 MB , count=16 = 1G , count=32 = 2G etc.

Code:
sudo chmod 600 /swapfile

Code:
sudo mkswap /swapfile
sudo swapon /swapfile

make swapfile persistent ...

Code:
sudo nano /etc/fstab

add at base of file ...

Code:
/swapfile   none    swap    sw    0   0

...

also for server ...

Code:
sudo nano /etc/sysctl.conf

add at base of file ...

Code:
vm.swappiness = 60
vm.vfs_cache_pressure = 50

desktop !
vm.swappiness = 10

check with ...

Code:
cat /proc/sys/vm/vfs_cache_pressure
cat /proc/sys/vm/swappiness

other useful commands ...

check for existing swapfile ...

Code:
sudo swapon -s

filesystem (diskspace) ...

Code:
df -h

...

running ...

Code:
top

in a new terminal window (or Screen) is always useful for monitoring %CPU and %MEM to gain a better indication of what is actually happening.

I've not run an RPi in a while, although as Carlton has said an SSD is the safer bet.

 Smiley
legendary
Activity: 3430
Merit: 3080
January 04, 2020, 03:37:50 AM
#5
add a 1gb swap file

if you can avoid it, don't create the swapfile on the SD card but instead on an external disk, preferably an SSD (swapping memory pages between the swapfile and RAM is a performance bottleneck). The constant writing to the SD card will kill the card far quicker than you would expect otherwise.
hero member
Activity: 1220
Merit: 612
OGRaccoon
January 03, 2020, 04:04:02 PM
#4
It looks like compile may run out of memory.

You could try 'free -m' option to check your free memory then if you need to you can add some swap space with the code below.

You many need to use sudo command for the swap space.

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


After compiling turn OFF swap

Code:
Code:
sudo swapoff /swapfile
sudo rm /swapfile
legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
January 03, 2020, 02:06:03 PM
#3
You need to configure your Bitcoin Core to use less resource. Try this answer https://bitcoin.stackexchange.com/a/50743
legendary
Activity: 3500
Merit: 6320
Crypto Swap Exchange
January 03, 2020, 08:10:17 AM
#2
There is an entire discussion on running on a RPi here: https://bitcointalksearch.org/topic/advice-on-raspberry-pi-hardware-for-running-full-btc-node-5196287

It's not simple but you can do it with some tinkering.

-Dave
full member
Activity: 199
Merit: 128
January 03, 2020, 07:09:38 AM
#1
Hi,

As the topic states:

1. I have a Raspberry 3+
2. I downloaded the binaries from bitcoincore.org
3. I have a simple bitcoin.conf which only states it should run as a daemon.
4. Everything fully updated.

And this happens:
2020-01-03T11:59:38Z UpdateTip: new best=00000000000000e90ef3bf0107078c5b16c1fd576ba131ee75ecda4ad4531eae height=235028 version=0x00000002 log2_work=69.96869 tx=17366192 date='2013-05-07T20:21:55Z' progress=0.035347 cache=660.8MiB(5855425txo)
2020-01-03T12:00:02Z Error: Out of memory. Terminating.

Anyone any clue?

Jump to: