1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-11 07:17:58 +00:00

Use the --failover-only flag to have special meaning in combination with load-balance mode to distribute any unused quota back to pool 0 to maintain ratios amongst other pools.

This commit is contained in:
Con Kolivas 2013-09-08 10:09:26 +10:00
parent ea1a1b1bf7
commit 26a8a8e2c6
2 changed files with 13 additions and 2 deletions

5
README
View File

@ -516,6 +516,11 @@ looking, so if the quota is changed on the fly, it only affects future work.
If all pools are set to zero quota or all pools with quota are dead, it will
fall back to a failover mode. See quota below for more information.
The failover-only flag has special meaning in combination with load-balance
mode and it will distribute quota back to pool 0 from any pools that are
unable to provide work for any reason so as to maintain quota ratios between
the rest of the pools.
BALANCE:
This strategy monitors the amount of difficulty 1 shares solved for each pool
and uses it to try to end up doing the same amount of work for all pools.

View File

@ -2843,8 +2843,14 @@ static inline struct pool *select_pool(bool lagging)
if (pool->quota_used++ >= pool->quota) {
pool->quota_used = 0;
pool = NULL;
} else if (!pool_unworkable(pool))
} else {
if (!pool_unworkable(pool))
break;
/* Failover-only flag for load-balance means distribute
* unused quota to pool 0. */
if (opt_fail_only)
pools[0]->quota++;
}
pool = NULL;
if (++rotating_pool >= total_pools)
rotating_pool = 0;