Litecoin Beginners: Sample CGminer.conf and Bat Files

Copy-paste configuration settings to help you get started

If you're a new Litecoin miner, you must optimize your cgminer.conf and cgminer.bat files to generate the best combination of throughput and hashing that your specific hardware rig supports.

In all the cgminer.bat files we print below, substitute the characters XXXXX with the specific URL and port of the relevant server. Update usernames and passwords as appropriate.

Litecoin
Litecoin

Batch File to Launch CGminer, Single Video Card

XFX AMD Radeon HD 5450 1GB GDDR3 VGA/DVI/HDMI Low Profile PCI-Express Video Card (ONXFX1PLS2)

XFX Inc.

Pair these files to launch CGminer with a single video card.

Batch File

DEL *.BIN
CLS
@ECHO ON
ECHO.
setx GPU_MAX_ALLOC_PERCENT=100
setx GPU_USE_SYNC_OBJECTS=1
timeout /t 4
cgminer.exe --scrypt 

CGMiner Configuration File

{
"pools" : [
{
"url" : "XXXXX",
"user" : "user.worker",
"pass" : "password"
}
,
{
"url" : "XXXXX",
"user" : "user.worker",
"pass" : "password"
}
,
{
"url" : "XXXXX",
"user" : "user.worker",
"pass" : "password"
}
,
{
"url" : "XXXXX",
"user" : "user.worker",
"pass" : "password"
}
,
{
"url" : "XXXXX",
"user" : "user.worker",
"pass" : "password"
}
]
,
"scrypt" : true,
"intensity" : "20",
"vectors" : "1",
"worksize" : "512",
"kernel" : "phatk",
"lookup-gap" : "0",
"thread-concurrency" : "24550",
"shaders" : "0",
"gpu-engine" : "0",
"gpu-fan" : "100",
"gpu-memclock" : "0",
"gpu-memdiff" : "0",
"gpu-powertune" : "0",
"gpu-vddc" : "0.000",
"temp-cutoff" : "95",
"temp-overheat" : "90",
"temp-target" : "85",
"api-mcast-port" : "4028",
"api-port" : "4028",
"expiry" : "120",
"failover-only" : true,
"gpu-dyninterval" : "7",
"gpu-platform" : "0",
"gpu-threads" : "1",
"hotplug" : "5",
"log" : "10",
"no-pool-disable" : true,
"per-device-stats" : true,
"queue" : "1",
"scan-time" : "60",
"temp-hysteresis" : "3",
"shares" : "0",
"kernel-path" : "/usr/local/bin"
}

Batch File, Dual Video Cards

Dual video cards

Running with dual video cards makes for faster processing, but that setup requires a different setup logic.

Batch File

DEL *.BIN
CLS
@ECHO ON
ECHO.
setx GPU_MAX_ALLOC_PERCENT=100
setx GPU_USE_SYNC_OBJECTS=1
cgminer.exe -- scrypt --lookup-gap 2 -g 1 -I 14 -w 512 --auto-fan --thread-concurrency 24550 --gpu-engine 1035 --gpu-memclock 1300 --gpu-powertune 20 --temp-overheat 92 --temp-cutoff 97 

This bat file deletes all bin files that remain after your last mining session. This step improves performance and helps reduce the risk that previous settings will override your next mining session's settings.

Note the -g 1 argument, which specifies a single gpu thread, which combines with the high thread concurrency of 32765.

Start the Stratum proxy manually before launching the batch file or cgminer.

CGMiner Configuration File

{
"pools" : [
"url" : "XXXXX",
"user" : "user.worker",
"pass" : "password"
"url" : "XXXXX",
"user" : "user.worker",
"pass" : "password"
]
,
"scrypt" : true,
"vectors" : "1,1",
"worksize" : "512,512",
"thread-concurrency" : "24550,24550",
"kernel" : "phatk,phatk",
"lookup-gap" : "0,0",
"gpu-fan" : "98,98",
"gpu-memdiff" : "0,0",
"gpu-powertune" : "0,0",
"gpu-vddc" : "0.000,0.000",
"temp-cutoff" : "95,95",
"temp-overheat" : "90,90",
"temp-target" : "85,85",
"api-mcast-port" : "4028",
"api-port" : "4028",
"expiry" : "120",
"failover-only" : true,
"gpu-dyninterval" : "7",
"gpu-platform" : "0",
"gpu-threads" : "2",
"hotplug" : "5",
"log" : "10",
"no-pool-disable" : true,
"per-device-stats" : true,
"queue" : "1",
"scan-time" : "60",
"temp-hysteresis" : "3",
"shares" : "0",
"kernel-path" : "/usr/local/bin"
}

This configuration file governs dual video cards: the two R9 290 GPU's on the same motherboard have their respective settings separated by a comma. If there is no second setting on a command line, the system assumes that the one setting applies to both video cards.

Double-Thread and Lower Intensity

Use this configuration file to double the threads but lower the intensity of thread usage.

{
"pools" : [
{
"url" : "XXXXX",
"user" : "user.worker",
"pass" : "password"
}
,
{
"url" : "XXXXX",
"user" : "user.worker",
"pass" : "password"
}
]
,
"scrypt" : true,
"intensity" : "14,14",
"vectors" : "1,1",
"worksize" : "512,512",
"kernel" : "phatk,phatk",
"lookup-gap" : "0,0",
"thread-concurrency" : "24550,24550",
"shaders" : "0,0",
"gpu-engine" : "1000,1030",
"gpu-fan" : "95,95",
"gpu-memclock" : "1250,1250",
"gpu-memdiff" : "0,0",
"gpu-powertune" : "0,0",
"gpu-vddc" : "0.000,0.000",
"temp-cutoff" : "95,95",
"temp-overheat" : "90,90",
"temp-target" : "85,85",
"api-mcast-port" : "4028",
"api-port" : "4028",
"expiry" : "120",
"failover-only" : true,
"gpu-dyninterval" : "7",
"gpu-platform" : "0",
"gpu-threads" : "2",
"hotplug" : "5",
"log" : "10",
"no-pool-disable" : true,
"per-device-stats" : true,
"queue" : "1",
"scan-time" : "60",
"temp-hysteresis" : "3",
"shares" : "0",
"kernel-path" : "/usr/local/bin"
}

This configuration file governs dual video cards — the two R9 290 GPUs on the same motherboard have their respective settings separated by a comma. For example: "gpu-engine" : "1000,1030", means "first video card, second video card". When there are no comma-separated values, it means the one value applies to both video cards.

The "1000,1030" setting for the GPU engine is purposeful. This odd setting helps address the AMD glitch where the first video card can be substantially slower for dual-card mining rigs.

The thread concurrency in the above conf file ("24550,24550",) is much lower than the popular 32765 you will see among miners. This is because reducing the concurrency, but increasing GPU-threads to two actually increases the work units. Your hash rate might not be over 700 kh/s, but your work-units per minute should improve.

The "failover-only" : true option means to use the second Litecoin pool only if the first litecoin pool fails. This alternative specification helps your machine to respond automatically when one of your pools is down.

For additional guidance about cryptocurrency mining in general, check out A Beginner's Guide to Cryptocoin Mining.