Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: OcTradism on July 12, 2020, 03:43:57 PM



Title: Does blocksize affect speed to sync Bitcoin Core
Post by: OcTradism on July 12, 2020, 03:43:57 PM
It is a simple question as the title presents.

I noticed that when I sync my Bitcoin Core, with same level of connection (shows with WiFi Connection status), the sync speed is different.

When I sync my wallet to 2015 (first half), the speed becomes slower.

I also want to know the method to connect more nodes because I thought more nodes can help me to sync my wallet faster.

I also notice my computer works slowly if I open wallet and sync it, slower than when I don't sync wallet.


Title: Re: Does blocksize affect speed to sync BItcoin Core
Post by: ranochigo on July 12, 2020, 03:46:45 PM
Yes. The main bottleneck is with the validation of the data.

Bigger blocks means that there are more transactions within the block which also means that there are more signatures to validate. More nodes can make your download faster but since your computer likely cannot validate the data that fast, it wouldn't be of much use.


Title: Re: Does blocksize affect speed to sync Bitcoin Core
Post by: khaled0111 on July 12, 2020, 06:30:34 PM
I noticed that when I sync my Bitcoin Core, with same level of connection (shows with WiFi Connection status), the sync speed is different.
When I sync my wallet to 2015 (first half), the speed becomes slower.
Not sure but maybe it's getting slower because the blockchain size is increasing exponentially each year.
Till the end of 2015, its size was around 55Gb, it has almost doubled by 2016 to reach ~100Gb, now it's ~270Gb. Hence it's normal to get slower.

Quote
I also want to know the method to connect more nodes because I thought more nodes can help me to sync my wallet faster.
you can increase the number if nodes you want to connect to by editing the value of maxconnections in your configuration file.


Quote
I also notice my computer works slowly if I open wallet and sync it, slower than when I don't sync wallet.
A full node has to validate all transactions and blocks which is resource intensive.


Title: Re: Does blocksize affect speed to sync Bitcoin Core
Post by: bob123 on July 12, 2020, 07:10:36 PM
Less blocks with more transactions would sync faster than more blocks with less transactions, indeed.
But i think the difference wouldn't be that big if you compare 1MB blocks to 8 MB blocks, for example.

There is still a lot of validation necessary. The amount of transactions is probably the biggest factor. Whether X transactions are in 1 block or in 4 blocks shouldn't play a huge role.


Title: Re: Does blocksize affect speed to sync Bitcoin Core
Post by: DaveF on July 13, 2020, 01:44:03 AM
I started doing some tests back in May changing the dbcache size:
https://bitcointalk.org/index.php?topic=5246078.msg54478975#msg54478975

Depending on the amount of RAM you have and a few other things you can shave a lot of time off the sync.
I wanted to try with an SSD to see if that changed anything, but work keeps getting in the way of my projects.

-Dave


Title: Re: Does blocksize affect speed to sync Bitcoin Core
Post by: philipma1957 on July 13, 2020, 01:56:17 AM
I can do a blockchain full size down load in four maybe six hours.

Using a threadripper 3970x

128gb ram

1tb nvme


I can do a btc blockchain in eight hours

using a slower amd cpu

32gb

1tb nvme


I suspected my delay is I use a 1gb switch with both units.

but my internet speed is 200mb. I think loading 270gb at 160mb is the issue.
as a long download throttles to 160mb speed.

I used an online calculator that says 270gb downloading at 160mb takes four hours to download.

If I get faster internet I think I could do the blockchain in 2-3 hours.


Title: Re: Does blocksize affect speed to sync Bitcoin Core
Post by: nc50lc on July 13, 2020, 02:44:14 AM
-snip-
You might also need to specify your machine's specs, ISP info and 'bitcoin.conf' settings in order to find the bottleneck.

For the main question, of course it does, not only because of validation [1] but also because of the raw block size.
Remember that it's being downloaded from your peers and partially-filled/empty blocks are smaller in size.
If your CPU is fast enough, you wont even know the difference without checking the resource monitor.

[1] Your node doesn't actually validate the signatures from older "assumedvalid" blocks.
Ref1: https://bitcoincore.org/en/2017/03/08/release-0.14.0/#assumed-valid-blocks (https://bitcoincore.org/en/2017/03/08/release-0.14.0/#assumed-valid-blocks)
Ref2: https://github.com/bitcoin/bitcoin/commit/812714f#diff-ef76fd6674f07db88c3422fdbf0bcf9fR79-R99 (https://github.com/bitcoin/bitcoin/commit/812714f#diff-ef76fd6674f07db88c3422fdbf0bcf9fR79-R99)


Title: Re: Does blocksize affect speed to sync Bitcoin Core
Post by: philipma1957 on July 13, 2020, 03:43:17 AM
basically a ryzen 9 3900

an intel i7 9700k

32gb ram

a 1tb nvme ssd

will allow a 200mb internet connection to max out.

as per my testing.

so the bottle neck in my case is the internet which maxes at 200mb

lots of people can get faster connections I think I can switch to 500mb at my house.

it would be interesting to see if i could do a 2 hour down load with that connection.

pretty sure that would be possible. with the threadripper and 128gb ram

I had an i5 mac mini with 8gb ram and a 2tb ssd sata type.

loading that was closer to 20-25 hours

what is the op’s pc?


Title: Re: Does blocksize affect speed to sync Bitcoin Core
Post by: philipma1957 on July 13, 2020, 04:42:56 PM
Actually if a 200 mb internet connection can be as fast as 4 hours

most homes max at 1gb. with Verizon fios

So I guess a killer pc with a 1gb internet can do it in just under 1 hour.



Title: Re: Does blocksize affect speed to sync Bitcoin Core
Post by: mikeywith on July 14, 2020, 04:12:35 AM
When I sync my wallet to 2015 (first half), the speed becomes slower.

Shouldn't it be the other way around? technically synching the first half should be faster, the bottleneck is always processing the blocks, and blocks in the early days were pretty small and the number of transactions was way less than today.


Quote
I also want to know the method to connect more nodes because I thought more nodes can help me to sync my wallet faster.

You can't connect to more than 8 nodes, although apparently you could change that rule in the code and recompile it, but that won't really solve your problem and people shouldn't do it, the number of nodes isn't really important, it's the type of nodes you are connected to that matters, but what matters the most is probably your hardware resources, you could increase dbcache size depending on your ram, make sure you leave enough ram for the OS and other software running if you need to use your PC while syncing you would want to reduce that value, below are a few more things you could do to speed-up the process.

Quote
Adjusting parameters
There are some parameters that you can look at and consider depending on your system. Always make a backup of your wallet before making any changes. The parameters can be entered at the command line or generally in your bitcoin.conf file, which you would need to exit and restart Bitcoin Core in that case to see the effect. Some things to consider that could make a difference:

I am presuming here that you are running bitcoin-qt which is the GUI version and not bitcoind.

If parameters are used in the bitcoin.conf file, omit the leading -.

-datadir= You could have your datadir on a fast drive. If you move your whole .bitcoin folder you will need to specify this parameter on the command line. Note that if you change your datadir and do not copy the .bitcoin folder over to the new location first, it will create a new wallet and begin downloading the blockchain again from the start.
-dbcache= The default for this is 450. If you have 8GB of RAM, you could easily set this to 4096
par= The default for this setting is auto, but I do not know what the automatic setting does. You could try setting this to -1 which leaves one core free.
-banscore= You could try setting this to 10 to kick off misbehaving nodes sooner.
-listen= You could temporarily set this to 0 to disable incoming connections while you get the initial sync done. Your busy node does not need the additional work.
After the initial sync, you can revert these settings to their defaults but probably leave your datadir wherever you put it.

Some of these parameters are available as options in the bitcoin-qt Settings > Options menu.
Source: https://bitcoin.stackexchange.com/questions/58369/sync-with-bitcoin-qt-very-slow-0-01


Title: Re: Does blocksize affect speed to sync Bitcoin Core
Post by: philipma1957 on July 15, 2020, 02:29:53 AM
I wanted to test what you need to max out a 100mb switch on 200mb internet.

I had been planning to do a new intel 10th gen build.

So A Build with an

i5 10600t pc
asus b460m mobo
12 gb ram hyperx 8gb and 4 gb 2400 speed
lastly sabrent sb-rocket-1tb nvme 2 ssd.

set to a 100mb switch
connected to a 600mb router
connected to a 200mb internet connection.


I know I can get a consistent 125-180mb down load hooked directly to the router with a beast pc.
a full sized download in 4-5 hours.

this new build is running between 45-85mb speed download should take 8-10 hours

I view it on task management windows 10 pro software.

the switch is very likely to be the bottleneck as The range of 45-85mb seems to show.

on the tenth gen i5 10600t build

it has a 1 gb lan.

I will do more testing with this build as it is really really really efficient power pc.
I am pulling under 40 watts.
more like 32 watts doing this long download and build.

Maybe I will upgrade my internet to try to test faster speed downloads.

I wonder what this build can do as it is low cost low power full service pc. What surprises me is the 12gb ram seems to be enough so far.

I will erase this download tomorrow.
I will move the pc in a spot to hook up to a 600 mb router.

since that router has done multiple speed tests i know if can max at 195-205 mb

I would be interested to see if I can do 160-185mb with this pc.

At that point my two 32gb sticks of ram will show I will put them in the pc and use this pc to run a full core btc along with netflix streaming.

this pc cost

235 — cpu
115 — mobo
   0 — 12 gb ram
65. — case
100 — plat psu
 0   — cooler left in a box of parts
0.  — fans same box of parts.
0. — gpu is in the cpu
115 nvme

630 for a decent pc in a nice case

of course if you buy ram it will be 125 for 2 16 gb sticks
cooler 15

fans 20

that is 160


790.  

i5 with 32gb and 1 tb ssd nvme that uses under 0 watts max. runs quiet and cool 😎



along with 515 net 665 full service.

Really after load with the switch that does 100mbps and doing 45-87 speeds

internet speed is king.
full-size block chain is just around 300gb

a 100mbps connection. will take about 8-10 hours with a i5 12gb ram 1th nvme ssd
a 200mbps connection. does      about 4-5 hours.  with a better pc but the cap is the internet speed.

I will erase the download done last night and do it with a more direct connection to my router. as I am curious to see if the i5 is good enough to do the download in 4-5 hours