Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: SaskBitcoin on February 07, 2021, 12:43:59 PM



Title: New Node, Very Slow Progress
Post by: SaskBitcoin on February 07, 2021, 12:43:59 PM
Hi,
I am trying to start a new node to help the stability of the network and learn more about bitcoin. I installed core yesterday but things are going very slowly.

I switched to bitcoind (from bitcoin-qt) to see if that made any difference. I don't think it did. Any help appreciated. The debug.log is posted.


Bitcoin Client Software and Version Number: Bitcoin Core 0.21.0
Operating System: fedora 33 64-bit
System Hardware Specs: I7-2670QM CPU (8 CPUs) with 6 GB RAM and 500 GB free hard drive space.
Description of Problem: Bitcoin Core is synching very very slowly
Any Related Addresses: None
Any Related Transaction IDs: None
Log Files from the Bitcoin Client: https://pastebin.com/p7LqkPEu


Title: Re: New Node, Very Slow Progress
Post by: LoyceV on February 07, 2021, 12:49:42 PM
Unfortunately, this is "normal". You can probably improve performance a bit by increasing dbcache (database cache) in settings. Depending on your system's memory usage you can probably make it 2048 (MB). More RAM (and more dbcache) would make a large improvement.
The other bottleneck is your hard drive: an SSD is much faster for this task.

Note that by default nodes aren't uploading, so if you want to "help the network", you have to manually enable it.


Title: Re: New Node, Very Slow Progress
Post by: ABCbits on February 07, 2021, 12:51:19 PM
You could allocate more RAM used by Bitcoin Core. There are 2 ways to do it,
1. Add -dbcache=N (N is total of RAM used in MB) if you run Bitcoin Core from Terminal.

Code:
./bitcoin-qt -dbcache=4000

2. Open bitcoin.conf (located on folder where you store blockchain) and add dbcache=N on new line. If bitcoin.conf isn't exist, all you need to do is create new .txt file and rename it as bitcoin.conf.

Code:
dbcache=4000

You can change 4000 (in MB) higher or lower depending on your desktop environment and RAM usage when it's idle.

Additionally,
1. How fast is your internet connection?
2. Using tools such as htop and iotop, do you see your CPU/IO usage is near 100% all the time? If yes, that's the reason of slow sync progress.


Title: Re: New Node, Very Slow Progress
Post by: LoyceV on February 07, 2021, 12:55:27 PM
Code:
./bitcoin-qt -dbcache=20000
That's going to be a problem with only 6 GB RAM.

Log Files from the Bitcoin Client: https://pastebin.com/p7LqkPEu
It's not even that bad:
Code:
2021-02-07T09:53:52Z Synchronizing blockheaders, height: 40000 (~6.48%)
~
2021-02-07T12:13:19Z Synchronizing blockheaders, height: 304000 (~46.38%)
Some people complain it's going to take many weeks. This looks like it may be finished by tomorrow.
Don't forget you have to download and validate about 350 GB.


Title: Re: New Node, Very Slow Progress
Post by: SaskBitcoin on February 07, 2021, 01:44:59 PM
You could allocate more RAM used by Bitcoin Core. There are 2 ways to do it,
1. Add -dbcache=N (N is total of RAM used in MB) if you run Bitcoin Core from Terminal.

Code:
./bitcoin-qt -dbcache=4000

2. Open bitcoin.conf (located on folder where you store blockchain) and add dbcache=N on new line. If bitcoin.conf isn't exist, all you need to do is create new .txt file and rename it as bitcoin.conf.

Code:
dbcache=4000

You can change 4000 (in MB) higher or lower depending on your desktop environment and RAM usage when it's idle.

Additionally,
1. How fast is your internet connection?
2. Using tools such as htop and iotop, do you see your CPU/IO usage is near 100% all the time? If yes, that's the reason of slow sync progress.

I set dbcache=4000 in my bitcoin.conf file.
My internet connection is 50/10 Mbps down/up respectively.
Top command shows bitcoind is only using 1% of my CPU and about 3% of mem.


Title: Re: New Node, Very Slow Progress
Post by: SaskBitcoin on February 07, 2021, 02:00:22 PM

It's not even that bad:
Code:
2021-02-07T09:53:52Z Synchronizing blockheaders, height: 40000 (~6.48%)
~
2021-02-07T12:13:19Z Synchronizing blockheaders, height: 304000 (~46.38%)
Some people complain it's going to take many weeks. This looks like it may be finished by tomorrow.
Don't forget you have to download and validate about 350 GB.

Perhaps I don't understand how this works. Bitcoin-qt is showing that it is synching headers (46%) but it also shows that 0% progress and I don't have any blocks except block zero.


Title: Re: New Node, Very Slow Progress
Post by: ranochigo on February 07, 2021, 02:57:51 PM
Log Files from the Bitcoin Client: https://pastebin.com/p7LqkPEu
It's not even that bad:
Code:
2021-02-07T09:53:52Z Synchronizing blockheaders, height: 40000 (~6.48%)
~
2021-02-07T12:13:19Z Synchronizing blockheaders, height: 304000 (~46.38%)
Some people complain it's going to take many weeks. This looks like it may be finished by tomorrow.
Don't forget you have to download and validate about 350 GB.
Block headers should be downloaded before the IBD starts isn't it? Or that's from my experience, the client always download all of the headers before commencing.

OP, do you have any peers connected? Go to Window>Information and Console. Check the number of connections.


Title: Re: New Node, Very Slow Progress
Post by: LoyceV on February 07, 2021, 03:43:33 PM
It's not even that bad:
Code:
2021-02-07T12:13:19Z Synchronizing blockheaders, height: 304000 (~46.38%)
Block headers should be downloaded before the IBD starts isn't it?
You're right, I totally overlooked the "headers" part. In that case it is terribly slow indeed.


Title: Re: New Node, Very Slow Progress
Post by: NotATether on February 07, 2021, 04:15:03 PM
System Hardware Specs: I7-2670QM CPU (8 CPUs) with 6 GB RAM and 500 GB free hard drive space.

Those specs sound awfully similar to an HP pavilion dv6 laptop. Is that what you are running bitcoind on by any chance?

I have one of those machines. The hard disk was a cheap Toshiba and as such was slowing down all the programs that wanted to load into memory at first login. So I am inclined to point fingers at your disk being the culprit.

If it is one, well done reformatting the OS with Fedora - Red Hat-based operating systems run better on that spinning rust than Windows (7, the version that's preinstalled on them).


Title: Re: New Node, Very Slow Progress
Post by: SaskBitcoin on February 07, 2021, 05:18:57 PM

OP, do you have any peers connected? Go to Window>Information and Console. Check the number of connections.

I have 10 peers/connections (all in, no out).





Title: Re: New Node, Very Slow Progress
Post by: ranochigo on February 07, 2021, 05:24:13 PM
I have 10 peers/connections (all in, no out).
Weird. Is there any firewall rules that you may have on your router or imposed by your ISP. It's strange that you only have incoming connections and not outgoing, it's usually the opposite. At the Peers tab, can you see if anything is out of the ordinary? Could be the ping being unusually high, synced blocks or block headers being low, etc.


Title: Re: New Node, Very Slow Progress
Post by: HCP on February 07, 2021, 09:33:31 PM
Honestly, that seems to be some sort of networking issue... not sure why it's syncing the headers so slowly and not downloading any blocks. I'd concur with ranochigo that it looks like some sort of firewall issue.