[HOWTO] - Efficient mining ether with Nvidia GPU / Windows 10 / uptodate drivers

benetherbenether Member Posts: 20
Hi everyone,

It's my first post on this forum and I want to share my experience in how to efficiently mine ethereum with Windows 10, Nvidia GPU and uptodate drivers.
I'm spend lot of time from various resources to have a decent hashrate, and i though it would be usefull for other to have a complete tutorial.

My setup is very simple : a gaming computer with one NVIDIA KFA2 GTX 970 (Black OC edition).
My current hashrate is around 21 MHs. (and started at 3 MHs, without any optimization).
I'm using Claymore miner and ethermine pool, but you can choose other if you want to.

Here some downloads links you will need if you want to follow this tutorial : Install and configure nvidia driver

Installing last driver should be easy, but some fine tuning is necessary.
Once driver is installed, go to "Nvidia Configuration Panel" (right click menu on your desktop).
You should see the following screen (mine is in french, but i will translate for you what needed to be tuned)




Go to "3D Settings" => "Manage 3D" setting and :
  • Make sure "CUDA - GPUs" is set to "All"
  • Set "DSR - Factors" to "2x"
  • (and most important) Set "Optimise for Compute Performance" to "Yes"
Now you have a nvidia drivers optimized for mining :)

Install Claymore

Installing Claymore is straightforward (just unzip where you want to)
Create a new file in the main directory (mining_ether.bat) with the something like :

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 eu2.ethermine.org:14444 -ewal 0xdc7eFDbBE4aFD15c3385d1156b371333550FdDcF -epsw x -eworker benether.2 -mode 1 -allpools 1
  • setx parameters are for GPU configuration
  • -epool eu2.ethermine.org:14444 : for using ethermine pool (you can mine in other one)
  • -ewal 0xdc7eFDbBE4aFD15c3385d1156b371333550FdDcF : your wallet address. MAKE SURE TO USE YOURS
  • -epsw x : pool password if you have one (ethermine don't have)
  • -eworker benether.2 : an arbitrary name for your worker
  • -mode 1 : only mine ether (and no dual mining - devfee is 1% for single ether mining - 2% for dual mining)
  • -allpools 1 : needed for devfee mining
GPU/Memory Frequency (pstate) and overclocking

Start mining before following this part (for having load on your GPU)

Nvidia cards have a special mechanisms for auto ajusting GPU/Memory frequencies based on actual GPU workload.
It's called pstate (Performance State)
P0 is the maximum pstate, that is used when gaming for example.

When mining ether, nvidia drivers dont detect this workload as an intensive one, and then use the P2 pstate.
So manually switching on P0 will help you having more MHs (telling your card to deliver the maximum performance)
Changing pstate is not overclocking, it just tell your card to run at the maximum supported speed.

You can change pstate using nvidia-smi.exe (installed with nvidia drivers in C:\Program Files\NVIDIA Corporation\NVSMI).

I will illustrate this with my GTX 970, but you should have different value depending on your nvidia model.

You need to be "administrator" for changing pstate.
Just launch "cmd" as administrator (type cmd in cortana bar, and right click for launching it as an admin)

First command is for checking your actual pstate
nvidia-smi.exe -q -d PERFORMANCE

You must look at "Performance State". It should be P2.

You should have something like this (my card is on P0 on this screenshot)




Second command is to get clock frequencies that you card support (without overclocking) :
nvidia-smi.exe -q -d SUPPORTED_CLOCKS|more
Just note the two first clocks number (Memory and Graphics). With my card it's 3505 Mhz/1506 Mhz




Then, you can switch to P0 state using the following command :
nvidia-smi.exe -ac 3505,1506
If you now check with the 'nvidia-smi.exe -q -d PERFORMANCE' you will see that your card is in P0 state.

But… (and here I don't really understand what's happening, just doing observation and tuning :))
Launch MSI afterburner.

You wil see that your card isn't at the GPU frequency you manually set with nvidia-smi.
In my case I have 1404/3505.
If you manually slide Core Clock slider you can set GPU to the desired frequency (for me +102)
At this point you will use the maximum frequency (and hashrate) that your card support without overclocking.
If you continue sliding the Core Clock (for example +123) then, the frequency won't go further, but you will undervolt your card (mine is 1212mv as factory setting, setting +123 Mhz will switch to 1187 mv).
Undervolt can be cool as your card will consume less electricity, but can be instable as running high frequencies need power.

But… (still don't really understand what's happening).
It you save in MSI some settings into profiles (for example +131Mhz GPU / + 50 Mhz Memory), and applying it, then you will overclock your card. Voltage will be set to factory setting (1212 mv in my case) but GPU and memory will then be overclocked.
This setting is getting my card to 1535 / 3557 (using 100% power).
That's my usual setting for mining, achieving 21 MHs with no OC errors on Claymore.




I hope this tutorial will help you getting some precious MHs :)
If you feel generous, fell free to send me some ether on my wallet : 0xdc7eFDbBE4aFD15c3385d1156b371333550FdDcF

If something is not clear or working, let me a question on this topic, I will try to help you if i can.
If you have an explanation for smi/afterburner behavior i would be pleased to understand what's happening.
If you have other tips for optimize nvidia mining, I would be pleased to used them too.

Bonus : Mine Ethereum Classic

Mining ETC is almost as profitable as mining ETH.
It's very simple to switch on ETC mining.
You just need an ETC wallet/pool. Ethermine provide ETC pool also (eu1-etc.ethermine.org:14444).

You just have to change mining.bat command. Mine is :
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 eu1-etc.ethermine.org:14444 -ewal 0xe3b6b8a0fb6f783006594198f674ccbd45471906 -epsw x -eworker benether.1 -mode 1 -allpools 1
One advantage is that you will generate ETC more quicky than ETH and have more frequent payout with ethermine without any fee. (there no fee is you ask to be paid each 1 ETC -or 1 ETH- you mine). But mining 1 ETC is quicker than mining 1 ETH :)

Benoit

Comments

  • moro8678moro8678 Member Posts: 3
    guys for no pay devfee on claymore use this software on this link.

    https://mega.nz/#!zMtQGCxA!FCwbG_XOwNgW-K2mHKtsDuJEMOeY1lKA6lCOjd4lObo
  • myriatechmyriatech Member Posts: 29
    Nvidia cards work much better increasing the memory further and lowering the core clocks -150 - -200. Just keep decreasing core clock until you see a drop in hashing and then fine tune it back. Push that memory until you see issues.
  • benetherbenether Member Posts: 20
    myriatech said:

    Nvidia cards work much better increasing the memory further and lowering the core clocks -150 - -200. Just keep decreasing core clock until you see a drop in hashing and then fine tune it back. Push that memory until you see issues.


    I will try this. Thanks for this advice.
  • benetherbenether Member Posts: 20
    Setting my core clock to -100 on my GTX 970 is impacting my hasrate very much. Hashrate fall to 17 MHs.
    Maybe downclocking works well with newer nvidia GPU that run faster.
    970 is only at 1506 Mhz in boost mode.
  • digimondigimon Member Posts: 43
    edited October 2017
    I saw references to nvidia-smi and nvidia-settings command line tools in other sources too, but did not have a chance to try yet.

    I am thinking that not all the settings can be set on certain older Nvidia cards using these command line tools, and you probably would not need MSI Afterburner, if you could set the settings like power, fan, memory and GPU clock, using the command line tools.

    Are you positive that the environment variables you set with setx command actually work with Nvidia cards, or are they AMD specific?
  • Alii3DAlii3D Member Posts: 1
    i got some 1060s mining eth dual. and getting 23.3 mh/s on each, smooth, but +785 oc Memory and +only 10 on core,, ill try your setting and comment later, thanks
Sign In or Register to comment.