My Raspi 2B is running a full node over a >20MBit/s internet provider (I subtracted another) and it seems that it only loads about 6 blocks a day which would amount to about 1GB per day.
Is it related to CPU bottleneck?
bitcoin.conf
is:
maxconnections=40
maxuploadtarget=5000
# running without swap
dbcache=100
maxorphantx=10
maxmempool=50
Output of vmstat
does not indicate any problems:
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
r b swpd free buff cache si so bi bo in cs us sy id wa st
2 2 102396 25776 18044 128556 0 0 5 3 4 3 5 4 56 35 0
This is from top
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
9 root 20 0 0 0 0 S 4,5 0,0 485:44.81 ksoftirqd/0
14220 bitcoin 20 0 586328 408024 1456 S 3,2 46,4 734:08.12 bitcoin-init
EDIT:
My sd card crashed during compiling libbitcoin
, I think. It might have been related to a swapfile
I had to enable on external USB-HDD. Probably the file was initialized before the USB was mounted and so it was on the sd card instead of on the HDD.
However, I was able to use this card again by putting on it the backup I made. Works fine so far.
I also set up a second Raspberry, a model 3B now (other one is 2B). Curiously, now both of my RPis run very different values in vmstat than before (here for model 2):
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
r b swpd free buff cache si so bi bo in cs us sy id wa st
1 1 0 31300 164228 90760 56 88 97 84 136 82 15 3 57 24 0
Model 3B:
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
r b swpd free buff cache si so bi bo in cs us sy id wa st
1 0 0 27252 6376 250844 18 36 31 42 48 20 13 1 69 16 0
I had 4GB of swap activated and reduced it to 0 now with swapoff -a
(I did not turn off dphys-swapfile
yet), free
shows 0.
Model 2:
Linux 4.19.58-v7+ (raspberrypi) 05.09.2019 _armv7l_ (4 CPU)
avg-cpu: %user %nice %system %iowait %steal %idle
15,02 0,00 3,33 24,34 0,00 57,31
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
mmcblk0 7,66 2,79 19,89 0,46 720,24 61,89 76,87 0,10 33,40 28,89 229,40 2,25 4,59
sda 4,42 112,74 52,78 83,69 241,45 815,69 15,49 0,50 6,67 13,43 2,41 3,64 49,63
avg-cpu: %user %nice %system %iowait %steal %idle
8,70 0,00 3,36 29,21 0,00 58,73
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
mmcblk0 0,00 0,00 6,40 0,00 89,60 0,00 28,00 0,02 3,09 3,09 0,00 1,25 0,80
sda 0,00 165,60 20,80 196,60 215,20 1460,00 15,41 0,91 7,24 21,73 5,71 4,19 91,00
avg-cpu: %user %nice %system %iowait %steal %idle
11,12 0,00 4,85 27,64 0,00 56,39
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
mmcblk0 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00
sda 0,00 232,40 16,00 284,00 193,60 2064,80 15,06 0,85 5,19 26,26 4,01 2,85 85,40
avg-cpu: %user %nice %system %iowait %steal %idle
9,71 0,00 3,97 29,44 0,00 56,89
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
mmcblk0 0,00 0,00 1,60 0,00 37,60 0,00 47,00 0,00 3,75 3,75 0,00 1,25 0,20
sda 0,00 218,00 18,00 263,40 201,60 1924,80 15,11 0,92 5,92 12,91 5,44 3,28 92,20
avg-cpu: %user %nice %system %iowait %steal %idle
9,17 0,00 4,05 31,53 0,00 55,25
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
mmcblk0 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00
sda 0,20 170,60 19,20 206,40 258,40 1520,00 15,77 0,91 7,28 29,88 5,18 4,05 91,40
You are right, %util
of my HDDs is very high. But since I am mostly downloading the blockchain I wonder why there is such a high amount of usage of the disk(s). Should it not just save it there? Is there a lot of calculation done with transactions to verify the blocks once they are downloaded? There should just be checked if the hash of the previous block fits the new block's entry. Then the next one can be added.
Btw.: Ethernet/USB on the Model 2 is even lower, more like 10MB/s in my experience.
I also think I am downloading more blocks at the moment than before. I have to wait some days to check it.