Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: teddy76db on April 28, 2021, 04:12:34 PM



Title: Issue with Bitcoin Core - Blocks Replay
Post by: teddy76db on April 28, 2021, 04:12:34 PM
Hello, I have a problem with Bitcoin Core.

I have downloaded the blockchain perfectly for 12 hours.
I restarted my computer and Bitcoin Core is taking that long with the "Replay blocks". (Re read)

I am gaining 2% every hour. Is there a solution?
Knowing that I can't borrow because I need the whole blockchain.

Thanks for your help !

Screenshot : https://i.ibb.co/1Xr73Ly/blocks.png


Title: Re: Issue with Bitcoin Core - Blocks Replay
Post by: teddy76db on April 28, 2021, 04:25:09 PM
*I have a high end computer with a big SSD.
+ Optical fiber to 1 gbps.


Title: Re: Issue with Bitcoin Core - Blocks Replay
Post by: LoyceV on April 28, 2021, 04:38:31 PM
Quoting for screenshot:
In my experience, this usually takes at most a few minutes.


Title: Re: Issue with Bitcoin Core - Blocks Replay
Post by: teddy76db on April 28, 2021, 04:40:17 PM
Quoting for screenshot:
In my experience, this usually takes at most a few minutes.

I wouldn't want to re-download the entire blockchain. I had previously increased the dbcache value to 16000 MB (with 16 GB of ram).

I don't know if it can come from there.


Title: Re: Issue with Bitcoin Core - Blocks Replay
Post by: LoyceV on April 28, 2021, 04:50:00 PM
I had previously increased the dbcache value to 160000 MB (with 16 GB of ram).
That's 10 times more than your total RAM, that's not good. I don't expect it to use that much though, but just in case: have you checked how much memory Bitcoin Core is using? If it's filling up your swap that could cause a dramatic drop in performance.
I usually set dbcache to 4096 MB when I'm downloading the full blockchain, and reduce it to 1024 for normal continuous usage (when I have a complete blockchain already, and only need to download a few new blocks per hour).


Title: Re: Issue with Bitcoin Core - Blocks Replay
Post by: teddy76db on April 28, 2021, 04:55:54 PM
I had previously increased the dbcache value to 160000 MB (with 16 GB of ram).
That's 10 times more than your total RAM, that's not good. I don't expect it to use that much though, but just in case: have you checked how much memory Bitcoin Core is using? If it's filling up your swap that could cause a dramatic drop in performance.
I usually set dbcache to 4096 MB when I'm downloading the full blockchain, and reduce it to 1024 for normal continuous usage (when I have a complete blockchain already, and only need to download a few new blocks per hour).


Thank you for your answer. I have just tried by setting the value dbcache=4096 in the configuration file.

Unfortunately it doesn't change much.

It caps according to the task manager) 30% CPU usage and 400 MB used in RAM. And 0.1 MB /s for disk usage.


Title: Re: Issue with Bitcoin Core - Blocks Replay
Post by: BitMaxz on April 28, 2021, 08:08:36 PM

Thank you for your answer. I have just tried by setting the value dbcache=4096 in the configuration file.

Unfortunately it doesn't change much.

It caps according to the task manager) 30% CPU usage and 400 MB used in RAM. And 0.1 MB /s for disk usage.



How about your internet speed?

What is the status shown in your core?
Look at mine below I installed it just now

https://i.imgur.com/myU5o9T.png

The estimated time is 20hours and I'm using this setting below.

Code:
maxconnections=15
maxmempool=200
maxreceiverbuffer=2500
maxsendbuffer=500
dbcache=1024

Also, take note of your settings if it set to pruned mode because I tried it recently with pruned mode but it's syncing slow. I don't know why but it's better to disable it if you want to speed up the syncing process.

You can copy my settings above. I only have 4GB ram but I choose to set the dbcache to 1024MB because it's running with SSD.


Title: Re: Issue with Bitcoin Core - Blocks Replay
Post by: NotATether on April 29, 2021, 10:07:52 AM
According to this answer (https://bitcoin.stackexchange.com/questions/55368/what-does-replaying-blocks-mean) it's because you made your dbcache so large, it's waiting for all of the blocks inside to be written to the disk.

Since your old dbcache size was 160 gigabytes, that's how much data needs to be written before the replay finishes. It seems to be steadily progressing for you though.


Title: Re: Issue with Bitcoin Core - Blocks Replay
Post by: ranochigo on April 29, 2021, 11:33:22 AM
According to this answer (https://bitcoin.stackexchange.com/questions/55368/what-does-replaying-blocks-mean) it's because you made your dbcache so large, it's waiting for all of the blocks inside to be written to the disk.

Since your old dbcache size was 160 gigabytes, that's how much data needs to be written before the replay finishes. It seems to be steadily progressing for you though.
You can't have a dbcache of 160GB when your RAM is only 16GB. I doubt that the client is actually writing anything to the disk especially when it is still starting. Dbcache is flushed when it reaches its limit or during shutdown, hence why if you have a huge dbcache, your shutdown will be much slower.

Replaying blocks is actually the client validating the blocks, evident by the little disk activity and the relatively higher CPU usage.


Title: Re: Issue with Bitcoin Core - Blocks Replay
Post by: HCP on April 30, 2021, 04:52:31 AM
Would it just attempt to start paging out the data if you had attempted a dbcache that was larger than your actual physical RAM size? or does dbcache just revert to your actual RAM size if you set it to a ridiculous value?

In either case, reading through the git issue regarding "replaying blocks", it looks like the OP is just going to have to sit and wait... the most disconcerting thing was that you can't actually interrupt it. :-\