[Ethereum] How to get a geth node to download the blockchain quickly

go-ethereumsynchronization

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?

Best Answer

Don't forget to use an SSD

If you're able to, using an NVMe SSD is even better.

If you have limited space on SSD see Can chaindata be split across two (or more) locations?

That said, the Ethereum state is large and getting larger. Be patient and it will be worth it.


Prior answer

Don't forget --cache

Everyone mentions --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: geth --cache=1024

Depending on your RAM, you can also try with higher values, like --cache=2048.

Source

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.

Note

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.

--fast

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.

--cache=1024

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.

Related Topic