Bitcoin Forum
October 21, 2018, 05:55:23 PM *
News: Make sure you are not using versions of Bitcoin Core other than 0.17.0 [Torrent], 0.16.3, 0.15.2, or 0.14.3. More info.
 
   Home   Help Search Donate Login Register  
Pages: [1] 2 »  All
  Print  
Author Topic: Suggestion for how to choose a pool difficulty for miners.  (Read 68632 times)
-ck
Moderator
Legendary
*
Offline Offline

Activity: 2674
Merit: 1144


Ruu \o/


View Profile WWW
August 15, 2013, 12:54:37 AM
 #1

Most pools are moving to a variable difficulty or minimum variable difficulty setting to avoid the bandwidth flood that occurs with ASIC hardware, but a lot offer the option of setting a fixed target or the minimum yourself per worker. There is an endless stream of questions on almost every separate pool's thread on what difficulty they should set if setting it manually. Note that you CANNOT EARN MORE by tweaking the difficulty.

So to make it easier, I'm going to give you a mathematically suggested strategy - this is all my opinion based on the maths though since there is no one true answer.

Setting the difficulty low for your hardware risks causing floods of bandwidth problems for both the miner and the pool operators.
Setting the difficulty high for your hardware causes no potential for communication problems, but the higher the difficulty, the more variance your payouts will see (i.e. your pay will fluctuate more) but it will average out to the same pay over time.
No bitcoin mining hardware device currently in existence uses the diff internally - they all mine at diff 1 and the mining software filters out results below what your pool has set it to so it makes no difference what hardware you use as to what diff you mine at.

i.e. only hashrate matters.

So we definitely don't want the difficulty too low, but what should we use as the cut off for how high to set the diff?

Organofcorti did a wonderful analysis of this last year:
http://organofcorti.blogspot.com/2012/10/71-variable-pool-difficulty.html

There is no magic endpoint to choose since the graph of share return rate versus variance is a curve - however - above a certain share return rate, 1% variance is small enough that it is much less than the pool's own luck's variance, and unless you were mining PPS there's a good chance you wouldn't be able to distinguish the difference on any one day. You also need a much bigger jump in share return rate before you can get below that 1% variance.

So my suggestion is to aim for a share return rate no higher than the highest difficulty that keeps you at 1% variance if you are setting a "minimum difficulty" or perhaps the value that keeps you under 1.2% for a fixed difficulty. This can be worked out easily if you know your hashrate without even testing it.

So our target is a diff that returns 20-25 shares per minute.
Every 71.6MH/s returns one share per minute - therefore every GH/s returns about 14 shares per minute.

A share return rate of 20 needs a diff of 1 per 1.432GH/s if setting a fixed difficulty.
A share return rate of 25 needs a diff of 1 per 1.79GH/s if setting a minimum difficulty.

Most pools are allowing you to set a fixed diff, so let's keep this final recommendation as simple as possible, and aim for 20 shares per minute. That's a diff of 1 per 1.432GH/s. The accuracy of this maths is not that important since the final endpoint is arbitrary anyway so we can knock off a few significant digits off our final recommendation.

TL:DR
Set your diff to your worker's hashrate in GH / 1.4

Developer/maintainer for cgminer and ckpool/ckproxy.
ZERO FEE Pooled mining at ckpool.org, 1% Fee Solo mining at solo.ckpool.org
-ck
1540144523
Hero Member
*
Offline Offline

Posts: 1540144523

View Profile Personal Message (Offline)

Ignore
1540144523
Reply with quote  #2

1540144523
Report to moderator
1540144523
Hero Member
*
Offline Offline

Posts: 1540144523

View Profile Personal Message (Offline)

Ignore
1540144523
Reply with quote  #2

1540144523
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1540144523
Hero Member
*
Offline Offline

Posts: 1540144523

View Profile Personal Message (Offline)

Ignore
1540144523
Reply with quote  #2

1540144523
Report to moderator
-ck
Moderator
Legendary
*
Offline Offline

Activity: 2674
Merit: 1144


Ruu \o/


View Profile WWW
August 15, 2013, 01:02:48 AM
 #2

So taking it from the other perspective, I believe the pools should by now be forcing a minimum difficulty to prevent an effective DoS from a high hashrate miner. I would suggest they choose the higher value in my range, i.e. 25 shares per minute. The higher value also allows some leeway for the fact that calculating miner hashrate from share return rate is inherently inaccurate. The cyclical problem also exists that the lower the target the pool sets, the less accurately it will predict the miner's hashrate.

TL/DR:
Pools should force a minimum difficulty of miner hashrate in GH / 1.8

Developer/maintainer for cgminer and ckpool/ckproxy.
ZERO FEE Pooled mining at ckpool.org, 1% Fee Solo mining at solo.ckpool.org
-ck
Graet
VIP
Legendary
*
Offline Offline

Activity: 980
Merit: 1000



View Profile WWW
August 15, 2013, 01:04:21 AM
 #3

nice work
cheers ckolivas Smiley

| Ozcoin Pooled Mining Pty Ltd https://ozcoin.net Double Geometric Reward System https://lc.ozcoin.net for Litecoin mining DGM| https://crowncloud.net VPS and Dedicated Servers for the BTC community
eleuthria
Legendary
*
Offline Offline

Activity: 1750
Merit: 1001



View Profile
August 15, 2013, 03:09:29 AM
 #4

I posted a similar guideline in Slush's thread when somebody was asking.  My rule of thumb for miners has always been:

Minimum Diffulcty = Closest power of 2 (rounded down) to your GH/s.  1-2 = 1.  2-4 = 2.  4-8 = 4.  8-16 = 8, etc.

This keeps your SPM between 15 and 30 (based on how close you are to the next cutoff).  This happens to be right in line with what almost every pool currently uses for vardiff.

RIP BTC Guild, April 2011 - June 2015
-ck
Moderator
Legendary
*
Offline Offline

Activity: 2674
Merit: 1144


Ruu \o/


View Profile WWW
August 15, 2013, 05:15:26 AM
 #5

I posted a similar guideline in Slush's thread when somebody was asking.  My rule of thumb for miners has always been:

Minimum Diffulcty = Closest power of 2 (rounded down) to your GH/s.  1-2 = 1.  2-4 = 2.  4-8 = 4.  8-16 = 8, etc.

This keeps your SPM between 15 and 30 (based on how close you are to the next cutoff).  This happens to be right in line with what almost every pool currently uses for vardiff.
Yes I saw and since the question comes up at regular intervals I thought I'd post a comprehensive explanation as to why and avoid repeating the discussion over and over.

Developer/maintainer for cgminer and ckpool/ckproxy.
ZERO FEE Pooled mining at ckpool.org, 1% Fee Solo mining at solo.ckpool.org
-ck
organofcorti
Donator
Legendary
*
Offline Offline

Activity: 2058
Merit: 1000


Poor impulse control.


View Profile WWW
August 15, 2013, 07:48:07 AM
 #6

I really like your idea, Con. You and eleuthria have both come up with a much simpler way to allow miners to choose a share submission difficulty than big tables of data. Whether a miner chooses the the values you suggest, or goes for the difficulty = ghps to ghps/2 ( I know it's not that exactly, but I wanted to make clear that eleuthria's method includes your values), miners will experience minimal daily variance.

It made me think about an approximation that would allow miners to select SPM based on the amount of daily variation in hashrate they want to experience. It's a bit more complicated than either of your suggestions but might be suitable for miners who want a bit more control.

Code:
SPM = 1/(19 * v)^2

where:
SPM = shares per minute
v = percentage variation from mean, ie +/- 0.01 = +/- 1%

If you want to choose difficulty rather than SPM, here's another approximation:

Code:
d = H*(71 * v)^2

where:
d = share difficulty
H = hashrate in Ghps
v = percentage variation from mean, ie +/- 0.01 = +/- 1%

The results are approximate but reasonably close, and the percentage range is within a 95% confidence interval. The results are less accurate after about +/- 20%, but less than this they are very close to the actual values.

Some examples:
* If you want +/- 1% then SPM = 1/(19 * 0.01)^2 = 27.7 and if your hashrate is 10Ghps then choose d = 10*(71 * 0.01)^2
* If you have a hashrate of 250 Ghps and you're happy with a daily variation in hashrate of +/- 5%, then SPM = 1/(19 * 0.05)^2 = 1.108 and choose d = 250*(71 * 0.05)^2 = 3150.


I know they're not as simple or clean as either of your suggestions, but hard as I try I just can't do simple Wink  As I say it might be useful for experienced miners who know how much daily variation they can take. If I was mining again I'd be ok with a daily variation in hashrate of +/- 2 or 3%.

What do you guys think? Too complicated? Might be ok to use in some kind of website app though.

Edit Also, thanks for explaining things so well. Regardless of how a miner wants to set their difficulty, if they read your post they'll have a nicely intuitive understanding of what changing difficulty actually does.


Bitcoin network and pool analysis 12QxPHEuxDrs7mCyGSx1iVSozTwtquDB3r
follow @oocBlog for new post notifications
-ck
Moderator
Legendary
*
Offline Offline

Activity: 2674
Merit: 1144


Ruu \o/


View Profile WWW
August 15, 2013, 08:39:46 AM
 #7



Currently getting 35-40 shares per hour on Diff 128 , to average 25 SPH what should I set the difficulty to ?.



A share return rate of 20 needs a diff of 1 per 1.432GH/s if setting a fixed difficulty.
A share return rate of 25 needs a diff of 1 per 1.79GH/s if setting a minimum difficulty.


I didn't think I could make the advice any simpler than that?

Developer/maintainer for cgminer and ckpool/ckproxy.
ZERO FEE Pooled mining at ckpool.org, 1% Fee Solo mining at solo.ckpool.org
-ck
organofcorti
Donator
Legendary
*
Offline Offline

Activity: 2058
Merit: 1000


Poor impulse control.


View Profile WWW
August 15, 2013, 08:53:06 AM
 #8



Currently getting 35-40 shares per hour on Diff 128 , to average 25 SPH what should I set the difficulty to ?.



A share return rate of 20 needs a diff of 1 per 1.432GH/s if setting a fixed difficulty.
A share return rate of 25 needs a diff of 1 per 1.79GH/s if setting a minimum difficulty.


I didn't think I could make the advice any simpler than that?

No, I don't think it's possible to make it any simpler. Maybe he doesn't know his hashrate? Wink

In that case set difficulty to around 35/25*128 to 40/25*128

Edit Hey! Where'd he go?


Bitcoin network and pool analysis 12QxPHEuxDrs7mCyGSx1iVSozTwtquDB3r
follow @oocBlog for new post notifications
aneutronic
Full Member
***
Offline Offline

Activity: 170
Merit: 100


View Profile
August 15, 2013, 09:58:25 AM
 #9

Great thread guys, this helps a lot.  Thanks!
bitcoindaddy
Sr. Member
****
Offline Offline

Activity: 479
Merit: 500


View Profile
August 15, 2013, 07:05:24 PM
 #10

Too bad cgminer doesn't show average shares per minute (hint hint).

My rule of thumb is - if a minute's worth of shares fit in the terminal display, I'm okay.
Trongersoll
Hero Member
*****
Offline Offline

Activity: 490
Merit: 500



View Profile
August 15, 2013, 09:05:55 PM
 #11

Too bad cgminer doesn't show average shares per minute (hint hint).

My rule of thumb is - if a minute's worth of shares fit in the terminal display, I'm okay.

what if you resize your display? Roll Eyes
JBT
Full Member
***
Offline Offline

Activity: 165
Merit: 100


View Profile
August 16, 2013, 07:55:49 PM
 #12

if my rate is 370MH i should set my diff to like below 100? or am i reading this wrong?
zamot
Member
**
Offline Offline

Activity: 121
Merit: 10



View Profile
August 16, 2013, 08:04:33 PM
 #13

if my rate is 370MH i should set my diff to like below 100? or am i reading this wrong?
You should set it to 1.

JBT
Full Member
***
Offline Offline

Activity: 165
Merit: 100


View Profile
August 16, 2013, 08:05:46 PM
 #14

if my rate is 370MH i should set my diff to like below 100? or am i reading this wrong?
You should set it to 1.

ugh so the suggested setting of 128 for my GPU been waisting my time
eleuthria
Legendary
*
Offline Offline

Activity: 1750
Merit: 1001



View Profile
August 16, 2013, 08:27:27 PM
 #15

if my rate is 370MH i should set my diff to like below 100? or am i reading this wrong?
You should set it to 1.

ugh so the suggested setting of 128 for my GPU been waisting my time

Where did you get a 128 difficulty suggestion for a GPU?  Something tells me you mixed up MH with GH.

RIP BTC Guild, April 2011 - June 2015
JBT
Full Member
***
Offline Offline

Activity: 165
Merit: 100


View Profile
August 17, 2013, 09:03:04 AM
 #16

if my rate is 370MH i should set my diff to like below 100? or am i reading this wrong?
You should set it to 1.

ugh so the suggested setting of 128 for my GPU been waisting my time

Where did you get a 128 difficulty suggestion for a GPU?  Something tells me you mixed up MH with GH.

On the bitcoin.cz account page, now with a setting of 2 getting io errors and stale counts.
JBT
Full Member
***
Offline Offline

Activity: 165
Merit: 100


View Profile
August 17, 2013, 09:38:32 AM
 #17

bit of a noob question, if you solo mine at 370MH the chance of actually finding a block before someone else would be  about 0 say running 2-4 months and someone else finds the block all your time would have been wasted right?
dbitcoin
Hero Member
*****
Offline Offline

Activity: 742
Merit: 500

BTCDig - mining pool


View Profile WWW
August 18, 2013, 12:04:03 AM
 #18

bit of a noob question, if you solo mine at 370MH the chance of actually finding a block before someone else would be  about 0 say running 2-4 months and someone else finds the block all your time would have been wasted right?
Your chance is very low (like winning lottery jackpot), so yes, all this time is wasted.

BTCDig - mining pool (Stratum, VarDiff, DGM, SSL, JSON API)
JBT
Full Member
***
Offline Offline

Activity: 165
Merit: 100


View Profile
August 18, 2013, 08:48:09 AM
 #19

bit of a noob question, if you solo mine at 370MH the chance of actually finding a block before someone else would be  about 0 say running 2-4 months and someone else finds the block all your time would have been wasted right?
Your chance is very low (like winning lottery jackpot), so yes, all this time is wasted.

unless you can do 50 to 500GH/s but that boat have sailed.
faiza1990
Sr. Member
****
Offline Offline

Activity: 420
Merit: 250


★☆★777Coin★☆★


View Profile
August 18, 2013, 09:03:50 AM
 #20

great its works for all cheers Huh

Pages: [1] 2 »  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!