Bitcoin Forum

Other => Beginners & Help => Topic started by: jsnikeris on December 19, 2011, 03:01:39 AM



Title: Solo Mining w/ cgminer: Optimal scan time
Post by: jsnikeris on December 19, 2011, 03:01:39 AM
Hi all,

I'm using cgminer to generate Bitcoins using the GPU on my HD4870.

I've read that when going solo, you want to check if a new block has been created very frequently. This is to minimize work spent on a block that has already been solved.

How do I change the frequency with which cgminer asks bitcoind if a new block has been detected on the network?

Basically, I'd like to minimize the time between someone generating a new block and cgminer printing this message:

Quote
[2011-12-18 21:51:30] New block detected on network, waiting on fresh work

I see two options that might fit the bill:

Quote
--scan-time|-s <arg> Upper bound on time spent scanning current work, in seconds (default: 60)
--expiry|-E <arg>   Upper bound on how many seconds after getting work we consider a share from it stale (default: 120)

Thanks in advance!


Title: Re: Solo Mining w/ cgminer: Optimal scan time
Post by: grue on December 19, 2011, 03:25:28 AM
first, don't try to mine solo on 4870. it will take you over 1.5 year to get a block!

second, i would set it to 1 or 2. it's local, so it wouldn't hurt to poll more frequently, right?


Title: Re: Solo Mining w/ cgminer: Optimal scan time
Post by: jsnikeris on December 19, 2011, 04:03:15 AM
second, i would set it to 1 or 2. it's local, so it wouldn't hurt to poll more frequently, right?

Yes, I'd like to set it to 1 or 2. However, I'm not sure which setting corresponds to what I'm trying to do.


Title: Re: Solo Mining w/ cgminer: Optimal scan time
Post by: grue on December 19, 2011, 01:15:01 PM
second, i would set it to 1 or 2. it's local, so it wouldn't hurt to poll more frequently, right?

Yes, I'd like to set it to 1 or 2. However, I'm not sure which setting corresponds to what I'm trying to do.
--scan-time|-s <arg> Upper bound on time spent scanning current work, in seconds (default: 60)


Title: Re: Solo Mining w/ cgminer: Optimal scan time
Post by: jsnikeris on December 19, 2011, 09:53:34 PM
--scan-time|-s <arg> Upper bound on time spent scanning current work, in seconds (default: 60)

The description of this option confuses me.

What happens when cgminer isn't finished with its current work, there hasn't been a new block published, but the scan-time elapses?

The description of this option makes it sound like cgminer will just abandon its current work since the 'upper bound on time spent scanning current work' has elapsed.


Title: Re: Solo Mining w/ cgminer: Optimal scan time
Post by: DeathAndTaxes on December 19, 2011, 10:29:42 PM
--scan-time|-s <arg> Upper bound on time spent scanning current work, in seconds (default: 60)

The description of this option confuses me.

What happens when cgminer isn't finished with its current work, there hasn't been a new block published, but the scan-time elapses?

The description of this option makes it sound like cgminer will just abandon its current work since the 'upper bound on time spent scanning current work' has elapsed.

IIRC cgminer NEVER abandons work unless a new block is found or it receives a long poll.

So even w/ scantime of 1 the miner will keep working on existing work even when scanning every second.   If a new block is found it clears the work Q, waits until the GPU finishes the current "chunk" (no way to interrupt an OpenCL kernel) and then processes the new data.

That being said

Quote
first, don't try to mine solo on 4870. it will take you over 1.5 year to get a block!
1.5 years is just the average time.  There is a roughly 18% chance you will find no block in the next DECADE.