Skip to content

Instantly share code, notes, and snippets.

@sblmasta
Last active July 18, 2017 15:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sblmasta/0cd430889c2020d72ed7301f11b97c84 to your computer and use it in GitHub Desktop.
Save sblmasta/0cd430889c2020d72ed7301f11b97c84 to your computer and use it in GitHub Desktop.
Script for pre mining GPU performance. It's for 6 PCI cards GeForce GTX 1070 8GB. ETH mining at 30 MH/s per card
#!/bin/bash
CLOCK=100
MEM=900
CMD='/usr/bin/nvidia-settings'
echo "performance" >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "performance" >/sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo 2800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 2800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
for i in {0..5}
do
nvidia-smi -i ${i} -pm 0
nvidia-smi -i ${i} -pl 170
${CMD} -a [gpu:${i}]/GPUPowerMizerMode=1
${CMD} -a [gpu:${i}]/GPUFanControlState=1
${CMD} -a [fan:${i}]/GPUTargetFanSpeed=85
for x in {3..3}
do
${CMD} -a [gpu:${i}]/GPUGraphicsClockOffset[${x}]=${CLOCK}
${CMD} -a [gpu:${i}]/GPUMemoryTransferRateOffset[${x}]=${MEM}
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment