Build Your Own Ethereum Mining Rig Part 3 Windows Setup
Build Your Own Ethereum Mining Rig Part 3 Windows Setup
Setup
cryptobadger.com/2017/04/build-ethereum-mining-rig-windows
The bad news is that if you want maximum performance out of your rig, you’ll probably
eventually want to flash your GPU BIOS under either operating system, but we’ll get into
that in part 4 of this guide. But if you already know that overwriting your GPU BIOS with
a custom replacement is outside of your comfort zone, then sticking with Windows will at
least allow you to undervolt.
So with all of that in mind, if Windows sounds like the best option for you, read on for our
setup guide!
1/9
Change power options so that the computer automatically turns itself on whenever
power is restored. The reason for this is two-fold: first, it’ll make sure that your
miner automatically starts up after a power outage. Second, it makes powering the
computer on much easier if you don’t happen to have a power switch connected to
the motherboard.
Disable all components that you don’t plan to use. This might save a little bit of
power, and since your miner will likely be running 24/7, it’ll add up. For me, that
meant disabling onboard audio, the USB 3.0 ports, one of the SATA controllers, the
Firewire port, and the serial port.
If you’re running a lot of GPUs (4+), additional tweaks might be necessary to ensure
that they’re all recognized by the OS. Exact tweaks vary by motherboard, but setting
the PCIe speed to Gen1 is usually a good place to start. No need to change anything
now, but make a mental note that you may need to come back and play around a bit
if all of your GPUs don’t show up in the OS later.
Any 64-bit edition of Windows 10 should work fine (a 32-bit OS is not capable of
running the Ethereum mining software). Windows 7 and 8 will work as well (as long as
they’re 64-bit versions), although you may need to do a bit of extra work to recognize all
of your GPUs if you’re running more than 4. The guide is written assuming that you have
Windows 10, but the steps for 7/8 should be pretty similar.
I’m going to assume that everyone reading this is capable of installing a fresh copy of
Windows. Complete the installation and boot into the Windows desktop before
proceeding to the next step. If necessary, also install the LAN/Ethernet driver that came
with your motherboard so that you can get online.
Right-click on the Start Menu and select “Run”. Type “netplwiz” (without the
quotes) at the prompt, and click “ok”.
Uncheck the box that says “Users must enter a user name and password to use this
computer”.
Click “Apply”. You’ll be prompted to enter your password to confirm the change.
Right-click the Start Menu -> Control Panel -> System & Security -> Power Options.
“Balanced” should be selected. Click on “Change plan settings” next to it.
Change “Put the computer to sleep” to “Never”, then click “Save changes”.
2/9
Step 5: Minimize unscheduled reboots due to Windows Updates
Windows 10 introduced forced updates as a pretty controversial “feature”, and not having
control over when your mining rig is rebooted to install OS patches could be frustrating.
We’ll be setting things up so that your mining rig automatically begins mining any time
Windows boots, so leaving automatic updates in place certainly wouldn’t be disastrous if
you want to skip this section. But if you’d prefer to retain control over downtime, here are
some workarounds:
Keep in mind that if this is a fresh install of Windows, it’s a good idea to let the OS install
any available updates first (right-click start -> settings -> windows update -> check for
updates).
Right-click the Start Menu -> System -> click “change settings” on the right side of
the window (if you don’t see “change settings”, click “system info” first)
Click on the “Advanced” tab, then in the “Performance” area, click “Settings”
Click the “Advanced” tab, then click “Change” in the area labeled “Virtual Memory”
Uncheck the box at the top that says “Automatically manage paging file size for all
drives”, then click on the “Custom Size” radio button.
Enter “16384” (without the quotes) in both the Initial and Maximum size fields,
then click “Set”. You’ll need to reboot for the change to take effect.
Right-click the Start Menu -> System -> click “change settings” on the right side of
the window (if you don’t see “change settings”, click “system info” first)
Click on the “Advanced” tab, then in the “Performance” area, click “Settings”
On the “Visual Effects” tab (which should be open by default), click on the radio
button labeled “Adjust for best performance”, then click “Apply”
3/9
It’s ok to simply pick all of the default options during installation. Skip including ReLive
when asked, as we don’t need it.
You can skip this section if you already have an Ethereum wallet address. Otherwise,
you’ll need to create one to mine with. There are many ways to generate your own wallet
address, but I’ll show you how to do it using the official open-source Ethereum software.
Be wary about trusting other methods, as some online creation tools are potentially scams
designed to later steal your coins.
cd \Program Files\Geth
If you see a warning about starting the Ledger hub here, you can ignore it. You’ll be
prompted to enter a password, and then to confirm it (use a strong password that you
won’t forget!). The output will be a long string between two curly braces { }. That’s your
new wallet address—make a note of it. You can easily copy it by right-clicking anywhere in
the command prompt window, selecting “Mark”, highlighting your new address by
holding left-click and dragging the mouse over the entire address, and then right-clicking
again to copy to your clipboard. From there, you can paste your address anywhere
using standard Windows shortcuts (CTRL+V).
Important: The combination of the password you just used to create this address *and*
the associated encrypted key file is what gives you control over your new wallet address. If
you lose either of these, you’ve also lost control of your wallet and all of the coins
associated with it—and there is literally nothing that anyone will be able to do to help you.
Remember your password, and keep multiple backups of your key file(s)!
Your key file(s) are stored in the %APPDATA%\Ethereum directory. For a fresh
Windows 10 install, that means the C:\Users\[YOUR WINDOWS
USERNAME]\AppData\Roaming\Ethereum\keystore folder (note that the
AppData folder is hidden by default). Copy the entire keystore folder someplace safe to
backup your wallet.
4/9
If you ever forget your wallet address, you can open a command prompt, return to your
Geth installation folder, and type geth account list to see your addresses and the
location of their key files.
Download the latest version of Claymore’s ETH miner (v10.2 at the time of this
post). Make sure to get the .zip file and not the Linux tar (also check here for newer
releases)!
Extract the downloaded archive into a folder on your mining computer.
Open the folder where you extracted the miner, and create a new text file called
“mine.bat” (you can use notepad for this).
Enter the following text into your mine.bat file exactly as written (but do make sure
to substitute your own wallet address—see note below):
timeout /t 15
setx GPU_FORCE_64BIT_PTR 0
setx GPU_MAX_HEAP_SIZE 100
setx GPU_USE_SYNC_OBJECTS 1
setx GPU_MAX_ALLOC_PERCENT 100
setx GPU_SINGLE_ALLOC_PERCENT 100
ethdcrminer64.exe -epool eth-us-east1.nanopool.org:9999 -ewal
YOUR_WALLET_ADDRESS/Miner01 -epsw x -mode 1 -allpools 1
pause
Where it says YOUR_WALLET_ADDRESS, use the address you created in step 9 (you’ll
need to put “0x” in front of it). The “Miner01” following your address can be changed to
any friendly label that you want to give your miner (only important if you plan to run
multiple rigs).
Note that I’m using nanopool.org as the mining pool here. It’s a fairly typical ETH pool
that seems to have good reliability, but feel free to pick your own pool. Most don’t require
registration, and simply payout to whatever wallet address you supply whenever a certain
threshold is met (usually whenever you accumulate 1+ ETH). Assuming you stick with
Nanopool, you’ll be able to check on your miner’s status by going to this URL after you
start mining: https://eth.nanopool.org/account/[YOUR WALLET ADDRESS]
Now is a good time to perform a quick test. Simply double-click your mine.bat file to
launch the miner. It’ll take a minute or two before it actually starts mining, but it should
get there eventually. When you see a scrolling log of outputs that includes non-zero
5/9
hashrates (expect hashrates in the low to mid 20s for unoptimized GPUs), you’re good to
go. If the script fails to start, or you see errors, make sure that you’ve created the script
exactly as outlined in the guide.
Press CTRL+C to exit the miner when you’re satisfied that it’s working.
Open Windows Explorer and navigate to the folder where you created “mine.bat” in
the previous step.
Right-click on your mine.bat file, and pick “Copy”.
Now, navigate to %AppData%\Microsoft\Windows\Start
Menu\Programs\Startup (should be something like C:\Users\[YOUR
WINDOWS USERNAME]\AppData\Roaming\Microsoft\Windows\Start
Menu\Programs\Startup).
Right-click anywhere on the empty background of the Startup folder and select
“Paste shortcut”.
You should see a shortcut to your mine.bat file appear in the startup folder. Windows
should automatically execute it upon bootup.
At this point, we’re done with the essentials. If you’ve done everything correctly, you
should be able to reboot and watch your rig automatically start mining shortly after the
Windows desktop loads. There are a couple more steps that may be important to you,
though.
Open the Radeon Settings app. There should be an icon for it in your system tray. If
not, it’s located here: C:\Program Files\AMD\CNext\CNext\RadeonSettings.exe
Click on the “Gaming” tab at the top left.
Click on the “Add” button near the top right, then click “Browse”.
Navigate to the folder where you installed Claymore’s miner, select
“EthDcrMiner64.exe”, and then click “Open”.
You should see a new profile appear on the Radeon Settings App window labeled
“EthDcrMiner64”. Go ahead and click it.
Click on the “Profile OverDrive” tab.
6/9
You should see something that looks like the image on the left
(click for full-size). I’ve cropped in on the two areas that we’re
interested in (they’re labeled “GPU” and “Memory”). Find them
and start by setting the Frequency to “Dynamic” and the Voltage
Control to “Manual” in both areas.
1. We want to lower the core clock speed as low as possible without impacting
performance.
2. We want to increase the memory clock speed as high as possible without impacting
stability.
3. We want to lower both the core and memory voltage as low as possible without
impacting stability.
Before we go changing any values, if you haven’t run your miner at stock settings already
for a few minutes to get a decent idea of its baseline performance, now is a good time to
do that. Look for output along the lines of “ETH: GPU0 XX.XXX Mh/s” while Claymore’s
miner is running. There will be some variance from line to line, but that XX.XXX number
is the hash rate for that individual GPU. When you have a good idea of your average hash
rate, close the miner—it’s time to start making some changes!
Start by decreasing your core clock speed to 1000 mhz from whatever the factory
setting was (in the “GPU” area, change the values for state 6 and 7 to 1000 on the
Frequency row). Click “Apply” (at the top right). Restart your miner and see how
performance looks. There is a good chance that it’s unchanged. If that’s the case,
repeat the process, but decrease the core clock speed by another 50 mhz or so. Keep
moving down in 50 mhz increments until you notice mining performance drop.
When that happens, bump the core clock back up to the previous value—that’s the
sweet spot.
7/9
We’re going to basically do the reverse with the memory clock speed, but there are
some important things to know. If you have a GPU that is factory-clocked at 1750
mhz or less (virtually every 4GB RX 470/480 GPU, and most RX 470 8GB GPUs as
well—the Sapphire Nitro being the notable exception—then 1750 mhz is going to
probably be your limit via this method. Increasing the memory clock beyond 1750
mhz will likely result in a change to less-aggressive memory timings that will result
in a loss of performance, and there is no way to prevent this outside of BIOS
modifications. So if you have a card clocked at under 1750 mhz, bump it up to
exactly 1750 mhz, which will give you a decent performance boost. If you have a
2000 mhz card, you can increase it incrementally, like the reverse of what we did
with the core clock. Eventually you’ll experience system instability: artifacts on the
screen, a GPU crash, bluescreen, etc. When that happens, back down a bit until
things are stable.
When you’re satisfied that you’ve found the sweet spot for both clock speeds, it’s
time to lower voltages. This is pretty straightforward: drop values 25 mV at a time
until you experience instability, then bump it back up to last stable value. You
should be able to reduce your power consumption a fair bit this way without
impacting performance at all (these are great if you want to measure your electricity
usage at the wall).
While more significant performance gains are possible by flashing a custom GPU BIOS
(which I’ll cover in the next part of this guide), you should at least be able to realize some
significant power savings (which has the added benefit of lowering GPU temperatures as
well).
The screenshot in this section is from a factory-clocked 1650 mhz 4GB RX 470 GPU. Feel
free to use the settings pictured as your starting point if you have a 4GB GPU, I haven’t
found any cards that aren’t stable at these settings yet; most go a bit lower on the voltages.
Configuring remote administration will allow you to disconnect the monitor, keyboard,
and mouse from your mining rig and manage it from another computer—even over the
internet, if you wish. Windows 10 Professional and up have the built-in option to use
Remote Desktop, although it’s disabled by default and must be configured. It’s a fine
option if you’re looking for something basic and don’t want to install additional software.
There are a host of other options available, if you’re on a Home edition of Windows
and/or want something a bit more robust. I recommend TightVNC: it’s lightweight,
simple, cross-platform, and free. Here are the basic setup instructions for TightVNC:
Download TightVNC.
Install TightVNC on your mining rig. Choose a custom installation and make only
the server portion of the application available.
Now install TightVNC on the other computer(s) that you plan to manage your rig
with. Choose a custom installation and make only the client portion of the
application available.
8/9
If you plan to manage your miner across the internet, forward port 5900 on your
router to your mining rig (make sure you choose a strong password if you do this!).
That’s it—you’re done! You’ll probably want to test everything now. The easiest way to do
that is to power down your miner. Turn it back on and the following should happen:
The screenshot above shows a single 4GB RX 470 mining at the settings pictured in
section 12. I was able to get about a 10% performance gain over factory settings while
reducing power consumption at the same time. That’s good, but we can do better
(sometimes much better!) if we’re willing to venture into the world of GPU BIOS mods—
and I’ll show you how to do exactly that in the next section of my guide.
9/9