Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: noclip on February 13, 2011, 06:46:00 PM



Title: Using GPU to *verify* blocks?
Post by: noclip on February 13, 2011, 06:46:00 PM
Is there a way to use a GPU to do the initial block verification? If not, I think this is a feature the developer(s) should consider adding.


Title: Re: Using GPU to *verify* blocks?
Post by: Martian on February 13, 2011, 07:20:52 PM
Is there a way to use a GPU to do the initial block verification? If not, I think this is a feature the developer(s) should consider adding.
By design it's very very fast to verify a block compared to generating. A CPU has more than enough processing power.


Title: Re: Using GPU to *verify* blocks?
Post by: dust on February 13, 2011, 07:25:14 PM
The problem with including GPU related features in the main client is that GPU computing is very hardware / operating system dependent.  At the very least, installing additional software or drivers is required.


Title: Re: Using GPU to *verify* blocks?
Post by: noclip on February 13, 2011, 07:33:44 PM
Is there a way to use a GPU to do the initial block verification? If not, I think this is a feature the developer(s) should consider adding.
By design it's very very fast to verify a block compared to generating. A CPU has more than enough processing power.

I may be wrong about where the bottleneck is, but I was referring to the initial verification of the 100,000 existing blocks when you first start using the client.

The problem with including GPU related features in the main client is that GPU computing is very hardware / operating system dependent.  At the very least, installing additional software or drivers is required.

Hmm, has some kind of standardized plugin architecture been considered (aside from the current RPC method)? You could even throw in a few default plugins for each OS/popular GPU combination. Would it be unsafe?


Title: Re: Using GPU to *verify* blocks?
Post by: grondilu on February 13, 2011, 07:54:05 PM
I may be wrong about where the bottleneck is, but I was referring to the initial verification of the 100,000 existing blocks when you first start using the client.

It is the downloading part which takes some time.  Not the verification.

It is therefore a matter of bandwith, not computing power.


Title: Re: Using GPU to *verify* blocks?
Post by: dirtyfilthy on February 13, 2011, 08:41:12 PM
I may be wrong about where the bottleneck is, but I was referring to the initial verification of the 100,000 existing blocks when you first start using the client.

It is the downloading part which takes some time.  Not the verification.

It is therefore a matter of bandwith, not computing power.


This becomes much less true if you use getheaders to download the blocks on a comparatively under-powered device like an Android phone.


Title: Re: Using GPU to *verify* blocks?
Post by: grondilu on February 13, 2011, 08:46:43 PM
I may be wrong about where the bottleneck is, but I was referring to the initial verification of the 100,000 existing blocks when you first start using the client.

It is the downloading part which takes some time.  Not the verification.

It is therefore a matter of bandwith, not computing power.


This becomes much less true if you use getheaders to download the blocks on a comparatively under-powered device like an Android phone.

I very much doubt it is a good idea to run a full bitcoin client on a smartphone.  But this is my personnal opinion.


Title: Re: Using GPU to *verify* blocks?
Post by: theymos on February 13, 2011, 10:14:52 PM
It is the downloading part which takes some time.  Not the verification.

It is therefore a matter of bandwith, not computing power.

Downloading and verification are actually quite fast. It's creating the index file that's slow.


Title: Re: Using GPU to *verify* blocks?
Post by: dirtyfilthy on February 13, 2011, 11:17:15 PM

I very much doubt it is a good idea to run a full bitcoin client on a smartphone.  But this is my personnal opinion.


I'm curious, why do you think this? Lots of people seem to want it. It wouldn't be a "full" client anyway, in the sense of retransmitting blocks or verifying every transaction.


Title: Re: Using GPU to *verify* blocks?
Post by: grondilu on February 13, 2011, 11:39:30 PM
I'm curious, why do you think this? Lots of people seem to want it. It wouldn't be a "full" client anyway, in the sense of retransmitting blocks or verifying every transaction.

I just don't trust smartphones for security.  Most of them don't even ask for a password to connect.  How is that even possibly secure?


Title: Re: Using GPU to *verify* blocks?
Post by: LZ on February 14, 2011, 12:44:32 PM
Downloading and verification are actually quite fast. It's creating the index file that's slow.
Can it somehow work without creating the index file? It is really slow.


Title: Re: Using GPU to *verify* blocks?
Post by: Mike Hearn on February 17, 2011, 11:11:57 AM
Yes, the "client mode" that's nearly finished in the client can speed up initial block verification considerably. However a client run in that mode can't mine.

Once mining is better separated from the main client the initial chain can be downloaded much faster.


Title: Re: Using GPU to *verify* blocks?
Post by: Hal on February 17, 2011, 11:01:14 PM
I've done some benchmarking suggesting that the main CPU bottleneck on initial block download is verifying digital signatures on all transactions in all blocks. If I download from another client on the LAN, I get up to block 70,000 in about 5 minutes, but the rest takes like half an hour.


Title: Re: Using GPU to *verify* blocks?
Post by: theymos on February 18, 2011, 02:48:01 AM
I've done some benchmarking suggesting that the main CPU bottleneck on initial block download is verifying digital signatures on all transactions in all blocks. If I download from another client on the LAN, I get up to block 70,000 in about 5 minutes, but the rest takes like half an hour.

Gavin mentioned that using the -rescan switch significantly reduces the "download" time. Does -rescan do verification?


Title: Re: Using GPU to *verify* blocks?
Post by: riX on March 09, 2011, 09:11:12 PM
I've not tried the -rescan switch, but running the client from a ram disk when doing the initial block chain download speeds up the process quite a bit. Seems like there might be some inefficient disk I/O going on.