Pages

Saturday, January 25, 2014

AMD Radeon Tuning Guide for Dogecoin / SCRYPT based coins

Before we get our paws dirty digging for our belowed coins, here are a few things for every shibe should be aware of. Just like almost every manufacturer these days, AMD does not manufacture or destribute their Radeon GPU hardware, instead the design and specification gets subcontracted to third party manufacturers. Radeon hardware manufacturers include following well known in the community names in no particular order: Sapphire, XFX, Asus, Gigabyte, MSI, PowerColor, etc. What is important to realise is that configuration that work well on one card may not at all work on another from the same model range. Dont let this discourage you and lets get started.

Disclaimers

Hardware
DISCLAIMER 1: Not all cards are identical
Since GPU designs are given by AMD to a third party manufacturer in order to differentiate themselves companies like Sapphire, Gigabite, XFX, etc. add a little extra to the orignal specification by AMD for a given model of a GPU. In most cases these little extras are to do with how "locked" or restricted chipsets are, plus different manufacturers can use various suppliers for GPU card components (memory, etc.), which results in variation of operational envelope or stability of hardware at hand (temperature range, GPU memory or core clock frequency, voltage flactuation etc). Some cards are more overclockable / flexible than others. It's in your interest to research each manufacturer yourself to see what suits you. Generally speaking, in no particular order: Sapphire, Gigabyte, MSI and PowerColor are prefered amongst overclockers and mining community. The Mining Hardware Comparison should be viewed only as a rough aim for your card hash rate and not a guaranteed minimum.
DISCLAIMER 2: Overclocking and Undervolting
Radeon third party manufacturers tend to provide their own software that allows users to modify number of parameters for a given GPU. These parameters include GPU memory and core clock frequencies, core voltage, fan speed etc. Check your card manufacturer website to see what is available. Bare in mind that some versions of the software my be more preferable by the overclocking comminity. Dont get too depressed if you cant find anything for your particular device, cgminer includes a few command line switches that allow some overclocking and undervolting to be done. Before you begin tweaking your card, remember that you are doing this at your own risk and that in some cases it may damage your GPU. Check as much information on the Internet regarding your GPU and see what is the biggest consensus amongst users of what gives best results and evaluate your options. Finally. Before you draw any conclusion on how succesfull you were in your endevour, let the card run for some time. It can be as long as 24 or 48 hours before you can be certain if the card is stable under your settings.
Software
DISCLAIMER 1: Miner and Mining Algorithm
Shibbies reproduce by very scrypt. (Such awe) This guide is for cgminer. GUIMiner uses cgminer on the background and provides GUI, hence the name. Doge is scrypt based currency and mostly mined using CPU and GPU. The last verion that supports GPU mining is 3.7.2, which you can get from here or here
DISCLAIMER 2: Operating System
This guide is for Windows 7 x64. However, it souldn't be much different to most of the flavours of Linux. In fact do check out BAMT a Linux USB flash based mining distribution.
DISCLAIMER 3: Graphics Driver and SDK
No matter the operating system you are using you will need Catalyst Software Suite and AMD APP SDK. Check online to see what is most recommended version for your card, as some are known to work better than others.

Options / Switches

This list is by no means complete. Please check cgminer README, SCRYPT-README and GPU-README for full list and examples. Below are given minimum list of options to get you mining.
--scrypt Use the scrypt algorithm for mining. You MUST start cgnimer with this option specified otherwise it will try to mine SHA-256.
--lookup-gap <arg> Set GPU lookup gap for scrypt mining, comma separated.
--shaders <arg> GPU shaders per card for tuning scrypt, comma separated.
--thread-concurrency <arg> Set GPU thread concurrency for scrypt mining, comma separated.
--intensity|-I <arg> Intensity of GPU scanning (d or -10 -> 10, default: d to maintain desktop interactivity). Set to 13 if you are mining on your primary GPU on your dedicated mining GPU you can set it as high as 20. Try different values to see how it suits you.
--worksize|-w <arg> Override detected optimal worksize - one value or comma separated list.
--gpu-threads|-g <arg> Number of threads per GPU (1 - 10) (default: 2).
--device|-d <arg> Select device to use, one value, range and/or comma separated (e.g. 0-2,4) default: all Example: for a 3 GPU system option d 0,1 will only mine on GPU 0 and GPU 1 disabling GPU 2. This is useful if you have number of different cards attached.
--auto-fan Automatically adjust all GPU fan speeds to maintain a target temperature.
--auto-gpu Automatically adjust all GPU engine clock speeds to maintain a target temperature.
--temp-overheat <arg> Overheat temperature when automatically managing fan and GPU speeds (default: 85).
--temp-target <arg> Target temperature when automatically managing fan and GPU speeds (default: 75).
--temp-cutoff <arg> Temperature where a device will be automatically disabled, one value or comma separated list (default: 95).

GPU Overclocking options

--gpu-vddc <arg> Set the GPU voltage in Volts - one value for all or separate by commas for per card.
--gpu-memclock <arg> Set the GPU memory (over)clock in Mhz - one value for all or separate by commas for per card.
--gpu-memdiff <arg> Set a fixed difference in clock speed between the GPU and memory in auto-gpu mode.
--gpu-powertune <arg> Set the GPU powertune percentage - one value for all or separate by commas for per card.
--gpu-engine <arg> GPU engine (over)clock range in Mhz - one value, range and/or comma separated list (e.g. 850-900,900,750-850)

Generic

--failover-only Don't leak work to backup pools when primary pool is lagging.
--no-submit-stale Don't submit shares if they are detected as stale.
--queue|-Q <arg> Minimum number of work items to have queued (0 - 10) (default: 1). Try to see whats best for you.
--url|-o <arg> URL for bitcoin JSON-RPC server.
--user|-u <arg> Username for bitcoin JSON-RPC server.
--verbose Log verbose output to stderr as well as status output.
--userpass|-O <arg> Username:Password pair for bitcoin JSON-RPC server.

Getting started

Before we start. If you are planning on making a dedicated miner rig you might need a dummy plug, otherwise you might have a situation where your rig starts but fails to succesfully run cgminer. For this you will need a DVI to VGA plug, 3x68Ohm resistors. The detailed guide is in the link above.
Download and extract cgminer in to your root directory. In this case it is C:\cgminer. Withing cgminer folder create an empty text file and input the following
 timeout /t 3
 setx GPU_MAX_ALLOC_PERCENT 100
 setx GPU_USE_SYNC_OBJECTS 1
 start /high cgminer --scrypt -I 19 -o pool_address:port -u [USER] -p [PASS]
Save the file and name it ToDaMoon.bat Now double click on ToDaMoon.bat, it should lunch cgminer, it may crash a few times, just keep trying a few times until it starts properly. When you succesfully fired up cgminer it connected to the pool and started to get some work you have to do two things. First in cgminer window press [S] then [W], this will make cgminer create .conf take a note of the location or specify it yourself. Use that file to add multiple pools for your fail over options.
Exaple of cgminer.conf for Radeon HD7990 by Sapphire:
    {
    "pools" : [
        {
            "url" : "pool_address:port",
            "user" : "user_name.worker_name",
            "pass" : "x"
        },
        {
            "url" : "pool_address:port",
            "user" : "user_name.worker_name",
            "pass" : "x"
        },
        {
            "url" : "pool_address:port",
            "user" : "user_name.worker_name",
            "pass" : "x"
        },
        {
            "url" : "pool_address:port",
            "user" : "user_name.worker_name",
            "pass" : "x"
        }
    ]
    ,
    "intensity" : "19,19",
    "vectors" : "1,1",
    "worksize" : "256,256",
    "kernel" : "scrypt,scrypt",
    "lookup-gap" : "0,0",
    "thread-concurrency" : "22400,22400",
    "shaders" : "4096,4096",
    "gpu-engine" : "925-1025,925-1025",
    "gpu-fan" : "0-85,0-85",
    "gpu-memclock" : "1500,1500",
    "gpu-memdiff" : "0,0",
    "gpu-powertune" : "0,0",
    "gpu-vddc" : "1.050,1.050",
    "temp-cutoff" : "95,95",
    "temp-overheat" : "89,89",
    "temp-target" : "78,78",
    "api-mcast-port" : "4028",
    "api-port" : "4028",
    "auto-fan" : true,
    "auto-gpu" : true,
    "expiry" : "120",
    "failover-only" : true,
    "gpu-dyninterval" : "7",
    "gpu-platform" : "0",
    "gpu-threads" : "1",
    "hotplug" : "5",
    "log" : "5",
    "no-pool-disable" : true,
    "no-submit-stale" : true,
    "queue" : "4",
    "scan-time" : "30",
    "scrypt" : true,
    "temp-hysteresis" : "3",
    "shares" : "0",
    "kernel-path" : "/usr/local/bin",
    "device" : "0-1"
    }
Secondly, once cgminer succesfully starts it will write a binary file (.bin) in its folder. Have a look at the name of the file, part of the name will have tcXXXXX where XXXXX is your thread concurrency number. You will need it for tweaking and tuning your card for optimal preformance.
Once you are happy with your setup, its time to tune your GPU.

GPU Tuning / Tweaking / Optimising

There is a tonne of information on the web regarding tunning GPU's. This will only cover most basic steps. Shibe must sniff out and lurk to get such very knowledge.

Thread Concurrency Optimisation

This is the number you should be able to read from your .bin file created by cgminer. See above.
Start by adding 2048 to the number from your .bin file. Keep adding and starting cgminer every time you add 2048 until it fails to start. The last value is your golden number. Add it to your .conf file.

Undervolting

cgminer has some switch options that allow for some tunning. --gpu-vddc <arg> command to set the GPU voltage in Volts - one value for all or separate by commas for per card. Some cards run cooler and use less power when undervolted. Sapphire Radeon HD 7990 card runs stable on 1.087V and known to run stable as low as 1.05V. Check .config file above. Some cards are locked and can not be undervolted. Undervolting your card will drop in power consumption of your rig and increase profitability. You should be alble to see small temperature drop.

GPU Engine and Memory Clock

You need to get your manufacturer overclocking tool for this.
Start by increasing GPU memory clock using your cards manufactorers software. Alternatively you can use cgminer -gpu_memclock <arg>. Start by increasing by 25 until your PC crashes. Now substract 50 from the value at wich you rig crashed and this is your number. Next is your GPU engine clock. This can be tiresome as it is a fine tunning mechanism. The ratio between GPU memory clock and GPU engine is somewhere in the range of 0.57 - 0.6. Each card is somewhat different and it a trial and error process, where 1Mhz +/- will see your hasrate drop 20%. So keep trying until you hit your sweet spot.
There is a good guide for cgminer here.
Also please check out this guide
This two guides will have you going to the Moon in no time.
Good Luck and please post your issues and questions on the sub. There are plenty of expert users to help you out.
If you found this useful you may wish to feed the Shibe by giving it a treat:
DHhvBWHW2gLnag1Ysqz1jSwquKYCRyMZ1A

3 comments:

  1. Using RentalCars you can get the best rental cars at over 49,000 locations globally.

    ReplyDelete
  2. Claim free satoshis over at CLAIM BTC Faucet. 21 to 57 satoshis every 20 minutes.

    ReplyDelete
  3. Did you think about picking the best Bitcoin exchange service - YoBit.

    ReplyDelete