Note:
Optimizing GPU to its peak means getting maximum out of it and stressing it more. According to me, OC will reduce the life of the GPU. Hence please tune the GPU with some benchmarking tool. Double check GPU temperature. I am keeping the power to as low as possible especially for 1060 which actually give you good hasrate.
Enable GPU tuning using nvidia-settings utility
sudo nvidia-xconfig -a --allow-empty-initial-configuration --cool-bits=28 --enable-all-gpus
For headless systems, you should configure xorg with dummy configuration
sudo nvidia-xconfig -a --force-generate --allow-empty-initial-configuration --cool-bits=28 --no-sli --connected-monitor="DFP-0"
Tuning Power Consumption for 1070/1060/1050ti
GTX 1070 (Expected Hash rate for ETH ~30 MH/s):
nvidia-smi -pm 1
nvidia-smi -pl 110
GTX 1060 (Expected Hash rate for ETH ~22 MH/s):
nvidia-smi -pm 1
nvidia-smi -pl 90
GTX 1050 Ti (Expected Hash rate for ETH ~13.1 MH/s):
nvidia-smi -pm 1
nvidia-smi -pl 60
Setting FAN speed and Memory clock speed. Similarly, do it for all GPU available in the system
GTX 1070 (~30 MH/s Solo ETH):
sudo nvidia-settings -c :0 -a [gpu:0]/GPUMemoryTransferRateOffset[3]=1100
sudo nvidia-settings -c :0 -a [gpu:0]/GPUGraphicsClockOffset[3]=-200
sudo nvidia-settings -c :0 -a [gpu:0]/GPUFanControlState=1
sudo nvidia-settings -c :0 -a [fan:0]/GPUTargetFanSpeed=80
GTX 1060 (~21.5 MH/s Solo ETH):
sudo nvidia-settings -c :0 -a [gpu:0]/GPUMemoryTransferRateOffset[3]=1600
sudo nvidia-settings -c :0 -a [gpu:0]/GPUGraphicsClockOffset[3]=-160
sudo nvidia-settings -c :0 -a [gpu:0]/GPUFanControlState=1
sudo nvidia-settings -c :0 -a [fan:0]/GPUTargetFanSpeed=80
GTX 1050 Ti (~13.1 MH/s Solo ETH):
sudo nvidia-settings -c :0 -a [gpu:0]/GPUMemoryTransferRateOffset[2]=600
sudo nvidia-settings -c :0 -a [gpu:0]/GPUGraphicsClockOffset[2]=-100
sudo nvidia-settings -c :0 -a [gpu:0]/GPUFanControlState=1
sudo nvidia-settings -c :0 -a [fan:0]/GPUTargetFanSpeed=80
NVIDIA Auto OC Script
#!/bin/bash
##
#Define Environment Variable
# MemoryOffset="1600" ClockOffset="-200" FanSpeed="80" export DISPLAY=:0 xset -dpms xset s off xhost + ##Create xorg.conf with cool bits. I will use 31.. please check the manual properly nvidia-xconfig -a --force-generate --allow-empty-initial-configuration --cool-bits=31 --no-sli --connected-monitor="DFP-0" echo "In case of any error please reboot and run this script again" # Paths to the utilities we will need SMI='/usr/bin/nvidia-smi' SET='/usr/bin/nvidia-settings' # Determine major driver version VER=$(awk '/NVIDIA/ {print $8}' /proc/driver/nvidia/version | cut -d . -f 1) # Drivers from 285.x.y on allow persistence mode setting if [ "${VER}" -lt 285 ] then echo "Error: Current driver version is ${VER}. Driver version must be greater than 285."; exit 1; fi $SMI -pm 1 # enable persistance mode $SMI -i 0,1,2,3,4 -pl 90 echo "Applying Settings" # how many GPU's are in the system? NUMGPU="$(nvidia-smi -L | wc -l)" # loop through each GPU and individually set fan speed n=0 while [ $n -lt "$NUMGPU" ]; do # start an x session, and call nvidia-settings to enable fan control and set speed ${SET} -c :0 -a [gpu:${n}]/GPUFanControlState=1 -a [fan:${n}]/GPUTargetFanSpeed=$FanSpeed ${SET} -c :0 -a [gpu:${n}]/GpuPowerMizerMode=1 ${SET} -c :0 -a [gpu:${n}]/GPUMemoryTransferRateOffset[3]=$MemoryOffset ${SET} -c :0 -a [gpu:${n}]/GPUGraphicsClockOffset[3]=$ClockOffset let n=n+1 done echo "Complete"; exit 0;
This comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
Deletehey!
ReplyDeletethanks for posting this as it's just what I have been looking for thanks, as I recently received a Nvidia GTX 1060 and I'm trying to squeeze a little more performance out of it in my little mini test rig!
However, I cannot see or confirm any change in memory or graphics clock speeds...
The output from:
# nvidia-smi -q -i 1 -d CLOCK
shows that nvidia driver version 390.25 is in use:
Timestamp : Mon Mar 12 16:23:50 2018
Driver Version : 390.25
and that the current clock speed settings are:
Attached GPUs : 2
GPU 00000000:0B:00.0
Clocks
Graphics : 1860 MHz
SM : 1860 MHz
Memory : 3802 MHz
Video : 1670 MHz
with Max Clocks:
Max Clocks
Graphics : 1961 MHz
SM : 1961 MHz
Memory : 4004 MHz
Video : 1708 MHz
so according to this I can "safely" boost the memory clock by 202MHz to 4004MHz, so the command to use is:
# nvidia-settings -c :0 -a [gpu:1]/GPUMemoryTransferRateOffset[3]=202
but I see no change to the current clock speed!
same applies if I try to change the graphics clock speed, and I also get an error when trying to set the GPU fans to a certain %, EG:
# nvidia-settings -c :0 -a [gpu:1]/GPUFanControlState=1
# echo $?
0
# nvidia-settings -c :0 -a [fan:0]/GPUTargetFanSpeed=80
ERROR: Error assigning value 80 to attribute 'GPUTargetFanSpeed' (ubu16:0[fan:0]) as specified in assignment
'[fan:0]/GPUTargetFanSpeed=80' (Unknown Error).
This is because you are trying headless config..
Deletein SSH console try below script
#!/bin/bash
MemoryOffset="1600"
ClockOffset="-200"
FanSpeed="80"
DISPLAY=:0
xset -dpms
xset s off
xhost +
##Create xorg.conf with cool bits. I will use 31.. please check the manual properly
nvidia-xconfig -a --force-generate --allow-empty-initial-configuration --cool-bits=31 --no-sli --connected-monitor="DFP-0"
# Paths to the utilities we will need
SMI='/usr/bin/nvidia-smi'
SET='/usr/bin/nvidia-settings'
# Determine major driver version
VER=`awk '/NVIDIA/ {print $8}' /proc/driver/nvidia/version | cut -d . -f 1`
# Drivers from 285.x.y on allow persistence mode setting
if [ ${VER} -lt 285 ]
then
echo "Error: Current driver version is ${VER}. Driver version must be greater than 285."; exit 1;
fi
$SMI -pm 1 # enable persistance mode
$SMI -i 0,1,2,3,4 -pl 90
echo "Applying Settings"
# how many GPU's are in the system?
NUMGPU="$(nvidia-smi -L | wc -l)"
# loop through each GPU and individually set fan speed
n=0
while [ $n -lt $NUMGPU ];
do
# start an x session, and call nvidia-settings to enable fan control and set speed
${SET} -c :0 -a [gpu:${n}]/GPUFanControlState=1 -a [fan:${n}]/GPUTargetFanSpeed=$FanSpeed
${SET} -c :0 -a [gpu:${n}]/GpuPowerMizerMode=1
${SET} -c :0 -a [gpu:${n}]/GPUMemoryTransferRateOffset[3]=$MemoryOffset
${SET} -c :0 -a [gpu:${n}]/GPUGraphicsClockOffset[3]=$ClockOffset
let n=n+1
done
echo "Complete"; exit 0;
Thanks for the info and update.
DeleteI managed to figure out myself it was because the commands I was trying wasn't actually connecting to the driver via Xorg, so my work around was simply to export the DISPLAY variable then allow connections from anywhere, EG:
export DISPLAY=:0
xhost +
Also, I had the issue of the xorg.conf file being re-written each time Xorg or the machine was restarted, so to counter this I made the file read only and immutable, after making the changes to it I wanted, which included:
Option "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x2222; PowerMizerLevel=0x1; PowerMizerDefault=0x1; PowerMizerDefaultAC=0x1"
Option "AllowEmptyInitialConfiguration" "True"
Option "Coolbits" "28"
And I am currently playing with mining MinexCoin (Equihash 96/5 algorithm), using a compiled binary called lolMiner and with the GTX 1060 I can manage a consistent solution rate of about 12.5KSol/s with a bit of overclocking, but do have to run it at maximum (120W) power and fan speed 75% to keep the temperature down.
If I lower the graphics clock like you suggest the rate drops, but I haven't tried a big +1600 to the memory clock only +400.
Is it also possible to adjust the core voltage or is there no need?
For more info on lolMiner and MinexCoin mining, look here:
https://bitcointalk.org/index.php?topic=2933939.0
1. After your first update, I rewrote the blog and updated my script to support headless.
Delete2. My tuning are meant for Etherium+ethminer+Linux+Gigabyte 1060 6GB.
3. I have not touched core voltage
4. Thanks a lot for giving a minable coin idea "MinexCoin". I will do some research on it. Please share if you have more details about that coin.
I can recommend the MinexCoin as one worthwhile to mine, as any you create can be "parked" in the MinexBank (https://minexbank.com/) and earn you additional coins!
DeleteDepending on the size of your rig, the parking rate is often better than what small rigs can output, so there is a better ROI just buying the MNX from an exchange and parking it.
Nice post. I’m looking forward to seeing more useful posts on this blog. In particular, tips on getting AMD cards working well with Linux.
ReplyDelete+1600 mem. Wow. What memory is this suitable for? I suspect this would causes crashes on some cards.
1600 is good for Nvidia 1060. To be frank I do not have an AMD card as of now. I would write about it once I get one.
DeleteI am writing blog on how to use "ethminer" rather then using Claymore. I am getting 20+MH using this. I will tell why not to use Claymore :)