Skip to content
This repository has been archived by the owner on Apr 24, 2022. It is now read-only.

Try and force Linux Nvidia cards to higher Performance Level , ie. pstate ie perflevel #456

Closed
twiggy opened this issue Dec 21, 2017 · 10 comments
Labels

Comments

@twiggy
Copy link

twiggy commented Dec 21, 2017

Nvidia has been a bunch of a bad boys and has been nerfing the linux drivers ability to set clock rates and such.
As soon as ethminer kicks in some 1060 and 1070 cards will change from Performance Level 3 to Performance Level 2. This results in a bit of a drop in MHS.

Is there anyway the ethminer could trick these cards into needing a higher level.

@H05ted
Copy link

H05ted commented Dec 21, 2017 via email

@Profetul
Copy link

Unfortunately -ac would not work on 1070 cards - what I've done to mine is set the memory OC to a value that would match P2 to the value I would normally get in P3.

My Gigabyte GTX 1070 G1 reports 30 Mh/s having the memory OC to 8808 MHz instead of the standard 8008 MHz and runs at 61C with power limit set to 120W. (To get there I have to OC Memory +1200! -> P2 would show 8808)

Default settings on 1070 would get me 26 Mh/s - so with minor adjustments the hash-rate can be improved with about 15% and with less power usage.

I can confirm that -ac works for my 970 card, but I don't notice any hash rate improvements - might be because of having the power limit set to 100W. I get ~9.5 Mh/s so it's a waste of power compared to 1070.

This guy has some nice scripts to make ethminer a daemon on Linux - https://gist.github.com/bmatthewshea

I've just added in his ethminer-monitor.sh some lines to set the power limits using nvidia-smi and to set OC using nvidia-settings - this way if my computer restarts it would always have the correct settings.

@chfast chfast added the question label Jan 5, 2018
@bm2k
Copy link

bm2k commented Jan 9, 2018

@Profetul Good information. I also have GeForce 1070 cards and Linux your answer is relevant for me. The one key piece of info you left out is how exactly do you overclock in Linux w/out using the "-ac" setting? What commands do you use? I know in Windows people use tools like MSI Afterburner and such, but for Linux I have not come across any OC'ing tools. My 1070's also get ~26MH/s out of the box.

@Profetul
Copy link

Profetul commented Jan 10, 2018

@bm2k Ubuntu nVidia drivers come with an utility named nvidia-settings -
Running sudo nvidia-xconfig --cool-bits=28 should enable you to change the OC settings of the card

A quick search on google yielded this result ... https://gist.github.com/bsodmike/369f8a202c5a5c97cfbd481264d549e9

@DeadManWalkingTO
Copy link
Contributor

  1. Try Update Drivers.
    Download and install the latests.

  2. Try use -U for CUDA devices.
    That's my launch command:
    ethminer.exe -RH -U -S eu1.ethermine.org:4444 -FS us1.ethermine.org:4444 -O 0x7013275311fc37ccc1e40193D75086293eCb43A4.test

  3. Try to change P2 State and Power managment mode.
    You can use NVidiaProfileInspectorDmW.
    For the best mining hashrate choose from sector "5 - Common":

    • CUDA - Force P2 State (Set to "Off")
    • Power managment mode (Set to "Prefer maximum performance")
  4. Try Tweak Win10.
    You can use Windows10MiningTweaksDmW (Solution for 100% CPU usage (Win10 - CUDA - OpenCL) #695).

  5. Try Optimize/Overclock GPUs.
    You can use MSI Afterburner for GPU OverClock/Optimize.
    My settings +150/+500/65%TDP
    Hashrate 31-32@52oC

  6. Try use a WatchDog
    You can use ETHminerWatchDogDmW (Simple Script WatchDog #735).

Please feedback.
Thank you!

@eeerrrttty
Copy link

@DeadManWalkingTO please, give us the linux version of your answer

@DeadManWalkingTO
Copy link
Contributor

@eeerrrttty

Linux

  1. Try Update Drivers.
    Download and install the latests.

  2. Try Update Ethminer.
    Download (or beter build) the latest.

  3. Try use -U for CUDA devices.
    CUDA Hardware Test Launch Command:

./ethminer -RH -U -S eu1.ethermine.org:4444 -FS us1.ethermine.org:4444 -O 0x7013275311fc37ccc1e40193D75086293eCb43A4.hardwaretest
  1. Try to change P2 State and Power managment mode.
    You can use nvidia-smi.

    • Always put GPU in full speed / P0
    nvidia-settings -a [gpu:0]/GPUPowerMizerMode=1
    
    • Set GPU to "COMPUTE" with nvidia-smi --gom=COMPUTE
  2. Try Tweak Linux.
    Disable unnesesary daemons etc.

  3. Try Optimize/Overclock GPUs.

    • A listing of available clock speeds nvidia-smi -q -d SUPPORTED_CLOCKS
    • Review the current GPU clock speed, default clock speed, and maximum possible clock speed nvidia-smi -q -d CLOCK
    • Review the current state of each GPU and any reasons for clock slowdowns nvidia-smi -q -d PERFORMANCE
    • NVidia-smi device modification section
    -pm,  --persistence-mode=   Set persistence mode: 0/DISABLED, 1/ENABLED
    -e,   --ecc-config=         Toggle ECC support: 0/DISABLED, 1/ENABLED
    -p,   --reset-ecc-errors=   Reset ECC error counts: 0/VOLATILE, 1/AGGREGATE
    -c,   --compute-mode=       Set MODE for compute applications:
                                0/DEFAULT, 1/EXCLUSIVE_THREAD,
                                2/PROHIBITED, 3/EXCLUSIVE_PROCESS
          --gom=                Set GPU Operation Mode:
                                    0/ALL_ON, 1/COMPUTE, 2/LOW_DP
    -r    --gpu-reset           Trigger reset of the GPU.
                                Can be used to reset the GPU HW state in situations
                                that would otherwise require a machine reboot.
                                Typically useful if a double bit ECC error has
                                occurred.
                                Reset operations are not guarenteed to work in
                                all cases and should be used with caution.
                                --id= switch is mandatory for this switch
    -ac   --applications-clocks= Specifies  clocks as a
                                    pair (e.g. 2000,800) that defines GPU's
                                    speed in MHz while running applications on a GPU.
    -rac  --reset-applications-clocks
                                Resets the applications clocks to the default values.
    -acp  --applications-clocks-permission=
                                Toggles permission requirements for -ac and -rac commands:
                                0/UNRESTRICTED, 1/RESTRICTED
    -pl   --power-limit=        Specifies maximum power management limit in watts.
    -am   --accounting-mode=    Enable or disable Accounting Mode: 0/DISABLED, 1/ENABLED
    -caa  --clear-accounted-apps
                                Clears all the accounted PIDs in the buffer.
          --auto-boost-default= Set the default auto boost policy to 0/DISABLED
                                or 1/ENABLED, enforcing the change only after the
                                last boost client has exited.
          --auto-boost-permission=
                                Allow non-admin/root control over auto boost mode:
                                0/UNRESTRICTED, 1/RESTRICTED
  1. Try use a WatchDog
    You can use ETHminerWatchDogDmW (Simple Script WatchDog #735).

Please feedback.
Thank you!

@eeerrrttty
Copy link

@DeadManWalkingTO -

What does WatchDog do? i don't know what it is/how use it...

`nvidia-smi -q -d PERFORMANCE

==============NVSMI LOG==============

Timestamp : Sun Mar 4 17:46:07 2018
Driver Version : 390.30

Attached GPUs : 1
GPU 00000000:01:00.0
Performance State : P2
Clocks Throttle Reasons
Idle : Not Active
Applications Clocks Setting : Not Active
SW Power Cap : Not Active
HW Slowdown : Not Active
HW Thermal Slowdown : Not Active
HW Power Brake Slowdown : Not Active
Sync Boost : Not Active
SW Thermal Slowdown : Not Active
Display Clock Setting : Not Active
nvidia-smi -q -d SUPPORTED_CLOCKS

==============NVSMI LOG==============

Timestamp : Sun Mar 4 17:45:49 2018
Driver Version : 390.30

Attached GPUs : 1
GPU 00000000:01:00.0
Supported Clocks : N/A

ert@romario-computer:~$ nvidia-smi -q -d PERFORMANCE
nvidia-smi -q -d CLOCK

==============NVSMI LOG==============

Timestamp : Sun Mar 4 17:45:06 2018
Driver Version : 390.30

Attached GPUs : 1
GPU 00000000:01:00.0
Clocks
Graphics : 1101 MHz
SM : 1101 MHz
Memory : 4303 MHz
Video : 987 MHz
Applications Clocks
Graphics : N/A
Memory : N/A
Default Applications Clocks
Graphics : N/A
Memory : N/A
Max Clocks
Graphics : 1911 MHz
SM : 1911 MHz
Memory : 4004 MHz
Video : 1708 MHz
Max Customer Boost Clocks
Graphics : N/A
SM Clock Samples
Duration : 2.00 sec
Number of Samples : 100
Max : 1290 MHz
Min : 1063 MHz
Avg : 1173 MHz
Memory Clock Samples
Duration : 2.00 sec
Number of Samples : 100
Max : 4303 MHz
Min : 4302 MHz
Avg : 4302 MHz
Clock Policy
Auto Boost : N/A
Auto Boost Default : N/A
`
My actual clock is in +1000 for mem and -200 for core.

more than 1000 system gets little buggy.

step 4. changes nothing.
I kept on shit 18.5Mh/s.

really, this GPU should work on 25Mh/s. This is a 30% loss!!!

Many people with Hynix memory are with this problem, this has to be a solution

@DeadManWalkingTO
Copy link
Contributor

After #757 (added --exit parameter to exit whenever an error occurred) you can use a watchdog.

Try ETHminerWatchDogDmW Windows7/8/10 [32/64] & Linux (Any Dist/Any Ver/Any Arch) (#735).

Check and feedback please.
Thank you!

@eeerrrttty
Copy link

How do i use ETHminerwatchDogDmw???

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

8 participants