Bitcoin Forum

Other => Beginners & Help => Topic started by: viktorz on April 02, 2012, 08:15:58 AM



Title: cgminer and --failover-only
Post by: viktorz on April 02, 2012, 08:15:58 AM
How does it works --failover-only ?
As I understood it will switch to another pool when primary is idle or fail, and after how much hour or minutes it will back to primary pool and how much times it will check whether primary pool alive or not?


Title: Re: cgminer and --failover-only
Post by: John (John K.) on April 02, 2012, 08:36:29 AM
It pools the main pool continuously at the background - my guess is around 100msec or something, didn't check the coding but it's almost instantaneous. It'll shift automatically back one the main pool is up.


Title: Re: cgminer and --failover-only
Post by: viktorz on April 02, 2012, 11:52:15 AM
My inet is not so fast, 100msec too much how to increase it to one or two minutes?


Title: Re: cgminer and --failover-only
Post by: misternoodle on April 02, 2012, 10:31:28 PM
I believe you can change it under ettings.


Title: Re: cgminer and --failover-only
Post by: John (John K.) on April 03, 2012, 02:36:07 AM
My inet is not so fast, 100msec too much how to increase it to one or two minutes?
For me, I use a spare pool with mine and set it to 'load balancing' hence if the first is slow/fails a bit, the shares will automatically get to the second pool.


Title: Re: cgminer and --failover-only
Post by: -ck on April 03, 2012, 06:06:44 AM
The normal failover mechanism in cgminer will allow some work to go to the backup pools if there is a delay in getting work from the primary pool you have set. This can be as much as 10% if the pool has latency issues. It then only fails to the backup pool if the primary pool stops giving work for 1 minute. failover-only does not change the failover mechanism, but it does not allow work to go to the backup pools unless the primary pool has failed completely for at least a minute. It then will switch to the backup pool. If cgminer considers a pool dead or down, it tries to contact that pool 1 minutely.


Title: Re: cgminer and --failover-only
Post by: viktorz on April 03, 2012, 06:21:32 AM
Thanks then, I'll use failover-only.

My inet is not so fast, 100msec too much how to increase it to one or two minutes?
For me, I use a spare pool with mine and set it to 'load balancing' hence if the first is slow/fails a bit, the shares will automatically get to the second pool.

Yes it is good but some pools gives less coins then another pools ))


Title: Re: cgminer and --failover-only
Post by: John (John K.) on April 03, 2012, 04:06:29 PM
Two commands you might want to pass :

--retries|-r <arg>  Number of times to retry before giving up, if JSON-RPC call fails (-1 means never) (default: -1)
--retry-pause|-R <arg> Number of seconds to pause, between retries (default: 5)


Title: Re: cgminer and --failover-only
Post by: wogaut on June 03, 2012, 08:57:52 PM
The normal failover mechanism in cgminer will allow some work to go to the backup pools if there is a delay in getting work from the primary pool you have set. This can be as much as 10% if the pool has latency issues. It then only fails to the backup pool if the primary pool stops giving work for 1 minute. failover-only does not change the failover mechanism, but it does not allow work to go to the backup pools unless the primary pool has failed completely for at least a minute. It then will switch to the backup pool. If cgminer considers a pool dead or down, it tries to contact that pool 1 minutely.

Can that 1 minute value be changed on the command line?



Title: Re: cgminer and --failover-only
Post by: raiding on November 09, 2016, 03:09:00 PM
Hy.

I know this threat is old, but I've got a problem which may suits here very well ...

I want to use the --failover-only option, to jump betweeen solo.ckpool.org and de.ckpool.org if one of them has connection problems, so cgminer won't stop working.

But cgminer doesn't.

If one pool fails, he tries again and again to connect to one pool and ignores the second one ...

cgminer -o stratum+tcp://solo.ckpool.org:3333 -u username -p x --retries 1 --failover-only -o stratum+tcp://de.ckpool.org:3333 -u username -p x


Title: Re: cgminer and --failover-only
Post by: jonnybravo0311 on November 10, 2016, 02:36:26 PM
As -ck pointed out, the default policy (at least in 2012) is for the software to send up to 10% of the work to the backup pool if the primary has delays in sending work.  If the primary becomes unresponsive, all work will shift to the backup.  With --failover-only, the software will not send partial work to the backup.  It's all or nothing.

You can see what each option does here: https://github.com/ckolivas/cgminer

Also, I'm not sure what that "retries" option is.  It isn't listed as a command line argument in the cgminer docs and is probably what's screwing you up.

To do what you want, simply make your command as follows:

Code:
cgminer -o stratum+tcp://solo.ckpool.org:3333 -u user -p pass -o stratum+tcp://de.ckpool.org:3333 -u user -p pass


Title: Re: cgminer and --failover-only
Post by: raiding on November 10, 2016, 02:52:27 PM
Damn, I missunderstood the option completely :D

Thank you very much for ur help


Title: Re: cgminer and --failover-only
Post by: jonnybravo0311 on November 10, 2016, 03:28:55 PM
My pleasure.  Good luck hitting the solo block :)