Bitcoin Forum
July 16, 2024, 09:43:29 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoin blockchain sync very slow on HDD  (Read 276 times)
broflof (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
June 24, 2024, 03:54:41 PM
 #1

I'm syncing my Bitcoin wallet blockchain using latest Bitcoin Core on Linux.

It progresses very very slowly, right now 2 to 3 weeks in 12 hours.

CPU and net usage stay low most of the time, problem is not there (most likely). HDD usage is constant, I think that's probably the bottleneck. It's a 7200rpm standard desktop HDD.

10 years ago I could sync the blockchain on a slow 5400rpm laptop HDD without major issues.

Time to buy big SSD perhaps.

But the interesting question is,
Does syncing get harder over time as the blockchain gets longer?

Or has something happened to the protocol so it would be harder now?

Or has the code quality of Bitcoin Core gone down?


The GUI also stalls badly during sync. I don't remember when this problem began but it did not always exist.

Syncing monero is also extremely slow and it has been so as long as I can remember.  But that's another story.
promise444c5
Full Member
***
Online Online

Activity: 350
Merit: 207


Keep Promises !


View Profile
June 24, 2024, 04:01:56 PM
Last edit: June 24, 2024, 04:44:11 PM by promise444c5
 #2

In the last 10 years there're fewer transactions in a block... now there's  more.
Use the current version check the latest news section  of the forum for the torrent file,
Then if you are using bitcoin-qt GUI  check the dbcache increase it, it could make it sync process more  faster(note the value is in MB ) this should  be done carefully  in accordance  to your  ram  capacity .
Quote
Does syncing get harder over time as the blockchain gets longer?
Not really but yes and might depends on the hardware , people can still get it done in just 2~4 days.
Quote
The GUI also stalls badly during sync. I don't remember when this problem began but it did not always exist.
Sometimes when when block index is writing to disk you might experience  that and you would think it's just stall

un_rank
Hero Member
*****
Offline Offline

Activity: 784
Merit: 785


- Jay -


View Profile WWW
June 24, 2024, 04:16:55 PM
 #3

Does syncing get harder over time as the blockchain gets longer?

Or has something happened to the protocol so it would be harder now?
It should, but the chain is not increasing as such a rate that will cause an significant lag in download time. Could be from the internet connection.

Nothing happened on the protocol level to make it harder either.

- Jay -

██
██
██
██
██
██
██
██
██
██
██
██
██
... LIVECASINO.io    Play Live Games with up to 20% cashback!...██
██
██
██
██
██
██
██
██
██
██
██
██
LoyceV
Legendary
*
Offline Offline

Activity: 3374
Merit: 17031


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
June 24, 2024, 04:22:24 PM
Merited by pooya87 (2), ABCbits (2), philipma1957 (1)
 #4

CPU and net usage stay low most of the time, problem is not there (most likely). HDD usage is constant, I think that's probably the bottleneck. It's a 7200rpm standard desktop HDD.
You have 2 bottlenecks: RAM, and HDD speed. Both are more or less interchangeable: with 32 GB RAM and 12000 MB dbcache, your sync will go just fine. With 8 GB RAM and an SSD, the SSD is still the bottleneck. I tested both of these examples myself.

Quote
10 years ago I could sync the blockchain on a slow 5400rpm laptop HDD without major issues.
Ten years ago, the entire blockchain was only 20 GB.

Quote
Does syncing get harder over time as the blockchain gets longer?
Yes. The chainstate directory keeps growing, and requires more and more RAM (or a LOT of disk activity) to verify the download.

Quote
Or has the code quality of Bitcoin Core gone down?
Nope. Older versions were much slower to sync.

Quote
Syncing monero is also extremely slow and it has been so as long as I can remember.  But that's another story.
Monero is even more demanding than Bitcoin Core, despite a much smaller blockchain.

TL;DR: get an SSD.
If you have a small SSD, put the chainstate directory on it. That will make a huge difference for Bitcoin Core. If you don't have an SSD yet, buy one. Get a decent one for best performance. It's going to largely improve your entire computing experience.

philipma1957
Legendary
*
Offline Offline

Activity: 4186
Merit: 8158


'The right to privacy matters'


View Profile WWW
June 24, 2024, 07:06:05 PM
 #5

a decent i5 gen cpu say i5 8500 or newer
a 1 tb samsung ssd or bigger
16gb ram or more
a decent internet connection say 100Mbps or more


if you have all of the above you will be under 1 day


obvious that

an i7 14700
a 2tb nvme2 quality ssd
64gb ram
and a 1Gbps internet

will be faster.

In fact the second setup may be faster than the offered download speed.

I have used 200Mbps and
128gb ram
1tb nvme2 ssd
threadripper cpu

My setup was able to do 190Mbps constantly which makes me suspect my internet connection was my bottle neck

I will soon get 1gb internet and try to see how fast I can do this.

▄▄███████▄▄
▄██████████████▄
▄██████████████████▄
▄████▀▀▀▀███▀▀▀▀█████▄
▄█████████████▄█▀████▄
███████████▄███████████
██████████▄█▀███████████
██████████▀████████████
▀█████▄█▀█████████████▀
▀████▄▄▄▄███▄▄▄▄████▀
▀██████████████████▀
▀███████████████▀
▀▀███████▀▀
.
 MΞTAWIN  THE FIRST WEB3 CASINO   
.
.. PLAY NOW ..
ABCbits
Legendary
*
Offline Offline

Activity: 2940
Merit: 7665


Crypto Swap Exchange


View Profile
June 25, 2024, 08:45:15 AM
Last edit: June 25, 2024, 09:03:54 AM by ABCbits
Merited by LoyceV (6), pooya87 (4), Husna QA (2)
 #6

Does syncing get harder over time as the blockchain gets longer?

Short answer, yes. Not only each block become bigger, total UTXO keep growing.

Edit: I assume "gets longer" refers to newer blocks.

Or has something happened to the protocol so it would be harder now?

AFAIK no. New stuff (such as SegWit) solve few problem including quadratic verification time.

Or has the code quality of Bitcoin Core gone down?

No. Jameson Lopp did benchmark which prove the opposite on https://blog.lopp.net/bitcoin-core-performance-evolution/.

The GUI also stalls badly during sync. I don't remember when this problem began but it did not always exist.

That's true, it's known issue for few years. See this issue, https://github.com/bitcoin-core/gui/issues/299.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
broflof (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
July 06, 2024, 03:36:37 PM
 #7

Thank you, for answers.

Finally, actually, I got "pro level" answers instead of just "works fine for me", "can u show ur logfiles", "just get SSD bruh".  Tongue

I got a cheap RAM upgrade, set dbcache to 16GB (was 4GB or 6GB), started syncing.

At some point the GUI had stalled very badly, I could do nothing so I shut down Bitcoin-qt and it shut down cleanly. When I restarted it the blockchain was in fully synced state. So my remaining 5 weeks were synced in 2 to 3 hours, much faster than before.

I don't know if the GUI would have recovered if I had waited for some more time. Maybe I tried to use it just at the critical moment. It's unknown for now.


Monero did not get faster than before and the last 50000 to 100000 blocks seem to be much slower than anything before. I didn't find any option similar to dbcache in Bitcoin. 600 blocks/h is the speed now. Used to be 2200 blocks/h for quite long. I benchmarked different file systems and certain types were occasionally faster than that but fell to the same slow level at some point.

Maybe it's SSD time next.
larry_vw_1955
Sr. Member
****
Offline Offline

Activity: 1120
Merit: 440


View Profile
July 07, 2024, 02:36:01 AM
 #8


In fact the second setup may be faster than the offered download speed.

I have used 200Mbps and
128gb ram
1tb nvme2 ssd
threadripper cpu

My setup was able to do 190Mbps constantly which makes me suspect my internet connection was my bottle neck

I will soon get 1gb internet and try to see how fast I can do this.


how much did that setup cost you? i'm guessing around $2500. most people would be better off just buying bitcoin instead of trying to spend that money to download the blockchain. it's just going to be an ever increasing game of having to throw more and more hardware at the problem big waste of money unless you just have that stuff lying around from something else...
LoyceV
Legendary
*
Offline Offline

Activity: 3374
Merit: 17031


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
July 07, 2024, 07:39:59 AM
 #9

Monero did not get faster than before and the last 50000 to 100000 blocks seem to be much slower than anything before. I didn't find any option similar to dbcache in Bitcoin. 600 blocks/h is the speed now. Used to be 2200 blocks/h for quite long. I benchmarked different file systems and certain types were occasionally faster than that but fell to the same slow level at some point.

Maybe it's SSD time next.
Last time I synced Monero (on a server with 32 GB RAM, and HDD), the first thing it told me was to get a SSD. I couldn't do that, and eventually removed Monero because even after it was synced, the entire server felt "sluggish" while it was running.

ABCbits
Legendary
*
Offline Offline

Activity: 2940
Merit: 7665


Crypto Swap Exchange


View Profile
July 08, 2024, 10:28:34 AM
 #10

At some point the GUI had stalled very badly, I could do nothing so I shut down Bitcoin-qt and it shut down cleanly. When I restarted it the blockchain was in fully synced state. So my remaining 5 weeks were synced in 2 to 3 hours, much faster than before.

I don't know if the GUI would have recovered if I had waited for some more time. Maybe I tried to use it just at the critical moment. It's unknown for now.

Based on my experience, the GUI would be responsive again and show latest information. Although if you need to know latest sync progress, you could open debug.log and look for newest line which contain text "UpdateTip".

Monero did not get faster than before and the last 50000 to 100000 blocks seem to be much slower than anything before. I didn't find any option similar to dbcache in Bitcoin. 600 blocks/h is the speed now. Used to be 2200 blocks/h for quite long. I benchmarked different file systems and certain types were occasionally faster than that but fell to the same slow level at some point.

Maybe it's SSD time next.

There are other parameter you could try, such as --block-sync-size, --fast-block-sync and --db-sync-mode. If you have question specifically about Monero, you should create new thread/reply on different board.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
kevinteohuiwei
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
July 09, 2024, 02:11:18 PM
 #11

I just got mine sync and its 660GB .... done in 5 days with a 3MBPS line on my phone data.
Just 16gb amd ryzen 9 7950 and 1tb ssd ext drive.

Yea, i did set the cache to 1800MB compare to originally 450MB. It does help. Even on my raspberry pi 5, i did sync it within 5 days on the same ext drive.

same core version 27.0. I think it could be the cache 450MB default setting. Try changing it and trying different setting. Hope it helps.



BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1582
Merit: 7746

Masses won't buy bitcoin. Masses will earn bitcoin


View Profile
July 13, 2024, 07:44:37 PM
 #12

Does syncing get harder over time as the blockchain gets longer?
It depends on the transactions. If the future transactions create more UTXO than spend, then it will be worse over time, yes.

Or has the code quality of Bitcoin Core gone down?
I believe it's just your HDD. It's extremely slow to download and index all that information on an HDD. Have you tried SSD?

Short answer, yes. Not only each block become bigger, total UTXO keep growing.
How do you know that the UTXO keeps growing? Are there stats that support this?
LoyceV
Legendary
*
Offline Offline

Activity: 3374
Merit: 17031


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
July 13, 2024, 08:46:16 PM
 #13

How do you know that the UTXO keeps growing? Are there stats that support this?
I don't keep track of UTXOs, but I have data on funded addresses. Apart from small temporary reductions (usually due to consolidation at low fees), they're generally growing in number.
The way I see it: Bitcoin gets more expensive, and more people own smaller and smaller bits of it.

BlackBoss_
Sr. Member
****
Offline Offline

Activity: 700
Merit: 415


Rollbit is for you. Take $RLB token!


View Profile
July 14, 2024, 03:35:42 AM
 #14

The way I see it: Bitcoin gets more expensive, and more people own smaller and smaller bits of it.
It's natural that with a same cake, if there are more people know about the cake, want to have pieces of the cake, each will have smaller piece. People who have bitcoins need to take care of their bitcoins, hold their coins tightly and sit down to think of solid plans for investment, holding and personal, family financial plans.

They need very good plans to avoid of any situation that forces them to sell their bitcoins and turn their pieces to be smaller and smaller ones with time. They had chances to join the market earlier than late comers but if they don't have proper plans, they will end with no differences to late comers.

Bitcoin: Addresses Holding > X BTC by Year

R


▀▀▀▀▀▀▀██████▄▄
████████████████
▀▀▀▀█████▀▀▀█████
████████▌███▐████
▄▄▄▄█████▄▄▄█████
████████████████
▄▄▄▄▄▄▄██████▀▀
LLBIT|
4,000+ GAMES
███████████████████
██████████▀▄▀▀▀████
████████▀▄▀██░░░███
██████▀▄███▄▀█▄▄▄██
███▀▀▀▀▀▀█▀▀▀▀▀▀███
██░░░░░░░░█░░░░░░██
██▄░░░░░░░█░░░░░▄██
███▄░░░░▄█▄▄▄▄▄████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
█████████
▀████████
░░▀██████
░░░░▀████
░░░░░░███
▄░░░░░███
▀█▄▄▄████
░░▀▀█████
▀▀▀▀▀▀▀▀▀
█████████
░░░▀▀████
██▄▄▀░███
█░░█▄░░██
░████▀▀██
█░░█▀░░██
██▀▀▄░███
░░░▄▄████
▀▀▀▀▀▀▀▀▀
|
██░░░░░░░░░░░░░░░░░░░░░░██
▀█▄░▄▄░░░░░░░░░░░░▄▄░▄█▀
▄▄███░░░░░░░░░░░░░░███▄▄
▀░▀▄▀▄░░░░░▄▄░░░░░▄▀▄▀░▀
▄▄▄▄▄▀▀▄▄▀▀▄▄▄▄▄
█░▄▄▄██████▄▄▄░█
█░▀▀████████▀▀░█
█░█▀▄▄▄▄▄▄▄▄██░█
█░█▀████████░█
█░█░██████░█
▀▄▀▄███▀▄▀
▄▀▄
▀▄▄▄▄▀▄▀▄
██▀░░░░░░░░▀██
||.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
░▀▄░▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄░▄▀
███▀▄▀█████████████████▀▄▀
█████▀▄░▄▄▄▄▄███░▄▄▄▄▄▄▀
███████▀▄▀██████░█▄▄▄▄▄▄▄▄
█████████▀▄▄░███▄▄▄▄▄▄░▄▀
███████████░███████▀▄▀
███████████░██▀▄▄▄▄▀
███████████░▀▄▀
████████████▄▀
███████████
▄▄███████▄▄
▄████▀▀▀▀▀▀▀████▄
▄███▀▄▄███████▄▄▀███▄
▄██▀▄█▀▀▀█████▀▀▀█▄▀██▄
▄██▄██████▀████░███▄██▄
███░████████▀██░████░███
███░████░█▄████▀░████░███
███░████░███▄████████░███
▀██▄▀███░█████▄█████▀▄██▀
▀██▄▀█▄▄▄██████▄██▀▄██▀
▀███▄▀▀███████▀▀▄███▀
▀████▄▄▄▄▄▄▄████▀
▀▀███████▀▀
OFFICIAL PARTNERSHIP
FAZE CLAN
SSC NAPOLI
|
nc50lc
Legendary
*
Offline Offline

Activity: 2478
Merit: 5804


Self-proclaimed Genius


View Profile
July 14, 2024, 05:30:26 AM
 #15

At some point the GUI had stalled very badly, I could do nothing so I shut down Bitcoin-qt and it shut down cleanly.
-snip-
I don't know if the GUI would have recovered if I had waited for some more time. Maybe I tried to use it just at the critical moment. It's unknown for now.
That point must be after the specific block hash set here: github.com/bitcoin/bitcoin/blob/c4d45b695ef27e21d35e886b08887e2ecf272ce7/src/kernel/chainparams.cpp#L108
But it should've recovered after it's finished with all the heavy signature script verifications.

Quote from: broflof
Finally, actually, I got "pro level" answers instead of just "works fine for me", "can u show ur logfiles", "just get SSD bruh".  Tongue
Well, a "pro" will ask for the debug.log to look for the root of the issue instead of suggesting solutions that may not be necessary.
The reason why you're not asked for logs here is because slow sync is pretty much hardware and/or database cache issue
and the "dbcache" solution that you found is consistent in topics like this.

If you followed this format (sticky topic): [READ BEFORE POSTING] Tech Support Help Request Format
Someone pro can easily point that your ram and dbcache settings can be improved just from looking at the logs and the provided info.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
ABCbits
Legendary
*
Offline Offline

Activity: 2940
Merit: 7665


Crypto Swap Exchange


View Profile
July 14, 2024, 08:18:06 AM
 #16

Short answer, yes. Not only each block become bigger, total UTXO keep growing.
How do you know that the UTXO keeps growing? Are there stats that support this?

I run full node, so i could run gettxoutsetinfo "none" block_height to get such data. There are few website which monitor total UTXO such as,
https://statoshi.info/d/000000009/unspent-transaction-output-set
https://www.blockchain.com/explorer/charts/utxo-count
https://utxo-stats.com/

If you read discussion about IBD with Raspberry Pi or old device, you might notice people report about slow IBD due to low RAM.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
philipma1957
Legendary
*
Offline Offline

Activity: 4186
Merit: 8158


'The right to privacy matters'


View Profile WWW
July 14, 2024, 11:35:02 PM
 #17


In fact the second setup may be faster than the offered download speed.

I have used 200Mbps and
128gb ram
1tb nvme2 ssd
threadripper cpu

My setup was able to do 190Mbps constantly which makes me suspect my internet connection was my bottle neck

I will soon get 1gb internet and try to see how fast I can do this.


how much did that setup cost you? i'm guessing around $2500. most people would be better off just buying bitcoin instead of trying to spend that money to download the blockchain. it's just going to be an ever increasing game of having to throw more and more hardware at the problem big waste of money unless you just have that stuff lying around from something else...

that pc was the best i ever owned.

it was serious money the threadripper alone was 2500


you don’t need all that.

Any i5 intel  8500 or newer

16 gb better to have 32gb

and any good  2tb ssd. nmve 2

oh. 200. mh internet .

▄▄███████▄▄
▄██████████████▄
▄██████████████████▄
▄████▀▀▀▀███▀▀▀▀█████▄
▄█████████████▄█▀████▄
███████████▄███████████
██████████▄█▀███████████
██████████▀████████████
▀█████▄█▀█████████████▀
▀████▄▄▄▄███▄▄▄▄████▀
▀██████████████████▀
▀███████████████▀
▀▀███████▀▀
.
 MΞTAWIN  THE FIRST WEB3 CASINO   
.
.. PLAY NOW ..
LoyceV
Legendary
*
Offline Offline

Activity: 3374
Merit: 17031


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
July 15, 2024, 06:00:14 AM
 #18

Any i5 intel  8500 or newer

16 gb better to have 32gb

and any good  2tb ssd. nmve 2

oh. 200. mh internet .
This is still excessive for syncing a Bitcoin blockchain. All it does is shave a few hours off the total sync time. I'd base my computing requirements on my daily needs, not on a one-time event.

larry_vw_1955
Sr. Member
****
Offline Offline

Activity: 1120
Merit: 440


View Profile
Today at 02:25:31 AM
 #19

Any i5 intel  8500 or newer

16 gb better to have 32gb

and any good  2tb ssd. nmve 2

oh. 200. mh internet .
This is still excessive for syncing a Bitcoin blockchain. All it does is shave a few hours off the total sync time. I'd base my computing requirements on my daily needs, not on a one-time event.

well i don't know what world you are living in but a core i5 is not excessive and neither is a 2TB storage space especially if 25% of that is being hogged up by the blockchain...
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!