No doubt some of you saw the Ethereum mining guide for Linux
that I published last week and balked at all of that “command-line
nonsense”. Linux isn’t everyone’s thing, and that’s ok—if Windows is
your OS of choice, then this guide is for you!
While Linux offers some significant advantages when it comes to GPU mining, Windows does have one potentially important edge: undervolting your GPUs currently requires quite a bit less effort under Windows. If you want your mining rig to run at its maximum efficiency, you’ll want to keep power consumption to a minimum, and with Linux that generally requires flashing a custom BIOS to each GPU—whereas in Windows you can usually accomplish this at the driver level with a simple software setting.
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!
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.
Reboot after the driver installation is complete.
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.
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.
Note that I’m using ethermine.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 ethermine.org, you’ll be able to check on your miner’s status by going to this URL after you start mining: https://ethermine.org/miners/[YOUR WALLET ADDRESS]
Save and close notepad when you’re done.
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 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.
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.
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.
Before we go any further, I’ll just throw out this disclaimer: changing the factory voltage settings on your GPU can result in system instability, crashes, and/or damage. Proceed at your own risk! Honestly, the risk here is tiny—we’re still constrained to basically safe values by AMD’s software, and in the case of a crash we’ll just reboot and be back to factory settings (where we can try again with less-aggressive values).
We’re aiming to accomplish three things here:
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.
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:
While Linux offers some significant advantages when it comes to GPU mining, Windows does have one potentially important edge: undervolting your GPUs currently requires quite a bit less effort under Windows. If you want your mining rig to run at its maximum efficiency, you’ll want to keep power consumption to a minimum, and with Linux that generally requires flashing a custom BIOS to each GPU—whereas in Windows you can usually accomplish this at the driver level with a simple software setting.
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!
Build an Ethereum Mining Rig, part 3: Windows Setup
I won’t go into quite the same excruciating level of detail as I did with my Linux guide, as it’s probably a safe assumption that anyone reading a guide about building a custom cryptocurrency mining rig is already quite comfortable with basic Windows tasks. The steps outlined below should be more than adequate for the average Windows user, but feel free to leave comments if anything is unclear!Step 1: Configure BIOS Settings
Before we even get to Windows, make sure your mining computer’s BIOS settings are in order. Power on your computer, and press the “delete” key a few times immediately after power on. You should end up in the BIOS configuration area. Do the following, then save & exit:- 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.
Step 2: Install Windows 10
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.
Step 3: Configure automatic login
If you’re building a dedicated mining rig, then you probably want your mining rig to boot up and start mining automatically, without any user intervention. We’ll need to enable auto-login for that to be possible.- 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.
Step 4: Change power settings to prevent sleep
By default, Windows will go to sleep after 30 minutes without user interaction. Obviously, we don’t want that behavior on our mining rigs. To disable it:- 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”.
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:- If you have Windows 10 Home, use this method
- If you have Windows 10 Professional or better, this method is preferrable
Step 6: Allocate at least 16GB of virtual memory
The author of the mining software that we’ll be using recommends this step, although I’ve never encountered issues with a smaller pagefile (edit 4/19/17: I tried mining on a machine with only 4GB of physical RAM and got terrible performance until I increased my pagefile to 16GB). Here’s what you need to do:- 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.
Step 7: Disable unnecessary Windows visual effects
On systems with borderline hardware, this may increase performance a bit and help keep the OS a bit more responsive during mining:- 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”
Step 8: Install AMD GPU drivers
I’ve tried a few different driver versions in my testing, and while there were a few performance issues with some 16.x versions, they appear to have been cleared up in later releases. So there is currently no reason to not use the latest available AMD drivers (17.4.2 at the time of this post).- Download and install the latest Radeon drivers from AMD’s website.
Reboot after the driver installation is complete.
Step 9: Generate a wallet address
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.- Download the latest release of Geth for Windows here.
- When the download is finished, run the installer and select all of the default options.
- Open a command prompt window (right-click the Start Menu -> Command Prompt).
- Type the following to switch to the Geth installation directory (assuming you installed it in the default location):
cd \Program Files\Geth
- Type the following to create a new wallet address:
geth account new
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.
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.
Step 10: Install Claymore’s Ethereum miner
I talked about my reasons for selecting Claymore’s miner over other alternatives in my Linux guide, but to sum up: it’s currently the fastest, most stable Ethereum miner that’s still under active development. The downside is that it’s not free—about 1% of your mining time will benefit the creator of the software instead of you. However, even after the usage fee, you’ll come out ahead compared to the alternatives.- Download the latest version of Claymore’s ETH miner (v9.0 at the time of this post). Make sure to get the .zip file and not the Linux tar!
- 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 us1.ethermine.org:4444 -ewal YOUR_WALLET_ADDRESS.Miner01 -epsw x -mode 1
-tt 68 -allpools 1
pause
Note that I’m using ethermine.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 ethermine.org, you’ll be able to check on your miner’s status by going to this URL after you start mining: https://ethermine.org/miners/[YOUR WALLET ADDRESS]
Save and close notepad when you’re done.
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 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.
Step 11: Configure your miner to start automatically
We want our rig to automatically start mining whenever it’s powered on or rebooted. That way, we keep mining losses to a minimum whenever a power outage occurs, and we don’t have to worry about manually starting it back up in other situations.- 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”.
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.
Step 12 (optional): Optimize clock speeds and undervolt (basic)
We’ll get into more advanced optimization in the next section of this guide, but as long as we’re on Windows, it doesn’t hurt to see what we can accomplish via some basic driver setting adjustments. We should be able to squeeze out some extra performance on most RX 470/480 cards and save a bit of power without venturing into the realm of BIOS mods.- 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.
(click for full-size)
Before we go any further, I’ll just throw out this disclaimer: changing the factory voltage settings on your GPU can result in system instability, crashes, and/or damage. Proceed at your own risk! Honestly, the risk here is tiny—we’re still constrained to basically safe values by AMD’s software, and in the case of a crash we’ll just reboot and be back to factory settings (where we can try again with less-aggressive values).
We’re aiming to accomplish three things here:
- We want to lower the core clock speed as low as possible without impacting performance.
- We want to increase the memory clock speed as high as possible without impacting stability.
- We want to lower both the core and memory voltage as low as possible without impacting stability.
- 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.
- 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).
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.
Step 13 (optional): Configure remote administration
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.
- 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!).
- Windows should boot up as usual.
- You should see a 15 second countdown to the Claymore miner’s launch shortly after the Windows desktop appears.
- After the countdown, the miner will start, and your GPUs should start mining.
- You should be able to VNC into your rig at any point after the desktop loads to monitor your miner’s progress and GPU temperatures.
- If you ever need to start the Claymore miner manually (because you quit out of it, or it crashed, etc), simply double-click your mine.bat file, located in your Claymore miner installation folder.
Comments
Post a Comment