Bitcoin Forum
May 02, 2024, 01:42:47 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Is there any benchmark results on block verification times?  (Read 114 times)
Coding Enthusiast (OP)
Legendary
*
Offline Offline

Activity: 1039
Merit: 2783


Bitcoin and C♯ Enthusiast


View Profile WWW
May 05, 2022, 04:33:51 AM
Merited by hugeblack (6), ABCbits (2)
 #1

Has anybody done any research about how much time it takes to verify bitcoin blocks on different hardware?
I'm hoping for actual values not a benchmark that I have to run myself, something like "it takes X seconds to verify block Y on CPU with clock speed Z".

For example if I remove all IO operations it would take me 28 seconds to fully verify first 2000 blocks and update databases in memory (from block #1 to #2001) on a single core @3.7 GHz.
My current assumption is that this is slow but I don't know by how much. For example should it take 5 seconds or 20?

Projects List+Suggestion box
Donate: 1Q9s or bc1q
|
|
|
FinderOuter(0.19.1)Ann-git
Denovo(0.7.0)Ann-git
Bitcoin.Net(0.26.0)Ann-git
|
|
|
BitcoinTransactionTool(0.11.0)Ann-git
WatchOnlyBitcoinWallet(3.2.1)Ann-git
SharpPusher(0.12.0)Ann-git
Be very wary of relying on JavaScript for security on crypto sites. The site can change the JavaScript at any time unless you take unusual precautions, and browsers are not generally known for their airtight security.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714614167
Hero Member
*
Offline Offline

Posts: 1714614167

View Profile Personal Message (Offline)

Ignore
1714614167
Reply with quote  #2

1714614167
Report to moderator
1714614167
Hero Member
*
Offline Offline

Posts: 1714614167

View Profile Personal Message (Offline)

Ignore
1714614167
Reply with quote  #2

1714614167
Report to moderator
n0nce
Hero Member
*****
Offline Offline

Activity: 882
Merit: 5818


not your keys, not your coins!


View Profile WWW
May 05, 2022, 02:35:44 PM
Merited by ABCbits (3), Coding Enthusiast (3), hugeblack (2)
 #2

Interesting project idea; but it only really seems viable to use common hardware such as 'Raspberry Pi 3B' or 'Base MacBook Pro 2016'.

The issue if categorizing by just clock speed is that a current-gen 3GHz chip is much faster than a 10 year old 3GHz chip due to ILP and other advances.
The same CPU could also perform differently on a system with faster or slower RAM, faster or slower SSD (if you verify more blocks than what fits in RAM) and similar aspects. Therefore it would probably need to be categorized by 'full system specs' like I showed above with the exact laptop or SBC model in question. An alternative would be to categorize not just by clock speed, but also by the exact model of CPU used.
Just the CPU model doesn't work either, since the same chip often exists in a higher and lower-clocked version, laptop or desktop version, overclocked or not, better or worse cooling and similar. So it has to be CPU + boost (?) clock speed at least.

It also depends how many blocks you are looking at; if it's a prolonged workload, it's not guaranteed that the chip holds the same speed at all times. So it would really need to be a pretty elaborate thing (similar to other benchmarks) where you perform multiple runs, filter out anomalies, take averages and hope to get a representative result.

█▀▀▀











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











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

Activity: 2856
Merit: 7436


Crypto Swap Exchange


View Profile
May 06, 2022, 11:54:24 AM
Merited by Coding Enthusiast (3), n0nce (1)
 #3

Has anybody done any research about how much time it takes to verify bitcoin blocks on different hardware?

I doubt there's any research or benchmark list about it. Some time ago i asked similar thing for block size, but there's very little data about it[1].

Interesting project idea; but it only really seems viable to use common hardware such as 'Raspberry Pi 3B' or 'Base MacBook Pro 2016'.

--snip--

The result also heavily depends on which software do you use to verify block, i expect Bitcoin Core have better performance than other implementation[2]. OS and drive filesystem also have small impact.

[1] https://bitcointalk.org/index.php?topic=5332414.0
[2] https://blog.lopp.net/bitcoin-core-performance-evolution/

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Coding Enthusiast (OP)
Legendary
*
Offline Offline

Activity: 1039
Merit: 2783


Bitcoin and C♯ Enthusiast


View Profile WWW
May 06, 2022, 03:31:01 PM
 #4

The only correct way to benchmark is to write specialized code that targets the part you want to benchmark while mocking everything else that you don't want affecting your result (like disk IO to eliminate HDD/SSD speed). Then of course reporting the result using full system specs.
Unfortunately I'm not familiar with C++ to do it using bitcoin core and the closest thing I could find is connectblock_benchmark that targets ConnectBlock() method but that also updates UTXO set which seems to involve the database and possibly the disk IO.

However the example is showing 14 seconds for 18000 SigNet blocks which proves my first feeling was correct about my 28 seconds being too slow.
FWIW I tore my code apart and it appeared that my mock UTXO set was taking all the time (the whole 28 seconds was spent there) verification of 8000 blocks itself takes roughly 0.1 second.

Projects List+Suggestion box
Donate: 1Q9s or bc1q
|
|
|
FinderOuter(0.19.1)Ann-git
Denovo(0.7.0)Ann-git
Bitcoin.Net(0.26.0)Ann-git
|
|
|
BitcoinTransactionTool(0.11.0)Ann-git
WatchOnlyBitcoinWallet(3.2.1)Ann-git
SharpPusher(0.12.0)Ann-git
NotATether
Legendary
*
Offline Offline

Activity: 1582
Merit: 6718


bitcoincleanup.com / bitmixlist.org


View Profile WWW
May 06, 2022, 04:19:32 PM
 #5

Interesting project idea; but it only really seems viable to use common hardware such as 'Raspberry Pi 3B' or 'Base MacBook Pro 2016'.

The issue if categorizing by just clock speed is that a current-gen 3GHz chip is much faster than a 10 year old 3GHz chip due to ILP and other advances.
The same CPU could also perform differently on a system with faster or slower RAM, faster or slower SSD (if you verify more blocks than what fits in RAM) and similar aspects. Therefore it would probably need to be categorized by 'full system specs' like I showed above with the exact laptop or SBC model in question. An alternative would be to categorize not just by clock speed, but also by the exact model of CPU used.
Just the CPU model doesn't work either, since the same chip often exists in a higher and lower-clocked version, laptop or desktop version, overclocked or not, better or worse cooling and similar. So it has to be CPU + boost (?) clock speed at least.

Why different models of computers? We haven't even managed to enumerate most of the global models yet. It's almost impossible for someone to get ther hands on all of them.

What should be done instead, is to benchmark CPU+disk combinations, because disk performance is relevant to this application, while the speed effects of RAM are arguably negligible (data is not moving *in* frequently, which constitutes a write. Reads are fairly fast though).

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
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!