About

Showing posts with label cgminer config. Show all posts
Showing posts with label cgminer config. Show all posts

2/23/14

CGminer for scrypt mining tutorial

First off, the original CGminer for GPU is dead. All 3.8 and newer builds are made for ASICs only. Luckily, it has been forked, and scrypt-mining on GPU has been kept. Get kalroth's CGminer fork at http://k-dev.net/cgminer/. Also have a look at this thread at overclock.net.

Configuring CGminer is quite complicated (it is JSON formatted), but my basic one goes like:
{
"pools" : [
{
"quota" : "20;stratum+tcp://server1:3333",
"user" : "x.x",
"pass" : "x"
},
{
"quota" : "50;stratum+tcp://server2:3333",
"user" : "x.x",
"pass" : "x"
},
{
"url" : "stratum+tcp://server3:3333,
"user" : "x.x",
"pass" : "x"
},
{
"quota" : "10;stratum+tcp://server4:3333",
"user" : "x.x",
"pass" : "x"
},
{
"quota" : "20;stratum+tcp://server5:3333",
"user" : "x.x",
"pass" : "x"
}
],
"failover-only" : true,
"load-balance" : true,
"scrypt" : true,
"kernel" : "scrypt",
"intensity" : "15,13",
"thread-concurrency" : "4476,3198",
"gpu-threads" : "1",
"gpu-platform" : "1"
}
This config turns on the normal scrypt module, as you can see.

Also it enables failover and load balancing. As you can see, server 1,2,4,5 shares their quota amd server 3 is only a fail-over, but it will still failover to any alive pool as long as a server with quote demand is dead.

20+50+10+20 = 100 %.

Notice the "quota" parameter replacing the usual "url" parameter, and that is add a comma separator after the quota specified before the url!

Intensity: Is just how much steam the cards can handle. If you see in the CGminer console that you are getting HW errors, lower the intensity. 15 is a bit high, but I get no errors. 13 is more common, but still gives me a HW error of 1 per day or so. That is not good, so I should lower intensity to 12 and see how it goes.

Note the comma-separation on the parameters that supports it. Generally PCIe slot 0 is the first, PCIe slot 2 is the second, etc!

Thread concurrency: Is calculated by taking number of GPU shaders and multiplying by 4 (for the 6xxx and 7xxx series, other models has other optimal calculations.) and remove 4.

GPU Platform: Normally, the platform available on PCIe slot 0 becomes gpu-platform 0. That means if you have an Nvidia card in slot 0 like me, and 2 AMD cards on slot 1 and 2, it becomes platform 1. So platform 1, card 0 and 1 is my active cards in CG miner. cudaminer would then need the opposite config, pretty much.

Starting up CGminer from a batch file:

@echo on
ECHO "cgminer miner startup"
ECHO.
setx GPU_MAX_ALLOC_PERCENT 100
setx GPU_USE_SYNC_OBJECTS 1
cgminer.exe --config=cgminer.conf

setx works on Windows, as some people dispute. Look at the 'succeeded' return-message in the console.