Showing posts with label bitcoin. Show all posts
Showing posts with label bitcoin. Show all posts


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 Also have a look at this thread at

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"
cgminer.exe --config=cgminer.conf

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


Simple calculation for two popular cloud miners and


6x180GH/s = 1080 Gh/s
Number of shares = 10000
1080/10000=0.108, this is the Gh/s per share.
0.108x=1 => 1/0.108 = 9.25 shares per Gh/s
Asset #1 has a price of 5-7, depending on the time. That means on average $55.5 per Gh/s


3000 GH/s
Number of shares = 30000
3000/30000=0.1, this is the Gh/s per share.
0.1x=1 => 1/0.1 = 10 shares per Gh/s
Asset #12 has a price of 1.5-2, depending on the time. That means on average $17.5 per Gh/s. That is a sweet deal now, but remember that it doesn't start until May!


BTC 0.35 per GH/s = $28.25 per GH/s
But this is mining at current difficulty! So even if's Gh/s is about $10 more expensive not, you should recover that by mining at current block difficulty.

At the moment, CEX,.io is the best place for GH/s trading right now.
Here is some referall links for me, if you sign up with my reference, I get a transaction percentage bonus.
If you feel this article helped you, please consider signing up at

Here you also co-mine IXC, NMC and DVC.

Reserving the right to miscalculations.

ICX and DVC coins can be traded at Vircurex and Cryptsy.
NMC can buy GH/s at


Bitcoin mining and profits in the post-homemining era

Bitcoin mining at home is dead. It went completely dead around summer 2013. The rise of ASIC mining has left everyone in the dust.

Luckily there are alternavtive digital coins, so called 'altcoins', and these are mined using traditional GPU rigs and doesn't use 'SHA256' hashing like Bitcoin and it's direct siblings. They use an hashing algorithm called 'scrypt' that is somewhat resistant to ASIC mining.

Depending on the exchange rates and hashing power that goes into the various altcoin mining, it is more profitable to mine certain altcoins at certain times.
Check out for an overview of the profitability of some alt coins.
At the moment, Dogecoin seems to be on the rise, and is over 2.5 times more profitable to mine than LTC. Want to Dogetip me ? Go right ahead, my crypto coin tips adresses are to the right clolumn,

If you are good at jumping pools, you can still scoop 0.01-0.02 BTC each day with about 1Mh/s of equipment.

Power is expensive, but right now in the winter, I would still need 2000-3000 watts to keep my apartment warm. Now I am heating my place with about 2000 watts of GPU and CPU mining. So in that sense, during winter, mining is pure profit. Keeps the place warm and makes me money too.

There are also a coin called PrimeCoin (aka XPM) that are mined only by CPU power. You can mine with a pool or solo mine with a highly optimized wallet.

You can exchange certain coins for other coins on exchanges like Cryptsy and even buy cloud mining at places like CEX. If you sign up to those two places and start trading from these links right here, I get a referral bonus too :)

Other good coin exchanges are BTC-e, Vircurex

AMD cards are still king of coin mining, but the newer CUDA miners can squeeze a lot more out of Nvidia cards today. My GTX 660 used to mine at 90 k/hs, with the new miner out now, it spiked to 180. I get about 0.15 BTC and 0.010 XPM daily. This money I invest in cloud mining for the long term.

cgminer flags (GUI-miner scrypt edition)
All at intensity 17. 16 Adjust after your liking. Intensity 18 will give me about 10-20% invalid shares. 17 about 5-10. 16 seems to approach around 1-2%.

Thread concurrency should be you memory divided by 32kb.
--shaders: specify the number of shaders in your unit. (notice two --)
-w flag: set worksize. usually 256 seems to work best on all cards.
-v flag: set to 1 to use GPU vectors for speed boost.

CUDA miner flags:
-H flag: Set to 1 to borrow some CPU for 10% mining boost.
-C flag: set to 1 to use texture cache
-l flag: specify kernel and warp configuration. Just use auto.

At the moment, my mining rigs are as follows:


185 kh/s: GTX 660 (Gigabyte factory OC'd)
90 kh/s: GTX 550 TI (Gigabyte)
144 kh/s: Radeon 7750 (Sapphire fanless)
96 kh/s: Radeon 7750 (Gigabyte with fan)
198 kh/s: Radeon 6790
198 kh/s: Radeon 6790
283 kh/s: Radeon 6870
30 kh/s: BeaverCreek APU
30 kh/s: Caicos APU

CPU mining (XPM):

0.044 chains/d :AMD 1100T (0.050+ idle)
0.020 chains/d :AMD 960T (1 core disabled, too hot)
0.022 0.008 chains/d :Intel Core Duo
0.010 chains/d:AMD A6 APU
0.002 chains/d:Celeron M

Update: It appears that when you find a prime higher difficulty prime, you get a bigger share unlike regular mining. Awesome :D

Also, check for solo ming tips


Bitcoin mining and profitability

[Updated 22/05/2013]
[Updated 24/05/2013]
[Updated 04/06/2013]

To mine Bitcoins, be sure you do your calculations first. I can only tell you my own estimates. But here I go:

What cards to mine with?

You need AMD cards. Short and simple.

Almost any AMD mid-high end card will be profitable, and the more the better.
Nvidia cards only deliver about a third to about a half of what an AMD card can do for these kinds of operations.

This is not due to bad manufacturing from Nvidia's side. This is due to the architechture differences, and can not be used against Nvidia, because these cards are primarily gaming and workstation cards and infact my GTX660 outperform my Crossfire'd dual 6790 cards.

GPU's are simply meant to render games and not do cryptography. Also, AMD has chosen a more-cores-is-better strategy, while Nvidia chose the fewer-but-higher-powered-cores strategy.

Power draw

Here is some raw data:

As you can see, the MHash/watt column speaks for itself. The 8800 GT card that many like to mine with is barey any help at all. Same with the GTX660, although it performs better per watt.

The winner is the Sapphire-produced 6790 cards, which are basically two 6770 cards baked into one. This is in truth a 4x6770 rig, but divided into 2x6790-branded monsters.

The low-end 6450 cards have the best ratio, but they simply don't produce nearly as much BTC as the other cards. They are more economic though, and also very quiet.

Based on calculations on bit, (well, I stole this formula: 0.56 USD/24h@100MHash/s), and accounting for two things, I realized how I can profit:

To mine or not to mine

If my Nvidia-based desktop is on _anyway_, then mining with Nvidia cards are _barely_ profitable. But in no way does it pay to have an Nvidia-based rig on for the sake of mining, that will negate any profit, unless you do not pay for power.

However, with AMD-based rigs, having then on 24/7 for the sake of will actually pay off. Not much in my case, but some. Currently, after 3 days of much interrupted mining, I have earned $3.236, but the next few days should go smoother. Some rigs cannot run at 100% capacity all day due to noise, but I'll post some more values later.


Of course, mining alone makes no sense. I have joined up with slush's pool and have engaged about 9 worker GPU's, at tines reaching almost 0.5GigaHash (500Mhash). Now I have a rate of about 700Mh and I am expecting an 6850 and a 4850x2 in the mail anytime now. That would probably boost me to a close 2GH. >D

CPU mining

Also, CPU mining is not worth it at all either. A Phenom X6 1100T @3.7Ghz mines about 10M/hash for about 20 Watts, so that's a no-deal.

The hard numbers and tools you need

You will need to install a so called Wallet. This is a cryptographic file that contains the data needed to store your money. Personally I am using Multibit, because it's just a bit faster to sync up.

Set up your account at the pool, I am using Slush's Pool.

You can find guiminer here. This is the easiest tool for beginners. It defaults to OpenCL renderers but you can install any mining backend.

GPU-Z - Monitor your GPU

Sapphire TRIXX - tweak your Sapphire cards

CUDA addon for guiminer, slightly increase Mh.

Optimized CGminer addon for guiminer

Mining proxy - And other tools, keep your local miners banging one internal server than your pool operator. Slight Mh increase.

Exchange rate webservice Will give you an API token to put into guiminer so you can get more currency conversions.

What is Namecoin?
Merged mining with Namecoin:
Help page here
Register a .bit NameCoin domain. (Can be synergized with BitCoin at Slush's Pool)

My current Bitcoin address is 1Fk5kGvhTPhzmgUDU8dDugB5LF122DExLY
My current Namecoin address is MyUxMoHueS1UyUrJMYUivDAfdCaquY21MR

Feel free to try to send me some coins!

Some flags to pass to guiminer:

-v (vector mode) Doesn't accept parameters in guiminer.

-w128 (worker threads)

-f60 to -f200 Desired desktop framerate, used to make sure other apps recieve proper FPS.
-s0.015 Delay each frame by this much, used to nerf capacity to reduce noise and temp.

Play around with these values to see what works best. Usually I keep one CPU core per GPU card. The 6870 actually required 2 cores to gobble enough data to fill its 1120 cores.

Some examples of what some hardware will perform:

  • AMD cards

  • Sapphire Radeon 6450 (Caicos, 160 x Stream Processors)
    Standard business-class word processing card, but does a good 30Mh.
  • AMD Radeon 6490M (Lamo)
    30Mh. This is the 'office' desktop piece of an AMD A6 3410MX APU based laptop. I has the following chips:
  • AMD Radeon HD 6520G
    The laptop switches to this for high-performance needs, like gaming. (And mining!)
  • Sapphire Radeon 6790 (Bart, 800 cores)
    180Mh out of the box, but they can do up to 196. My two 6790's are also in my wives' gaming PC and so I set them up with -f200 so she can play without notiching lag.

  • XFX Sapphire Radeon 7750 (Cape Verde Pro, 512 cores)
    Noiseless! Also, only requires 50 watts and no PCIe power cables either. 126Mh [-v -w 128 -f0].
  • Gigabyte Radeon 7750 (Cape Verde, 512 cores) ~ 120Mh [-v -w 128 -f0]
  • XFX Radeon 6870 (Bart, 1120 cores) NEW!
    Does 266Mh [-v -w256 -f100]  but with -w256, memory clocked to 340 and overclocked to 900 it did 296.6.
  • ATI Radeon 4850x2 NEW!
    250 watts.
  • Nvidia cards

  • Gigabyte GeForce GTX660 2GB (GK106, 960 cores)
    Does 70Mh [-v -w256 -f60, but wih rpcminer-mod-cuda.exe I tweaked 81.8 out of this.
  • PNY GeForce 8800GT 512 ~ 30Mh
  •  CPU Mining (regular guiminer)

1100T @ 3700MHz ~ 10Mh
960T @ 3400Mhz ~ 7Mh
Intel i5 @2900Mhz ~5Mh

Some more cards I got just for this project:

Sapphire Radeon 6870:
This card is awesome and delivers just short of 300Mh.. The 6870 has 1200 cores and are really just a rebranded 5870 - a true AMD masterpiece. Here's some stats:

As you can see, this run was made using a local proxy against slush's pool on a gigabit network. Also, all these cards promptly puts our motherboards into PCIe 8X mode. This is expected and will probably affect the total bandwidth by a few percent. I might do a single card test to see if 8X or 16X is any different.

ATI (yeah) Radeon 4850x2:
A massive beast, longer than the 6870 and draws even more power. I was struggling with the power cables so this card is untested still, but this will be interesting. Unfortunately, it seems to have been assembled in a way that makes the PCB curve i bit and it looks a bit unsettling.

Do's and dont's:

ALL gambling will set you back very quickly.
SOME free BTC faucets with captcha solvers are often a scam
DO NOT mine with a CPU
DO use a pool
DON'T mine if you aren't ready for micromanaging lots of infrastructure. Buy and sell trough regular exchanges instead.

Does this sound too complicated ? Hire me to set up a Bitcoin farm

Final thoughts

Also, to finetune your setup, you can overclock the core speeds and underclock the memory speeds.This will save you watts as well as reduce GPU wear and tear. Install your overclock and tweak tools and see how much you can reduce power draw without sacrificing too much speed.

So invest in some extra quiet fans and place your rig close to a ventilation hole to dissipate some heat. Ofcourse, as a Norwegian resident, this is just a replacement for other heater installations during the winter! During summer, power is cheap but produces a lot of heat.

Be warned that GPU's at full workload will heat some cards really well. My 8800GT was over 100C!

My two mining rigs are just a few Mh off a Gigahash/sec for about 800-900 watts of PSU and did during the test period mine just above half a Bitcoin with MANY interrupts. Daily payout: about $4 with threshold at 0.3. Probably tweakable to 5-6. (Also gaines 0.05NMC co-mining with slush, using Acrylic DNS and OpenDNS. Pretty sweet setup!)

I tried BFGminer also, which is really sweet, but I had trouble with the temperature variables. Also the 64 bit version did not work under my setup. Only the 32bit one.