Blockchain sync is way too slow

Thanks for your feedback. Then it can actually be that :thinking: I’ll setup a new one in paralel ussing an SSD and see if it’s any better! Not sure how hard would be to migrate the data though but that’s a problem of future me lol

Edit: New node is up, same specs the only difference is SSD. Let’s see how they perform.

If you have an SSD, stop and start over. If you haven’t opened any channels (which is pretty sure because you haven’t finished syncing), restarting is no problem at all. You can just add the seed and you’re ready to restart syncing.

The reason SSD is better for a node is because SSD as more reliable on the long term which is a huge benefit if you run a lightning node on top of your bitcoin node.

Maybe a little bit off-topic here but SSD is not more reliable than a regular HDD, it’s in fact the opposite. SSD’s are better because they are way way waaaaaay faster to do read/write operations than mechanical disks which is quite convenient on a 360GB database like Bitcoin blockchain.

Ok on-topic again: I’ve setup a secondary node using an SSD so I’ve got both and I can messure how long it takes to sync on both!

1 Like

Depends on your use case. If it’s in a very stable environment with no vibration and no temperature changes you’re right that HDD can last more than SSD. But in portable devices SSD is much more reliable. So, yeah maybe in an Umbrel node HDD may be better indeed, aside from the speed.

1 Like

I have been testing various pi setups and I found these things slow it down.

Things that can be fixed:

Use SSD saves around 20/40%
Use cable over wifi
Use a 8gb pi (2gb is possible but takes ages and 4gb takes about twice as slow)
Make sure you are using an official power supply as if you do not have a monitor plugged in you may not see the under voltage which error which can throttle the CPU

If I am using any of the above I just sync Bitcoin core to another machine (I use an old laptop) and copy the data and blocks folders over to the external hdd either using scp or just plugging it into the laptop itself (make sure umbrel has configured the hdd otherwise it will wipe the data when you plug it back onto the PI)

Things that can’t be fixed

TOR is just slower than HTTP

Out of all of the above sdd and then using an 8gb PI gave me the best improvements.

3 Likes

Thanks @cryptokskillz. In this particular case I’m running them on Google Cloud, not on a Pi! I could try increasing the ram though.

Is there a way to disable TOR just for the initial sync, then re-enable it once done?

1 Like

I have 2Gbps internet and an SSD and mine is still slow! Would be nice to turn off TOR for initial sync. Also would be nice to get more that 10 peers. Please help I need to kill my 2Gbps fiber pipe. :slight_smile:

Great advice!
Another “trick” also:
If you have another node in your LAN (local network), you can use it WITHOUT interruption or manually copying the data.
You can connect the new node to your local node IP and sync it from there, faster and locally.
Use the SSH command
bitcoin-cli addnode "192.168.0.6:8333" "onetry" - replace the IP with your “old” node IP and done, you will be taking blocks from your local node, smoothly.

More details here
https://chainquery.com/bitcoin-cli/addnode
and here

2 Likes

That’s a cool trick. I’ll definitely do that as I do have two nodes currently. I restored a new build with the seed for my first node but oddly its missing the bitcoin in the wallet that I transferred to the first node. The first node isn’t fully synced either as I lit it up 3 days before my new and improved node. Even with it not fully synced it shows the balance though. Wondering if HA is possible as well.

I can’t run the command from the main terminal. I’m guessing it’s because it’s being run as a docker container. Anyone know how to get access to the docker container terminal?

Here are two guides I wrote for all Umbrel users and you should always have them at hand:

1 Like

umbrel@umbrel:~/umbrel $ docker exec bitcoin bitcoin-cli addnode "192.168.1.57:8333" "onetry"

2 Likes

Thank you for this information! This seems to almost work for me. When I issue the command, my Umbrel node appears in my other nodes peer list. However, the Network field shows Unroutable and the ping time is 18.5 seconds. I suspect this is because my other node can not rout over tor. Is there a way to disable tor on my Umbrel node temporarily and test this?

No need to disable Tor. the node will sync through local IP

Good. Thanks for the hint. I must have some other problem I am hunting for.

Are you sure?
I disabled Tor by commenting out the 3 lines in bitcoin.conf:

Tor

#proxy=10.21.21.11:9050
#listen=1
#bind=10.21.21.8

and it seems to have a big impact on sync speed (X2 network bandwidth used, and more than 10 blocks received per second).

I’ll monitor to see if the speed slow down with time…

1 Like

I confirm. Blockchain sync is way faster with tor deactivated.
Then, I reactivated it once synced, and it works fine.

Just built an Umbrel node on Debian and the command @DarthCoin gave didn’t seem to work. Gave multiple trace back errors. Tried the command you gave and got permission denied. Threw sudo in front and bam. Flying thru these blocks. Thanks!

1 Like

Yep, thanks for pointing out, that command was wrong. I correct it.