I'm running a geth node on slow hardware. At the current rate of progress it could be several days before I can download all the blockchain. Is there a way to get it to synchronise more quickly?
EDIT: Latest Geth now defaults to cache=1024, so if you have more RAM you can try increase the cache.
--fast but you probably also need
--cache=1024. Without it, you are running with the default which is
--cache=128 (Geth 1.6.7).
A 50% speed increase is possible just by increasing the cache.
If you are starting from the beginning, use:
geth --fast --cache=1024
If you already have some of the blockchain, use:
Depending on your RAM, you can also try with higher values, like
If you are using the geth client, there are some things you can do to speed up the time it takes to download the Ethereum blockchain. If you choose to use the --fast flag to perform an Ethereum fast sync, you will not retain past transaction data.
You cannot use this flag after performing all or part of a normal sync operation, meaning you should not have any portion of the Ethereum blockchain downloaded before using this command. See this Ethereum Stack.Exchange answer for more information.
Below are some flags to use when you want to sync your client more quickly.
This flag enables fast syncing through state downloads rather than downloading the full block data. This will also reduce the size of your blockchain dramatically. NOTE: --fast can only be run if you are syncing your blockchain from scratch and only the first time you download the blockchain for security reasons. See this Reddit post for more information.
Megabytes of memory allocated to internal caching (min 16MB / database forced). Default is 16MB, so increasing this to 256, 512, 1024 (1GB), or 2048 (2GB) depending on how much RAM your computer has should make a difference.
There are 2 ways using
geth, that i am aware of
1. sync with the
you can start with
geth --fast which Enables fast syncing through state downloads
import command in geth
to do this, you need an already synced blockchain from geth and it has to be exported with
geth export filename, which can be imported to
geth import filename
To synchronize geth the fastest way, i recommand to use geth 1.4.6. Older versions are way slower.
Spoiler: HDD synch is very slow.
There are two modes for synchronization:
- geth --fast --cache 1024 --jitvm: this method is very fast on powerful computer (25min on my system i7 quad core 16Go, SSD and Gbit/s bandwidth). It uses 4.5GB on disk
- geth --cache 1024 --jitvm: this method is slower (3h on my system i7 quad core 16Go, SSD and Gbit/s bandwidth). It uses 21GB on disk
Tip 1: If you have already a geth synchronized on a computer, you could backup the chaindata directory and copy it for another computer. I check on OS X, Linux and Windows (all in 64bits version).
Tip 2: The export/import method works. The import duration is very long because it checks all transactions.
Tip 3: If you have enough RAM and no SSD, use your RAM as ramdisk and select your ramdisk with the --datadir option. You need 4.2GB for a fast synch. When the synch is completed, copy the directory chaindata on its original place:
- ~/.ethereum on linux
- ~/Library/Ethereum on os x
- %APPDATA%\Ethereum on Windows
I have made many benchmarks on different versions for this question: How much faster is it to sync with --jitvm?
Note 1: if you use a HDD, it seems that the synchronization is slower. The fast method was 4h on my system.
Note 2: RAMDiskCreator on OS X is a freeware to create a RAM Disk.
jitvm and cache options have a minor impact on my bench
3. sync on a fast machine and copy chaindata directory to your slow machine The chaindata is portable across architectures. So, sync, stop the node cleanly, transfer the chaindata directory (replacing your old one), and start the node on another machine. To minimize risk, use identical versions of geth on both machines. (I did this for x86_64 -> armv7h successfully with Geth 1.4.5, others did too.)
protected by Waqar Lim May 15 '17 at 9:07
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?