I have the issue that my node's synchronisation is very slow. I am 14 weeks behind and it estimates to take 12 weeks to get synced. The synchronisation rate per hour is only 0,01%. I have a fast broadband connection and no other issues with this PC. It should be able to download the whole blockchain in a few hours. However, the average transfer rate is about 0,5 KB/s. Any idea what the issue might be? I am running v0.14.2 and the number of outgoing connections is 3. I have already changed cache memory to 800 MB but that didn't change anything.
Bitcoin Core sync very slow
Bitcoin Core is capable of full sync in a relatively short period of time depending mainly on the hardware.
Most of the work done is not actually downloading the blocks, it is validating them and every transaction that they contain. It not only depends on downloading the blocks but also on the quantity and complexity of every transaction. The downloading of the blocks themselves is usually not an issue if you are connected (outbound) to several nodes. I am able to download blocks generally in forty-five seconds each (which includes the request time etc. and validation as well as the transfer) when I have been offline and am catching up on my restricted local 256Kbps link. My upload speed is low, and latency is high. At the rate of one block per forty-five seconds, it would currently take over two-hundred-and-sixty-three days to complete the whole blockchain as there are more than 506822 blocks as of writing.
From my personal experience, the initial sync actually took over five days to complete on a 2.5GHz Core i5 notebook with 4GB of RAM running Fedora with Bitcoin Core v0.15.1. For that, I used ADSL2+ and never perceived the actual downloading of the blocks to be the issue.
Performance of initial sync
Performance of initial sync largely comes down to the individual performance of your computer, provided your internet is fine.
Always use the latest release version of Bitcoin Core (includes bitcoin-qt and bitcoind) downloaded from the official site at www.bitcoin.org. An upgrade is safe and easy, just safely exit Bitcoin Core first and make a new secure backup of your
wallet.dat before you upgrade.
There are some parameters that you can look at and consider depending on your system. Always make a backup of your wallet before making any changes. The parameters can be entered at the command line or generally in your
bitcoin.conf file, which you would need to exit and restart Bitcoin Core in that case to see the effect. Some things to consider that could make a difference:
I am presuming here that you are running bitcoin-qt which is the GUI version and not bitcoind.
If parameters are used in the
bitcoin.conf file, omit the leading -.
-datadir=You could have your datadir on a fast drive. If you move your whole .bitcoin folder you will need to specify this parameter on the command line. Note that if you change your datadir and do not copy the .bitcoin folder over to the new location first, it will create a new wallet and begin downloading the blockchain again from the start.
-dbcache=The default for this is 450. If you have 8GB of RAM, you could easily set this to 4096
par=The default for this setting is auto, but I do not know what the automatic setting does. You could try setting this to -1 which leaves one core free.
-banscore=You could try setting this to 10 to kick off misbehaving nodes sooner.
-listen=You could temporarily set this to 0 to disable incoming connections while you get the initial sync done. Your busy node does not need the additional work.
After the initial sync, you can revert these settings to their defaults but probably leave your datadir wherever you put it.
Some of these parameters are available as options in the bitcoin-qt Settings > Options menu.
TLDR; The short answer if you want it fast is, get a fast computer, loads of RAM, a fast HDD and, fast internet. The same as anytime you want anything fast on a computer.
In the real world, and from personal experience, using an SSD increased sync speed more than 10x on my example system from the performance noted above.
Real life example of varying system performance: I know someone personally who had to work on a quite large, but not extraordinarily large, Illustrator file. He opened it on his ~12-month-old upper spec Mac which usually performs great and, it was virtually unusable (slow to respond). Just for kicks he thought he would try the same file on a bog standard PC, opened it in Illustrator and it was completely normal. Some hardware/software builds have bottlenecks for some processes. The opposite result is probably true for some operations.
Also note, I have observed that exiting and restarting Bitcoin Core during initial sync seems to speed it up a bit for a while once it connects to nodes again.
Referencing again personal experience, syncing on Windows 10 64-bit seems to be orders of magnitude faster than syncing on Linux on the same hardware - even if Windows is running in Gnome-Boxes, it easily churns through 100 blocks per second during the initial stages of download.
If you are in serious trouble waiting to sync Bitcoin Core (a full node client) and you do not need the additional features that Bitcoin Core provides then, you may consider trying Electrum (not a full node client) which does not need to do the initial sync. On Fedora 27, getting Electrum is as simple as
sudo dnf install electrum.
I had the same problem on a very old machine (with 4 GB RAM and an Intel Core 2 Duo E8400 CPU) running Debian GNU/Linux. I read the very helpful answer of @Willtech and derived the following command:
./bitcoin-qt -banscore=10 -dbcache=1024 -listen=0
This resulted in a sync time of roughly 2 weeks on that PC. Very long indeed but much better than having to buy new hardware...
Sorry to necro this post, but these problems persist to this day, even on Satoshi:v0.20.x.
Here's a quick fix to alleviate your issues. Manually specify peer IPs to console. If you're using Bitcoin-qt, use ctrl+t to open the console, and type in:
addnode <node IP>:<node port, almost always 8333> onetry
for each IP you want.
You can get node IPs from a public node directory, such as Bitnodes. Pick a bunch of random nodes, and make sure they're not all in the same geographic location and/or from some VPS provider (i.e. Amazon, Google, etc.), and try to diversify them. It should increase your speed a bit since those nodes will assist you with peer discovery.
For some reason some nodes does not give you any blocks when you are connected to them. To see if this is happening to you, open Peers (Window > Peers) and check to see how much is received for each node. If a node does not give you any data just ban it by right clicking and selecting "Ban for 1 hour" do this until you are connected to a node that actually sends you blocks.
bitcoind connects to 10 nodes as standard but if you are unlucky you will be connected to 10 nodes that does not give you any blocks. Normally just waiting will eventually resolve this issue but banning nodes until you get connected to some fast ones is a much faster way.