Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: velhoti on January 03, 2020, 10:16:03 PM



Title: bitcoin.conf Optimized to Download the Blockchain
Post by: velhoti on January 03, 2020, 10:16:03 PM
I am sync a full node but the download process is painfully slow, in a week I downloaded only ~95GB. I am using a pretty simple configuration:

Code:
txindex=1
#dbcache=2048

datadir=/<HDD_PATH>/.bitcoin
wallet=/<HDD_PATH>/.bitcoin/wallets/

rpcuser=<USER>
rpcpassword=<PASSWORD>


Is there a optimized configuration of bitcoin.conf focusing in download faster the blockchain?

My PC specs are not high, it is a i3-2375M CPU @ 1.50GHz with 4GB RAM. I also storing the blockchain in a external HDD USB 2.0, not sure if is a bottleneck. My bandwidth is 25 GB, but I believe that it is not a problem since I can download a 300GB file much more fast (maybe a day) that Bitcoin.

I've heard about the parameter -dbcach and tried it increasing to 2048, roughly half of my memory, but seems to have no effect here.


Title: Re: bitcoin.conf Optimized to Download the Blockchain
Post by: LoyceMobile on January 03, 2020, 10:20:58 PM
The main problems are USB, HDD and low RAM.

I don't think software configuration matters much as long as your not upgrading.


Title: Re: bitcoin.conf Optimized to Download the Blockchain
Post by: Rath_ on January 03, 2020, 10:25:11 PM
My bandwidth is 25 GB, but I believe that it is not a problem since I can download a 300GB file much more fast (maybe a day) that Bitcoin.

Keep in mind that your node needs to verify each block which is a CPU intensive task. Your disk also has to perform a lot of operations per second. Using an SSD makes a difference. 25 GB of bandwidth doesn't sound right. That's quite low.


Title: Re: bitcoin.conf Optimized to Download the Blockchain
Post by: velhoti on January 03, 2020, 10:27:54 PM
If I download in my internal HDD with SATA and after copy the entire folder to the external HDD, will work, can be faster?


Title: Re: bitcoin.conf Optimized to Download the Blockchain
Post by: Rath_ on January 03, 2020, 10:34:26 PM
If I download in my internal HDD with SATA and after copy the entire folder to the external HDD, will work, can be fastest?

It should be a bit faster since USB 2.0 is a huge bottleneck itself. Still, your RAM, CPU and HDD will slow the whole process down. It will take you ages to move the blockchain data to the external drive.


Title: Re: bitcoin.conf Optimized to Download the Blockchain
Post by: HCP on January 03, 2020, 10:37:12 PM
Most likely it will be "faster"... but bear in mind that is a relative term. If the internal drive is still a HDD and not an SSD, then the gains aren't likely to be very big.

Also, your CPU+RAM is relatively weak... That might be causing RAM Paging, which will be placing further strain on your HDD and memory controllers etc.


Title: Re: bitcoin.conf Optimized to Download the Blockchain
Post by: velhoti on January 03, 2020, 10:43:44 PM
I edited the post changing "fastest" to "faster", sorry the error. This is really what I want, since I won't upgrade my specs now a bit increase in velocity is what i can have.


Title: Re: bitcoin.conf Optimized to Download the Blockchain
Post by: LoyceMobile on January 03, 2020, 10:56:14 PM
This is really what I want, since I won't upgrade my specs
You may be surprised how cheap a ram upgrade would be. If your PC can handle it, it'll be a large overall improvement, not just for Bitcoin Core. The same if you replace your hdd for a ssd: you'll never want to go back.


Title: Re: bitcoin.conf Optimized to Download the Blockchain
Post by: BitMaxz on January 03, 2020, 11:19:18 PM
Agree with the above increasing ram memory will improve your syncing blockchain.

And edit dbcache and remove the "#" (to enable it) under your bitcoin.conf to speed up the syncing.
Follow this suggested below.

If you have a lot of RAM (4 or more), you can open the bitcoin.conf file and add the following line:
Code:
dbcache=<n>
where <n> is an amount of memory in MB. If you have 4 GB RAM, I suggest you set it to 1000 so dbcache=1000. If you have 8 GB, I recommend 4000. If you have more RAM, you can set it to be higher, but after around 8000 setting it higher stops being any more helpful.


Title: Re: bitcoin.conf Optimized to Download the Blockchain
Post by: velhoti on January 03, 2020, 11:36:54 PM
Agree with the above increasing ram memory will improve your syncing blockchain.

And edit dbcache and remove the "#" (to enable it) under your bitcoin.conf to speed up the syncing.
Follow this suggested below.

If you have a lot of RAM (4 or more), you can open the bitcoin.conf file and add the following line:
Code:
dbcache=<n>
where <n> is an amount of memory in MB. If you have 4 GB RAM, I suggest you set it to 1000 so dbcache=1000. If you have 8 GB, I recommend 4000. If you have more RAM, you can set it to be higher, but after around 8000 setting it higher stops being any more helpful.

I was using this configuration but my PC was freezing the mouse and video by lack of memory, and I had no sensitive increase in sync velocity, so I commented but keep it on file.


Title: Re: bitcoin.conf Optimized to Download the Blockchain
Post by: BitMaxz on January 04, 2020, 08:57:59 PM

I was using this configuration but my PC was freezing the mouse and video by lack of memory, and I had no sensitive increase in sync velocity, so I commented but keep it on file.

Try to decrease it until you find the stable one and keep monitoring your ram.

Try to start at 100 (dbcache=100) and add this "maxmempool=100" then monitor the ram then increase the dbcache if there are still available ram space and put the same value on maxmempool.