Bitcoin Forum
May 21, 2024, 05:20:02 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoin Core (bitcoind) crashes on Intel Edison embedded board with 1GB RAM  (Read 4247 times)
drazvan (OP)
Full Member
***
Offline Offline

Activity: 191
Merit: 100



View Profile WWW
October 03, 2014, 09:54:37 AM
 #1

Hello everyone,

I'm trying to run Bitcoin Core on a tiny Intel Edison board (http://en.wikipedia.org/wiki/Intel_Edison). The plan is to eventually create the smallest physical Bitcoin Node (it's the size of a postage stamp!). The board has a dual core Intel Atom on board with 1 GB of RAM and 4 GB of storage, I'm using an external 32 GB USB drive to store the blockchain.

The thing is that bitcoind appears to crash after about 16 hours - I see no messages as to why in debug.log, I simply leave it running overnight and find it dead. Memory usage (when running normally) is around 350MB.

I've tried to mess with the startup options, like this:

./bitcoind -maxconnections=16 -daemon -disablewallet -datadir=/mnt

but it still crashes after less than 24 hours.

I'm using version 0.9.3, the 32-bit x86 binary.

I could always restart it when it crashes, but it just doesn't seem the right thing to do, I'd rather get to the bottom of this and see why it crashes and how to recover. I understand people have been running bitcoind on machines with less RAM (512MB Raspberry Pi for instance), so I thought 1 GB should be more than enough (if that's the reason for the crash).

Any ideas on how to proceed?

Thank  you,
Razvan
cr1776
Legendary
*
Offline Offline

Activity: 4046
Merit: 1301


View Profile
October 03, 2014, 12:19:29 PM
 #2

Do you have swap turned on? For the initial sync 1GB may not be enough (eg https://github.com/bitcoin/bitcoin/issues/3324).

So you might try the 64 bit version with swap turned on and see if that helps.
drazvan (OP)
Full Member
***
Offline Offline

Activity: 191
Merit: 100



View Profile WWW
October 03, 2014, 12:26:29 PM
 #3

It's not the initial sync, I've copied the blockchain ("blocks" and "chainstate" folders) from an in-sync node and it took a while to start, but now it's synchronized, the crash happens during normal operation, it's not using much processor time, just a ton of memory. I don't have swap enabled, I'm really not very keen on enabling swap to flash - but does it really need swap when it has 1 GB of RAM?? As I said, memory usage is around 350MB (I've restarted it a few hours ago and now it's at 293MB (the VSZ field in "ps -w").

I'm now running it with -debug and sending output to the console, so I should see it when it crashes, previous runs were without -debug.

Also, I can't run the 64-bit version, this is a 32-bit x86 system based on Intel Atom.
cr1776
Legendary
*
Offline Offline

Activity: 4046
Merit: 1301


View Profile
October 03, 2014, 03:50:10 PM
Last edit: October 03, 2014, 04:59:24 PM by cr1776
 #4

You might try limiting the number of connections to see if you can try to see if that is an issue.  I have more than 1GB, so haven't tested it that way.  

And the link was just an example where 32 bit versions were needing more ram. :-)

This is a cool project btw.
drazvan (OP)
Full Member
***
Offline Offline

Activity: 191
Merit: 100



View Profile WWW
October 03, 2014, 06:47:35 PM
 #5

Ok, I'm running it now like this

Code:
bitcoind -maxconnections=16 -daemon -disablewallet -datadir=/mnt -printtoconsole -debug -checkblocks=32 -maxorphanblocks=32 -par=1 -dbcache=4

Memory appears to be stable at around 290MB, let's see if it still crashes after 16 hours, I'll leave it running overnight.
cr1776
Legendary
*
Offline Offline

Activity: 4046
Merit: 1301


View Profile
October 03, 2014, 07:18:38 PM
 #6

Yeah, that should be a good test.  Helping to decrease the number of variables is good.  If it does crash, you might try setting maxconnections to something like 2, just to see what happens.  Buffering could be impacting memory usage on the machine.  It is hard to do much but guess.  ;-)

One thing I am not sure about also is setting dbcache=4.  I think the default is 100MB (vs 4MB), so changing that back to the default might be something to try also.  I haven't seen many people decreasing it from the default.

drazvan (OP)
Full Member
***
Offline Offline

Activity: 191
Merit: 100



View Profile WWW
October 03, 2014, 07:41:15 PM
 #7

The dbcache setting is from an IRC discussion - see http://bitcoinstats.com/irc/bitcoin-dev/logs/2014/09/18 . If things work ok with these settings, I'll remove the restrictions one by one and see what happens. I now have 8 incoming and 8 outgoing transactions, memory usage 330MB. Stable so far.
cr1776
Legendary
*
Offline Offline

Activity: 4046
Merit: 1301


View Profile
October 03, 2014, 11:10:56 PM
 #8

Fingers crossed. If you get it stable then as you say, changing it from there step by step should work.
drazvan (OP)
Full Member
***
Offline Offline

Activity: 191
Merit: 100



View Profile WWW
October 04, 2014, 10:00:21 PM
 #9

It ran fine for over 24 hours with the new settings, I'll try to take them out one by one and see if things change.

For the fun of it, I've installed X Windows and Bitcoin QT on the Edison and gave it a try (side by side with a web browser and a terminal) and you can see the result below:



So we basically have Bitcoin QT (a full visual Bitcoin node, with full verification!!) running on something the size of a postage stamp.

cr1776
Legendary
*
Offline Offline

Activity: 4046
Merit: 1301


View Profile
October 05, 2014, 11:15:12 AM
 #10

Nice!

Glad it seems stable so far.
AJRGale
Hero Member
*****
Offline Offline

Activity: 767
Merit: 500



View Profile
January 15, 2015, 03:59:44 AM
 #11

It's not the initial sync, I've copied the blockchain ("blocks" and "chainstate" folders) from an in-sync node and it took a while to start, but now it's synchronized, the crash happens during normal operation, it's not using much processor time, just a ton of memory. I don't have swap enabled, I'm really not very keen on enabling swap to flash - but does it really need swap when it has 1 GB of RAM?? As I said, memory usage is around 350MB (I've restarted it a few hours ago and now it's at 293MB (the VSZ field in "ps -w").

I'm now running it with -debug and sending output to the console, so I should see it when it crashes, previous runs were without -debug.

Also, I can't run the 64-bit version, this is a 32-bit x86 system based on Intel Atom.

i thought the Intel Edison used 2 Atom Silvermont cores, which Slivermount is x86-64 based.. so why couldn’t you use x64 on it? or was it the Quark MCU that stopped you?
drazvan (OP)
Full Member
***
Offline Offline

Activity: 191
Merit: 100



View Profile WWW
January 16, 2015, 12:06:37 PM
 #12

Well, according to https://communities.intel.com/thread/57334?start=0&tstart=0 it's not very clear if it's a 64-bit processor or a 32-bit one (their reference kernel is 32-bit and nobody's been able to make it work in 64-bit mode so far - see the thread above).
notabeliever
Hero Member
*****
Offline Offline

Activity: 724
Merit: 504


View Profile
March 16, 2017, 01:44:50 PM
 #13

How is it running now. I want to do the same with mine after I take the dust off. Can you list the setup steps with the first step is selecting the OS.
I want to use ubilinux.
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!