Author

Topic: MinerSwitcher: profitability-based mining farm pool switching (Read 5273 times)

hero member
Activity: 651
Merit: 501
My PGP Key: 92C7689C
Due to the impending SJW takeover of GitHub, I've moved my code repositories to GitLab.  OP updated accordingly.
hero member
Activity: 651
Merit: 501
My PGP Key: 92C7689C
ProfitLib now supports Poloniex and BleuTrade.  Coins-E support has been removed.  These changes are available to MinerSwitcher.

On more of an infrastructure-type note, the source repositories for both ProfitLib and MinerSwitcher no longer use submodules to pull in their dependencies.  Instead, dependencies should be installed systemwide.  The easiest way to get MinerSwitcher working on Gentoo Linux is to pull in my Portage overlay (https://github.com/salfter/portage) and the Bitcoin overlay (https://gitlab.com/bitcoin/gentoo) and install MinerSwitcher.  You'll most likely need to add a few ebuilds to /etc/portage/package.accept_keywords:

Code:
net-p2p/MinerSwitcher **
dev-python/pycgminer **
dev-python/bitcoinrpc ~*
dev-python/ProfitLib **
dev-python/bleuBot **
dev-python/poloniex **
dev-python/PyCCEX **
dev-python/PyCryptopia **
dev-python/PyCryptsy **
dev-python/python-bittrex **
dev-python/python-pushover ~*
dev-python/python-nmap ~*

Once that's done, build and install:

Code:
sudo emerge -av MinerSwitcher

On other platforms, dependencies can usually be installed by downloading the source, going into the directory, and issuing something like this:

Code:
sudo python setup.py install
hero member
Activity: 651
Merit: 501
My PGP Key: 92C7689C
ProfitLib has been updated to support Bittrex, Coins-E, and C-CEX in addition to Cryptsy.  MinerSwitcher has likewise been updated to use the latest ProfitLib, which expands the range of coins it can handle.
hero member
Activity: 651
Merit: 501
My PGP Key: 92C7689C
https://gitlab.com/salfter/MinerSwitcher

MinerSwitcher is a profitability-based mining farm pool switcher. For the set of coins you have configured, it will determine how many of each you can produce given your hardware, and determine what they're worth in Bitcoin. It will then reconfigure all of your miners accordingly. MinerSwitcher is algorithm-agnostic: you can have a mix of sha256 miners, scrypt miners, etc., and each will be switched to whatever is most profitable for it to mine.

Sometimes pools go down without much notice. Before switching coins, MinerSwitcher verifies that at least one of your configured pools is still up. If it isn't, it prints a warning and moves on to the next most profitable pool.  (I suspect that adding a notification mechanism (Pushover, perhaps?) is in order.)  

If configured, MinerSwitcher will also send Pushover notifications when a miner is down or pools aren't reachable.

MiningSwitcher is built around my ProfitLib library.

Example output, right after startup:

Code:
Sun Oct 19 14:19:29 2014: running ProfitLib
BTC 0.00835068
UNO 0.00507514
ZET 0.00195981
Sun Oct 19 14:19:46 2014: checking BTC pools
Sun Oct 19 14:19:48 2014: switching miner4 to BTC Guild
Sun Oct 19 14:19:50 2014: switching miner4 to Eligius
Sun Oct 19 14:19:51 2014: switching miner3 to BTC Guild
Sun Oct 19 14:19:53 2014: switching miner3 to Eligius
Sun Oct 19 14:19:54 2014: switching miner2 to BTC Guild
Sun Oct 19 14:19:55 2014: switching miner2 to Eligius
42 0.00310407
LTC 0.00227397
ANC 0.00224579
FTC 0.00213765
BTG 0.00003768
Sun Oct 19 14:19:56 2014: checking 42 pools
Sun Oct 19 14:19:56 2014: switching miner1 to HashFaster 42
Sun Oct 19 14:19:59 2014: sleep for 30 minutes

miner1 is a bunch of Gridseeds (11 orbs and a blade) hanging off a Raspberry Pi, running bfgminer.  miner2 is a Bitfury rig with a couple of BFL Jalapeños, running cgminer.  miner3 and miner4 are Antminer S1s.  They're all on my home LAN, but MinerSwitcher should also work with remote mining rigs as long as the cgminer/bfgminer RPC port is accessible to the machine running MinerSwitcher.

The only outside data dependency is Cryptsy, for exchange-rate information.  All of the remaining information MinerSwitcher needs is obtained directly from coin daemons running locally. I currently have 10 daemons (DOGE & NMC can be merge-mined and are counted as appropriate) running on a box with 4 GB of RAM; it works, but RAM is overcommitted.  I'll be kicking it up to 10 GB in the next day or two.
Jump to: