As an Amazon Associate I earn money from qualifying purchases.
Showing posts with label Frankenmine. Show all posts
Showing posts with label Frankenmine. Show all posts

Sunday, May 5, 2013

Detailed Settings for ~600kHash/sec Litecoin with Radeon 7950

So I have a few Litecoin mining rigs running, and the latest has three Radeon HD 7950 cards in it. I detailed most of the hardware in my previous post, but this time I wanted to provide some clear steps and settings for mining that get close to 600kHash/sec on a single 7950. If you look at a list of scores, for example this list, you might think hitting 600kHash is trivial. Well, I suppose it can be, but don't expect it to happen by just running with the default settings. Here's what I ended up doing to get there.

First, my latest HD 7950 cards are from Sapphire, this time the dual-fan model with a stock clock of 925MHz on the cores. (As far as I can tell, that's the stock clock and not the Boost Clock.) They're available for $300 each, and they come with the Never Settle Reloaded bundle of Bioshock Infinite, Crysis 3, and Far Cry: Blood Dragon -- you can typically get close to $50 for the bundle via eBay. As I already have three other Radeon 7950 cards, you'd think I have a decent handle on settings by now, but I'm still tweaking and learning.

My main PC has a single 7950 in it, and I game occasionally on this system. I also use it to surf the web, email, write, etc. If you're not using a PC that's mining Litecoin, you can go for Intensity 20, but for a PC that you're actually trying to use for other things you'll never be able to use it properly with Intensity more than 13. So, I have two folders, with two different CGminer configuration files: one for when I'm not using the PC, and the other for when I'm working. The Intensity 13 version gets about 10-15% less hashing performance, but there's a catch: I'm using practically all of the GPU's 3GB of RAM! With a single thread, I get around 330kHash, but with two threads I'm at 510kHash. Here are the two cgminer.conf files I'm running on my "daily use" PC:

cgminer.conf Usable:
{
"pools" : [
{
"url" : "coinotron.com:3334",
"user" : "[USER].[WORKER]",
"pass" : "[PASS]"
},
{
"url" : "newlc.ozco.in:9332",
"user" : "[USER].[WORKER]",
"pass" : "[PASS]"
}
],

"intensity" : "13",
"vectors" : "1",
"worksize" : "256",
"lookup-gap" : "2",
"thread-concurrency" : "17920",
"shaders" : "1792",

"gpu-engine" : "900-1025",
"gpu-fan" : "40-100",
"gpu-memclock" : "1550",
"gpu-powertune" : "20",
"gpu-vddc" : "1.100",
"temp-cutoff" : "99",
"temp-overheat" : "95",
"temp-target" : "80",

"api-port" : "4028",
"expiry" : "120",
"failover-only" : true,
"gpu-threads" : "2",

"log" : "5",
"queue" : "1",
"scan-time" : "60",
"temp-hysteresis" : "3",

"scrypt" : true,
"kernel" : "scrypt",
"kernel-path" : "/usr/local/bin"
}

cgminer.conf High Hashing:
{
"pools" : [
{
"url" : "coinotron.com:3334",
"user" : "[USER].[WORKER]",
"pass" : "[PASS]"
},
{
"url" : "newlc.ozco.in:9332",
"user" : "[USER].[WORKER]",
"pass" : "[PASS]"
}
],

"intensity" : "20",
"vectors" : "1",
"worksize" : "256",
"lookup-gap" : "2",
"thread-concurrency" : "21712",
"shaders" : "1792",

"gpu-engine" : "900-1025",
"gpu-fan" : "40-100",
"gpu-memclock" : "1550",
"gpu-powertune" : "20",
"gpu-vddc" : "1.100",
"temp-cutoff" : "99",
"temp-overheat" : "95",
"temp-target" : "80",

"api-port" : "4028",
"expiry" : "120",
"failover-only" : true,
"gpu-threads" : "1",

"log" : "5",
"queue" : "1",
"scan-time" : "60",
"temp-hysteresis" : "3",

"scrypt" : true,
"kernel" : "scrypt",
"kernel-path" : "/usr/local/bin"
}
That might seem like a pretty simple configuration for some, but let me run through some of the specifics. First, the "Usable" configuration has thread-concurrency at 17920. I arrived at that number by trying different values until I could get cgminer to start; I think I'm hitting maximum RAM use perhaps, though maybe I could increase it slightly. Either way, it's not running much faster I don't think so I leave it alone. The second configuration file is basically what you often see recommended for Radeon 7950, but I usually see talk of 650+ kHash, which is only going to happen with some serious overclocking and tuning!

There's more to starting CGminer going than the above, however. First, nearly all of my 7950 cards have default voltages that are far too high to run reliably without water cooling, at least in my ~75F environment. The dual-fan Sapphire cards for instance all come set to 1.250V, but under mining load even at lower intensities I can hit 95C and higher on some of the cards. What's more, three of the cards at 1.250V running slightly overclocked settings consume 1000W and more from the outlet, with an 80 Plus Platinum PSU even. Wow! The trick for me has been undervolting and overclocking, which isn't what you'd immediately expect.

MSI Afterburner is a great little utility for overclocking and undervolting, but it doesn't work with all cards -- the dual-fan Sapphire cards for instance don't allow voltage adjustments with it. Sapphire has their own TRIXX utility that works with their cards, however, so that's what I used. Here are my standard settings for reasonably reliable operation:
Vcore: 1.100V
GPU Clock: 1025MHz
RAM Clock: 1550MHz (6200MHz effective)
PowerTune: +10 (or +20 -- this doesn't seem to matter much)
I've managed to use those settings successfully on six different Radeon HD 7950 cards now, so I'm pretty confident they'll work for most users (at least if you're in a decent climate -- if the room is above 85F, you'll probably have issues). Okay, that gives us the overclock/undervolt settings as well as CGminer settings, so we're done, right? Not quite!

The final step is launching CGminer properly. For that, I created a batch file (a sequence of commands for Windows to run). Since I have CGminer starting up with Windows, I had to play around a bit. MSI Afterburner (or Sapphire TRIXX) is set to load automatically and restore my clocks, but depending on the PC this can take 10-30 seconds before it's complete (more on a slower CPU/HDD). If CGminer launches before the clocks and voltage are set properly, there's a very good chance your PC will crash and require a hard reboot! The other lines are to ensure the thread-concurrency options work properly, and then to tell CGminer to automatically tune fan speed. Here's the batch file (paste this into "LaunchCGminer.bat"):
@echo off
set GPU_MAX_ALLOC_PERCENT=100
setx GPU_MAX_ALLOC_PERCENT 100
@ping 1.1.1.1 -n 1 -w 30000>nul
cgminer.exe --auto-fan --failover-only
Create a shortcut to that batch file and place it in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup and you should be set. But there are a few final items to mention! I have two different CGminer (currently 3.1.0) folders, one for high intensity and one for low intensity. There appears to be a bug with AMD's drivers or CGminer or something, with the result being that if I run CGminer, quit, run it again, quit, etc. then maybe on the third or fourth cycle I usually get a system crash. Ugh. So rebooting between runs is often required. Also, you'll want to close out of most other programs (especially your web browser!) before starting CGminer, as if it can't get enough VRAM it won't run properly. Oddly, after it's started and working well, you can start Firefox, Chrome, etc. without issue. Also also, if you run Photoshop, I suggest just exiting CGminer until you're done -- it's not worth the potential hassle, trust me!

I think that's it for now. Happy Litecoin mining! My latest build is named "Frankenmine" because it's sort of in a disassembled mess right now while I wait for a few more pieces to arrive (specifically the PCIe slot extenders). It's definitely not safe for kids to be around at this point in time! If there's interest, I can provide the cgminer.conf files for this as well, and I have some other stories to relate involving the joys of Linux. But for now, this is what I'm using to get ~1800kHash/sec:
As always, if you find this stuff useful, please feel free to kick a few digital pennies my way!

BTC: 1JSrAuxPUhD2rS6yYLiPPT6X8fvz7c7k1W
LTC: LXpEZcNJtikd263z7Ha3vrdYDcLU7hiKWv

Or if donating directly is too much, go play at the LTC4You faucet and typically win 0.04 LTC every hour. That's a free $1.20 for clicking a button and typing a captcha. :-)

Update: Need help? See my Toubeshooting Guide.