bullen
Posts: 283
Joined: Sun Apr 28, 2013 2:52 pm

bitcoind

Thu May 02, 2013 6:21 pm

With all these free colocation offers, I bought a dedicated RPi with 32GB memory card and compiled the latest bitcoind that has ultraprune:

> sudo apt-get install libboost1.50-dev libboost-filesystem1.50-dev libboost-system1.50-dev libboost-program-options1.50-dev libboost-thread1.50-dev libcurl4-openssl-dev libdb5.3++-dev libminiupnpc-dev
> wget https://github.com/bitcoin/bitcoin/archive/master.zip
> unzip master.zip
> cd bitcoin-master/src
> make -f makefile.unix bitcoind

Compilation takes about 1 hour, downloading the blockchain about 20 hours and the bitcoind executable is 43MB!

Other than that it runs really well compared to AWS micro instance, and since RPi colocation is free and AWS micro would be atleast 20$/month with horrible CPU IO wait; this is a nobrainer!

Goodbye AWS!
https://github.com/tinspin/rupy - A tiny Java async HTTP application server.

bullen
Posts: 283
Joined: Sun Apr 28, 2013 2:52 pm

Re: bitcoind

Fri May 03, 2013 6:11 am

Ok, so bitcoin is terminated by the raspberry OS after 5 hours because of memory:

Code: Select all

May  2 22:19:17 raspberrypi kernel: [46311.694148] net_ratelimit: 422920 callbacks suppressed
May  2 22:19:19 raspberrypi kernel: [46312.180357] kworker/0:0 invoked oom-killer: gfp_mask=0x102d0, order=3, oom_adj=0, oom_score_adj=0
May  2 22:19:19 raspberrypi kernel: [46312.180439] [<c0013a7c>] (unwind_backtrace+0x0/0xf0) from [<c0395134>] (dump_header.isra.15+0x74/0x1a0)
May  2 22:19:19 raspberrypi kernel: [46312.180490] [<c0395134>] (dump_header.isra.15+0x74/0x1a0) from [<c0091364>] (oom_kill_process+0x294/0x418)
May  2 22:19:19 raspberrypi kernel: [46312.180520] [<c0091364>] (oom_kill_process+0x294/0x418) from [<c00918cc>] (out_of_memory+0x1cc/0x29c)
May  2 22:19:19 raspberrypi kernel: [46312.180547] [<c00918cc>] (out_of_memory+0x1cc/0x29c) from [<c0094c98>] (__alloc_pages_nodemask+0x608/0x63c)
May  2 22:19:19 raspberrypi kernel: [46312.180581] [<c0094c98>] (__alloc_pages_nodemask+0x608/0x63c) from [<c00bc7f8>] (cache_alloc_refill+0x338/0x6a0)
May  2 22:19:19 raspberrypi kernel: [46312.180605] [<c00bc7f8>] (cache_alloc_refill+0x338/0x6a0) from [<c00bcc24>] (__kmalloc+0xc4/0x11c)
May  2 22:19:19 raspberrypi kernel: [46312.180636] [<c00bcc24>] (__kmalloc+0xc4/0x11c) from [<c02e6db8>] (__kmalloc_reserve+0x1c/0x64)
May  2 22:19:19 raspberrypi kernel: [46312.180661] [<c02e6db8>] (__kmalloc_reserve+0x1c/0x64) from [<c02e7740>] (__alloc_skb+0x74/0x158)
May  2 22:19:19 raspberrypi kernel: [46312.180683] [<c02e7740>] (__alloc_skb+0x74/0x158) from [<c02e89b0>] (__netdev_alloc_skb+0x98/0xd0)
May  2 22:19:20 raspberrypi kernel: [46312.180712] [<c02e89b0>] (__netdev_alloc_skb+0x98/0xd0) from [<c026aacc>] (rx_submit+0x1c/0x1f8)
May  2 22:19:20 raspberrypi kernel: [46312.180736] [<c026aacc>] (rx_submit+0x1c/0x1f8) from [<c026b184>] (kevent+0x210/0x27c)
May  2 22:19:20 raspberrypi kernel: [46312.180761] [<c026b184>] (kevent+0x210/0x27c) from [<c0035024>] (process_one_work+0x150/0x40c)
May  2 22:19:20 raspberrypi kernel: [46312.180784] [<c0035024>] (process_one_work+0x150/0x40c) from [<c0035604>] (worker_thread+0x150/0x498)
May  2 22:19:20 raspberrypi kernel: [46312.180815] [<c0035604>] (worker_thread+0x150/0x498) from [<c003a7c8>] (kthread+0x88/0x94)
May  2 22:19:20 raspberrypi kernel: [46312.180850] [<c003a7c8>] (kthread+0x88/0x94) from [<c000e9fc>] (kernel_thread_exit+0x0/0x8)
May  2 22:19:20 raspberrypi kernel: [46312.180861] Mem-info:
May  2 22:19:20 raspberrypi kernel: [46312.180869] Normal per-cpu:
May  2 22:19:20 raspberrypi kernel: [46312.180879] CPU    0: hi:  186, btch:  31 usd:   0
May  2 22:19:20 raspberrypi kernel: [46312.180903] active_anon:41475 inactive_anon:41483 isolated_anon:0
May  2 22:19:20 raspberrypi kernel: [46312.180903]  active_file:112 inactive_file:181 isolated_file:0
May  2 22:19:20 raspberrypi kernel: [46312.180903]  unevictable:12 dirty:0 writeback:7317 unstable:0
May  2 22:19:20 raspberrypi kernel: [46312.180903]  free:30314 slab_reclaimable:457 slab_unreclaimable:4189
May  2 22:19:20 raspberrypi kernel: [46312.180903]  mapped:100 shmem:0 pagetables:415 bounce:0
May  2 22:19:20 raspberrypi kernel: [46312.180954] Normal free:121256kB min:8192kB low:10240kB high:12288kB active_anon:165900kB inactive_anon:165932kB active_file:448kB inactive_file:724kB unevictable:48kB isolated(anon):0kB isolated(file):0kB present:487680kB mlocked:48kB dirty:0kB writeback:29268kB mapped:400kB shmem:0kB slab_reclaimable:1828kB slab_unreclaimable:16756kB kernel_stack:1288kB pagetables:1660kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:8387 all_unreclaimable? yes
May  2 22:19:20 raspberrypi kernel: [46312.180968] lowmem_reserve[]: 0 0
May  2 22:19:20 raspberrypi kernel: [46312.180985] Normal: 11514*4kB 6410*8kB 1461*16kB 1*32kB 0*64kB 0*128kB 0*256kB 1*512kB 0*1024kB 0*2048kB 0*4096kB = 121256kB
May  2 22:19:20 raspberrypi kernel: [46312.181029] 7639 total pagecache pages
May  2 22:19:20 raspberrypi kernel: [46312.181037] 7346 pages in swap cache
May  2 22:19:20 raspberrypi kernel: [46312.181046] Swap cache stats: add 43265, delete 35919, find 2742/2832
May  2 22:19:20 raspberrypi kernel: [46312.181052] Free swap  = 0kB
May  2 22:19:20 raspberrypi kernel: [46312.181059] Total swap = 102396kB
May  2 22:19:20 raspberrypi kernel: [46312.208849] 122880 pages of RAM
May  2 22:19:20 raspberrypi kernel: [46312.208874] 30560 free pages
May  2 22:19:20 raspberrypi kernel: [46312.208882] 2558 reserved pages
May  2 22:19:20 raspberrypi kernel: [46312.208888] 4654 slab pages
May  2 22:19:20 raspberrypi kernel: [46312.208894] 221 pages shared
May  2 22:19:20 raspberrypi kernel: [46312.208900] 7346 pages swap cached
May  2 22:19:20 raspberrypi kernel: [46312.208909] [ pid ]   uid  tgid total_vm      rss nr_ptes swapents oom_score_adj name
May  2 22:19:20 raspberrypi kernel: [46312.208963] [  142]     0   142      720        2       5      133         -1000 udevd
May  2 22:19:20 raspberrypi kernel: [46312.208983] [  248]     0   248      719        2       5      137         -1000 udevd
May  2 22:19:20 raspberrypi kernel: [46312.209003] [  270]     0   270      719        2       5      135         -1000 udevd
May  2 22:19:20 raspberrypi kernel: [46312.209020] [ 1411]     0  1411      436       12       4       16         -1000 ifplugd
May  2 22:19:20 raspberrypi kernel: [46312.209037] [ 1440]     0  1440      436       12       5       16         -1000 ifplugd
May  2 22:19:20 raspberrypi kernel: [46312.209055] [ 1684]     0  1684     6992       64       7       49             0 rsyslogd
May  2 22:19:20 raspberrypi kernel: [46312.209071] [ 1716]     0  1716     1223       39       7      391         -1000 dhclient
May  2 22:19:20 raspberrypi kernel: [46312.209088] [ 1764]     0  1764      948       11       5       31             0 cron
May  2 22:19:20 raspberrypi kernel: [46312.209105] [ 1806]   104  1806      794       39       5       34             0 dbus-daemon
May  2 22:19:20 raspberrypi kernel: [46312.209123] [ 1843]   102  1843     1377       29       6       70             0 ntpd
May  2 22:19:20 raspberrypi kernel: [46312.209140] [ 1872]     0  1872     1552       20       6       88         -1000 sshd
May  2 22:19:20 raspberrypi kernel: [46312.209157] [ 1900] 65534  1900      503        6       6       26             0 thd
May  2 22:19:20 raspberrypi kernel: [46312.209173] [ 1911]     0  1911      935        1       6       32             0 getty
May  2 22:19:20 raspberrypi kernel: [46312.209190] [ 1912]     0  1912      935        1       6       32             0 getty
May  2 22:19:20 raspberrypi kernel: [46312.209207] [ 1913]     0  1913      935        1       5       32             0 getty
May  2 22:19:20 raspberrypi kernel: [46312.209223] [ 1914]     0  1914      935        1       5       32             0 getty
May  2 22:19:20 raspberrypi kernel: [46312.209240] [ 1915]     0  1915      935        1       6       32             0 getty
May  2 22:19:20 raspberrypi kernel: [46312.209257] [ 1916]     0  1916      935        1       5       32             0 getty
May  2 22:19:20 raspberrypi kernel: [46312.209286] [ 1917]     0  1917      515        1       4       31             0 getty
May  2 22:19:20 raspberrypi kernel: [46312.209306] [ 1923]     0  1923     6886       80      11      199             0 console-kit-dae
May  2 22:19:20 raspberrypi kernel: [46312.209323] [ 1990]     0  1990     5836       82       9       44             0 polkitd
May  2 22:19:20 raspberrypi kernel: [46312.209342] [ 7086]     0  7086      438        1       6       25             0 mysqld_safe
May  2 22:19:20 raspberrypi kernel: [46312.209359] [ 7437]   107  7437    81073      245      42     6951             0 mysqld
May  2 22:19:20 raspberrypi kernel: [46312.209377] [ 7438]     0  7438      836        1       5       20             0 logger
May  2 22:19:20 raspberrypi kernel: [46312.209394] [ 7810]     0  7810     2451       43       8      118             0 sshd
May  2 22:19:20 raspberrypi kernel: [46312.209410] [ 7817]  1000  7817     2451       75       8      106             0 sshd
May  2 22:19:20 raspberrypi kernel: [46312.209427] [ 7818]  1000  7818     1421      190       6      139             0 bash
May  2 22:19:20 raspberrypi kernel: [46312.209456] [13583]     0 13583      420       18       4        3             0 minissdpd
May  2 22:19:20 raspberrypi kernel: [46312.209476] [14084]  1000 14084   124336    74874     209    16776             0 bitcoind
Is there something one can do to work around this?
https://github.com/tinspin/rupy - A tiny Java async HTTP application server.

hughht55
Posts: 1
Joined: Wed Feb 12, 2014 4:50 pm

Re: bitcoind

Wed Feb 12, 2014 4:56 pm

If you run out of RAM add a load of SWAP space. This should allow it to run on the RPi, although performance wise I haven't tested it.
https://quickbitcoin.co.uk/ - fastest way to buy bitcoins in the uk!

Return to “Networking and servers”