<p>I'm syncing my raspberry pi 4 model B, 4GB and after 4 days I'm less than 50% synced. It seems as though there is something wrong with bitcoind as there are some weird symptoms going on. The pi is running raspiblitz 1.7RC2 (64bit). I have 400mbps internet and it's connected to a new 1TB sandisk ssd.</p>
<p>First I looked at the debug.log file (<code>sudo tail -f /mnt/hdd/bitcoin/debug.log</code>) When bitoind is first started up I see blocks being added at a rate of several per second. After letting it run for awhile it slows down to one block every few seconds. I also get ping timouts and my peer connections are constantly cutting off and don't exceed ~10.</p>
<p>Trying to communicate with bitcoind also becomes slow, <code>bitcoin-cli getnetworkinfo | grep connections</code> at the start is instant but after awhile this command can take 30 seconds to execute.</p>
<p>Finally using nmon the system usage is very low except bitcoind is <strong>reading</strong> from the ssd at a rate of ~250 mbps but not doing much writing. The cpu usage is blocked by waiting io. The only thing I have tried was lowering the dbcache by 500mb thinking there wasn't enough free memory but it did not help.</p>
<p>bitcoin.conf:</p>
<pre><code># bitcoind configuration
# mainnet/testnet
testnet=0
# Bitcoind options
server=1
daemon=1
txindex=0
disablewallet=1
peerbloomfilters=1
# Connection settings
rpcuser=raspibolt
rpcpassword=****
rpcport=8332
rpcallowip=127.0.0.1
rpcbind=127.0.0.1:8332
zmqpubrawblock=tcp://127.0.0.1:28332
zmqpubrawtx=tcp://127.0.0.1:28333
# Raspberry Pi optimizations
dbcache=2560
maxorphantx=10
maxmempool=300
maxconnections=40
maxuploadtarget=5000
datadir=/mnt/hdd/bitcoin
</code></pre>
<p><a href="https://i.sstatic.net/px5Qj.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/px5Qj.png" alt="nmon" /></a></p>
<p><strong>Edit</strong>
After several restarts the sync seems to be going faster than before, even after waiting. The disk reads are much lower with some writes as well. Not sure why lower read speeds results in faster syncing...</p>
<p><a href="https://i.sstatic.net/dkmfK.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/dkmfK.png" alt="" /></a></p>
<p><strong>Eidt 2</strong></p>
<p>I noticed after &quot;leaving block file&quot; it's operating at about 1/2 speed for awhile now. Look at the time stamps in the attached screenshot. Things slow down quite a bit after that.<a href="https://i.sstatic.net/djWdI.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/djWdI.png" alt="enter image description here" /></a></p>

CC BY-SA 4.0
2021-04-18T08:01:24.780Z
Less than 50% sync'd after only 4d? So >40%? I'd say that's pretty good. It took me about 4 weeks to sync, though i desired and configured `txindex=1`. In my experience the early blocks always went quickly, and later blocks slowly (full blocks perhaps?). Also you did not say if you are sync'ing over Tor. I did most of the initial sync (IBD) without Tor because I was having unreliable peering; possibly caused by tor network congestion or outages
Donn Lee
CC BY-SA 4.0
2021-04-18T12:57:36.107Z
I'm not using tor. I lowered my dbindex yesterday and kept monitoring it. went from 50 to 70 last night. I'm pretty convinced there's something getting 'stuck' or a memory leak, etc. Woke up this morning and it's slow again.
that_guy
CC BY-SA 4.0
2021-04-18T20:39:42.300Z
Increasing `dbcache` should increase sync speeds. On a more basic level, it is maybe worth confirming the SSD is plugged into a USB3 port, and not a USB2 port. fwiw, I recently synced btcpayserver onto an rpi4 using an HDD, and it took about 2.5 days to complete.
chytrik
<bitcoind><synchronization><raspberry-pi>
Raspiblitz slow sync performance
that_guy
# Raspiblitz slow sync performance

(Asked by: username_0 on 2021-04-17)

I'm syncing my raspberry pi 4 model B, 4GB and after 4 days I'm less than 50% synced. It seems as though there is something wrong with bitcoind as there are some weird symptoms going on. The pi is running raspiblitz 1.7RC2 (64bit). I have 400mbps internet and it's connected to a new 1TB sandisk ssd.

First I looked at the debug.log file (`sudo tail -f /mnt/hdd/bitcoin/debug.log`) When bitoind is first started up I see blocks being added at a rate of several per second. After letting it run for awhile it slows down to one block every few seconds. I also get ping timouts and my peer connections are constantly cutting off and don't exceed ~10.

Trying to communicate with bitcoind also becomes slow, `bitcoin-cli getnetworkinfo | grep connections` at the start is instant but after awhile this command can take 30 seconds to execute.

Finally using nmon the system usage is very low except bitcoind is **reading** from the ssd at a rate of ~250 mbps but not doing much writing. The cpu usage is blocked by waiting io. The only thing I have tried was lowering the dbcache by 500mb thinking there wasn't enough free memory but it did not help.

bitcoin.conf:

```
# bitcoind configuration
# mainnet/testnet
testnet=0
# Bitcoind options
server=1
daemon=1
txindex=0
disablewallet=1
peerbloomfilters=1
# Connection settings
rpcuser=raspibolt
rpcpassword=****
rpcport=8332
rpcallowip=127.0.0.1
rpcbind=127.0.0.1:8332
zmqpubrawblock=tcp://127.0.0.1:28332
zmqpubrawtx=tcp://127.0.0.1:28333
# Raspberry Pi optimizations
dbcache=2560
maxorphantx=10
maxmempool=300
maxconnections=40
maxuploadtarget=5000
datadir=/mnt/hdd/bitcoin

```

[![nmon](https://i.sstatic.net/px5Qj.png)](https://i.sstatic.net/px5Qj.png)

**Edit**
After several restarts the sync seems to be going faster than before, even after waiting. The disk reads are much lower with some writes as well. Not sure why lower read speeds results in faster syncing...

[![](https://i.sstatic.net/dkmfK.png)](https://i.sstatic.net/dkmfK.png)

**Eidt 2**

I noticed after "leaving block file" it's operating at about 1/2 speed for awhile now. Look at the time stamps in the attached screenshot. Things slow down quite a bit after that.[![enter image description here](https://i.sstatic.net/djWdI.png)](https://i.sstatic.net/djWdI.png)

**Tags:** bitcoind, synchronization, raspberry-pi

> **Comments:**
> **username_1**: Less than 50% sync'd after only 4d? So >40%? I'd say that's pretty good. It took me about 4 weeks to sync, though i desired and configured `txindex=1`. In my experience the early blocks always went quickly, and later blocks slowly (full blocks perhaps?). Also you did not say if you are sync'ing over Tor. I did most of the initial sync (IBD) without Tor because I was having unreliable peering; possibly caused by tor network congestion or outages  
> **username_0**: I'm not using tor. I lowered my dbindex yesterday and kept monitoring it. went from 50 to 70 last night. I'm pretty convinced there's something getting 'stuck' or a memory leak, etc. Woke up this morning and it's slow again.  
> **username_2**: Increasing `dbcache` should increase sync speeds. On a more basic level, it is maybe worth confirming the SSD is plugged into a USB3 port, and not a USB2 port. fwiw, I recently synced btcpayserver onto an rpi4 using an HDD, and it took about 2.5 days to complete.  

---

## 0 answers

