Mining on multiple pools for one coin under Windows using cpuminer...

in #cpuminer7 years ago

This batch file starts 2 miners locked to different cores (or CPUs if single-core CPUs)... It is useful if your peak hash rate is more than twice the default hash rate for selected pool ports. It should work on all NT-based Windows versions that can run .cmd files.

Save as miner.cmdor similar name and run after replacing MINER, WALLET, POOL1 and POOL2 variable contents with your own details.

The batch file can be adapted for more miners by changing last number on second line, changing the configuration section using instructions below and adding more lines to the bottom to start the extra miners.

File

@echo off
rem How many CPU cores are used for each miner...
set /a nproc = %NUMBER_OF_PROCESSORS% / 2
rem Path to cpuminer, replace with where you have extracted cpuminer
set MINER=cpuminer-gw64-core2.exe
rem Wallet address... replace __WALLET_ADDRESS__ with your own wallet address
set WALLET=__WALLET_ADDRESS__
rem Pool addresses... replace with correct stratum addresses
set POOL1=stratum+tcp://pool1.net:3333
set POOL2=stratum+tcp://pool2.com:3333
rem Affinity masks... One line per miner
set AFFINITY1=AA
set AFFINITY2=55
rem Port numbers... One line per miner
set PORT1=4050
set PORT2=4051
rem Launch each miner in own window... One line per miner, static difficulty = %WALLET%.difficulty
start "Miner 1 - %nproc%/%NUMBER_OF_PROCESSORS% cores" /AFFINITY %AFFINITY1% %MINER% -a cryptonight -o %POOL1% -u %WALLET% -p x -t %nproc% -b %PORT1%
start "Miner 2 - %nproc%/%NUMBER_OF_PROCESSORS% cores" /AFFINITY %AFFINITY2% %MINER% -a cryptonight -o %POOL2% -u %WALLET% -p x -t %nproc% -b %PORT2%

NOTES

  • Numbers on each added line after %POOL and %AFFINITY and %PORT should be sequentially increasing number.
  • If some pools allow static difficulty after wallet address, you can add it on line for that pool after %WALLET% (for example: %WALLET%.1000)
  • If some pools allow replacing password with worker name, change x with worker name on that line.
  • If some pools require username instead of wallet address, you can replace %WALLET% on that line with username or username.worker. Replace x with correct password.
  • Core count must be multiple of miner count or some cores will not be used.
  • For 2 miners, affinity masks are:
    AA, 55 (for 2-core, 4-core or 8-core machines)
    2A, 15 (for 6-core machines)
  • For 3 miners, affinity masks are:
    24, 12, 09 (for 3-core or 6-core machines)
  • For 4 miners, affinity masks are:
    88, 44, 22, 11 (for 4-core or 8-core machines)
  • For 6 miners, affinity masks are:
    20, 10, 08, 04, 02, 01 (for 6-core machines only)
  • For 8 miners, affinity masks are:
    80, 40, 20, 10, 08, 04, 02, 01 (for 8-core machines only)

Coin Marketplace

STEEM 0.17
TRX 0.25
JST 0.034
BTC 96277.96
ETH 2823.68
SBD 0.68