As an Amazon Associate I earn money from qualifying purchases.

Friday, December 27, 2013

Bitcoin ASIC ROI

Going along with my earlier post, someone asked me about Bitcoin ASICs and their current ROI. I'm going to give my thoughts on the subject, but know in advance that there's one real killer: all of the worthwhile Bitcoin ASICs are pre-orders, which means you have to fork over a large sum of money in the hope of future profits. It's a huge risk, with quite a few companies failing to ship at anything close to their originally promised dates -- Butterfly Labs being the easy scapegoat. But let's just start with a few of the ASICs that are currently promised.

The Block Erupter was the original ASIC, used by ASICminer back when no other companies weren't yet shipping. They are now readily available, but difficulty has skyrocketed and the prices on Block Erupter haven't kept pace. At present, a single Block Erupter USB ASIC will cost around $80 new, $45 used. Why would anyone sell one of these awesome miners for half price if they're so great? Simple: they're not great -- at least not now. At the current BTC difficulty, a single USB Block Erupter will earn less than $3 per month. Difficulty is increasing pretty consistently at 15% every two weeks (thirteen days), so you'll likely never earn back your investment.

A 10GHash Block Erupter Blade is marginally better; you pay $489 new ($387 used) and generate roughly $85 per month. Note that you need to add a power supply and some other parts to the mix, so $489 doesn't just get you up and running. If you're ready to try that route, you could go with a Block Erupter Cube with three blades, for 30GHash, priced at around $1200. Add a PSU for $100 or so and you'll generate about $325 per month in profits at the current price/difficulty ratio -- so you could potentially match the break-even time for GPU scrypt mining of Litecoin.

Difficulty is of course still going to curtail those earnings, which means in reality it's more like $150 in the first two weeks if you have the 30 GHash rig right now. The next two weeks you drop down to $127, then $108, $92, $78, $66, $56.... That's assuming a constant rate of increase, but what you end up with after one year is that you will actually be past the point where the Block Erupter Blade or Cube earns money, and you'll never actually recoup your initial investment. Add in some of the faster upcoming ASICs that will likely spike difficulty and it looks even worse. So Block Erupter is out.

Let's take one of the hot new ASICs, the KNC Jupiter. It was offered for $5000 for 550GHash, which at present means if you ordered one and now have it up and running you're making around $175 per day and you'll hit the break-even point in just over a month. But they're sold out... so if you want one, you can buy this used one for "only" $20,000. A year from now, instead of rolling in the dough, difficulty increases will mean you'll have earned about $16,000 back from your initial investment and the miner is no longer profitable. I suspect difficulty increases might slow down somewhat, so you could at least break even in a year, but it's still a dicey proposition.

If you want to take a gamble on a not-yet-shipping ASIC, Cointerra is asking $6000 for a 2THash (2000GHash) TerraMiner IV that will show up around April. If they hit their ship date, you break even in about a month, and even if they're a month late you still break even in about 60 days. And realistically, I think difficulty increases will slow down for a bit, as the TerraMiner IV is one of the most efficient ASICs and it's only available in limited supply, which means five months from now you recoup your investment and you actually break even just three weeks after you start mining.

It sounds great on the one hand, but considering you could potentially take the same $6000 and build four perfectly capable scrypt-mining rigs today, it's still a gamble. You could have four rigs with three R9 280X cards each pulling a total of around 9000 KHash/sec up and running within the week. Six weeks to eight weeks and you could be free and clear on your initial investment, while those betting on CoinTerra are still two or three months away from getting their TerraMiner IV.

But I'm just staring at my crazy little crystal ball, so don't take this as anything set in stone. More likely than any of the above scenarios of course is that prices take a dive, at least for the short-term, which means your $6000 investment in hardware is going to make a bunch of noise and look like a money loser for months or even a year, until we get the next big bubble and you're sitting on $100K or more of LTC/BTC/whatever. And if you're an entrepreneur and can play the long game, why not diversify and buy $12000 worth of hardware (one TerraMiner IV and the rest into GPU rigs for scrypt)? One of them is bound to give at least a 2X ROI, paying for both, and the rest is just gravy.

Mining Litecoin and Alternative Cryptocurrencies - Estimated ROI

My last post on the ROI for mining Litecoin with the new R9 290/290X GPUs is still more or less on target -- difficulty is stabilizing for now, with an expected return of around 2 LTC per week per R9 GPU. That works out to around $45 per week, or $180 per month, so you'll have paid for your R9 290/290X in three months, give or take. But what about switching to some alternative cryptocurrency?

In roughly one week of mining, I mined about 1 BTC with 7000 KHash of GPUs. That works out to over $700 per week for hardware that you could match with seven or eight R9 290X GPUs, eight or nine R9 290 GPUs, or ten R9 280X GPUs. Now if you do the math, at present that means best case you would need $4600 worth of R9 290X cards, $4000 or R9 290 cards, or just $3500 worth of R9 280X (HD 7970) cards. Until prices are closer to MSRP, it looks like the 280X is the one to get.

Now, if current alternative cryptocurrency mining remains even close to where it's been, we're looking at roughly $2800 per month, so you'd pay off the GPUs in less than two months, and realistically all of the hardware could be paid for within two months. That's pretty darn appealing if you ask me! And you don't have to go out and buy dozens of cards in one fell swoop either -- just start with a single rig and if you go with 3-way R9 280X you could have the whole system for around $1500, and it would be paid for in about six weeks.

The problem is Hashco.ws is still in a state of disarray following the hack, so I've moved to Middlecoin for now. I switched about 5000 KHash of PCs to Middlecoin six hours ago, and at present it looks like my BTC balance is 0.0135 BTC. For a full day of mining that works out to 0.054 BTC, which would yield roughly $40 per day, $1200 per month -- not quite so rosy. I'll update tomorrow when I've seen just how many BTC I get through Middlecoin after a full day of mining, as it could still be ramping up my payouts; I'm hoping to get about twice that (0.1 BTC per day), which is closer to my previous rate with Hashco.ws.

Update: I've switched most of my systems back to Hashco.ws as the primary pool, with Middlecoin as the secondary pool. Hashco.ws is still a bit of a pain, as you can't log in to create new workers, and if you don't have an account already you're out of luck until they get the front end to their site working again. However, I'm getting payouts of around 0.075 BTC per day from Hashco.ws, and Middlecoin is typically providing another 0.015 BTC per day. So around 7000KHash/sec is generating 0.09 BTC daily, or close to $70 per day in income. Power costs are around $400 per month for my systems, but modern R9 builds should be more like $200-$250. Net income per month thus works out to $1500-$2250.

Thursday, December 26, 2013

Hashcows Christmas Eve Hack -- What Now?

I've been around the BTC world for a while now, and people running off with your coins is far from unusual. I lost about 50 BTC in the implosion of Bitcoinica, and I witnessed all the PirateAt40 shenanigans, for example, and there have been more than a few collapsed exchanges and pools. When things go wrong, everyone starts by talking a good game -- "We'll figure out what went wrong and then reimburse people as we're able!" A few days turns into a few weeks, then a month, and then suddenly silence. Then maybe a final message saying, "We're almost done and will reimburse next week..." and that's it.

So what's going to happen with Hashco.ws? At first I thought they might just fix a minor security flaw and then move on, maybe with some 0% fees for those that had BTC stolen, or maybe paying out refunds as they were able. After all, we're "only" talking about a 40BTC heist, give or take. However, 40BTC is still worth roughly $30,000 so for two guys running a pool that could represent a lot of money. And if they can't actually fix the security vulnerability properly, calling it quits might be best.

At present, the Hashco.ws site is in "read-only mode" for BTC withdrawals, and if you weren't actively logged in at the time the site went into lock down, you can't see your balances, workers, etc. I'm lucky in that I have a PC that was logged in, so I can see what's going on. I have nearly 0.40 BTC in earnings I haven't not yet collected, and I'm certainly worried that I may never be able to collect. Not surprisingly, my choice has been to move my mining operations elsewhere on most of my systems -- Middlecoin is my poison of choice for now, so we'll see how that goes.

I wish those involved with Hashco.ws the best of luck, and I really hope they can rectify the problems and get the site back up and running, but even though my current estimated payout per day is looking quite good (something like 0.02 BTC per MHash), I'm not going to risk mining there until they're running properly, with working logins and payouts. I'd suggest at the very least diversifying your mining portfolio in the short term.

Merry Christmas -- definitely a lousy way to wake up, which is why I'm glad I don't run a mining pool!


Update: Hashco.ws has posted the following as of this evening. It looks like they're trying to do the right thing and cover the losses for most of the miners. How long will it be before the site is back to normal and regains all trust? That's yet to be determined....

As has been mentioned in an earlier update, on December 24th 2013 someone was able to modify the Bitcoin payout addresses of many users of Hashcows, and trigger a manual cashout of current balances. 754 total users (out of a total of 8,142 registered users, 5,000+ of which have a BTC balance > 0) had BTC removed from their accounts, accounting for approximately 14.2% of users who held BTC on Hashcows. A total of 40.7815 BTC was removed and sent to address 13R87ropkDKzDEuVeQoX64kkcLvPWVdTKH. Hashcows staff have followed up with all major exchanges and a number of other large pools to confirm if they had any trace of this address in their systems, which as of this time has not turned up any useful results.

Since the attack was noticed on the 24th, we've placed the site in a locked down read-only mode, and disabled all payouts. While we understand this has caused some frustration among users, not being able to see if their accounts were affected, we felt it was the responsible course of action to take, given we knew we were unable to dedicate the time required to diagnose and address the security issues on Christmas Eve and Christmas Day.

We've been working since this time, both in determining the cause of the attack, and its potential scope, including an external audit of the source code by a trusted 3rd party. At this time the belief is still sql injection, based on the nature of the attack and how it was carried out. However, regardless of the technical results of ongoing audits, 2 things are confirmed. #1 The web instance and the mining/stratum instances are physically seperate. The mining instance remains unnafected by the web based lockdown, which is why mining continues to function as usual. #2 The web front-end is undergoing a rebuild from scratch as we speak, by both myself and another developer, utilizing different technologies, improved security features, and new hardware. We hope to have a basic version of this up in the coming days.

What does this mean in the immediate future? We'd prefer to not turn on write access for the website in its current form, but obviously understand people can't be expected to wait much longer for balances held up by the system (both old balances still intact, and earnings mined over the days since lockdown). We'll be posting a simple tool for people to use, allowing you to login with your credentials, at which point it will send out an email verification link, including your current balance and payment address the site has for you. Once clicked, your balance will be sent to the address specified. If you need to make changes to these details, instructions will be provided on the tool page. We hope to have this posted by tomorrow.

Last but not least, perhaps the question many have been waiting for an answer on. What does Hashcows plan to do about the missing 40 BTC? We've thought long and hard on this, and its obviously one of the most important decisions we'll have made in our short existence as a pool and community. Its a situation and decision that has hung over us throughout the last couple days spent with family.

Hascows will be re-imbursing every miner 100% of losses incurred on earnings made within the last 7 days prior to the incident (Dec 17th's payout inclusive). This means any funds you earned between Dec 17th and Dec 24th that were cashed out of your account by the attacker, will be re-added to your account at Hashcows expense. This payout will recover 100% of losses for 463 of the 754 affected users. For the remaining 291 users, we'll be offering reduced fees of 0.5% for at least the next 60 days to help with any shortfall.

In closing, both aTriz and I want to make a statement on more of a personal level, we have been absolutely stunned by the community that you have all created with this pool. There has been a tremendous amount of support and encouragement through these not so fortunate times and we would personally like to say Thank You. We look forward to the future of this pool while we begin the rebuilding stage which will continue to bring this wonderful community more features, more safety, more support, and more cows!

nearmiss.

Tuesday, December 24, 2013

Building a Linux Litecoin / Scrypt Miner

I've had a few people ask me about this, and while there are other walkthroughs of the process (I owe a serious debt of gratitude to Cryptobadger), many of those are a bit out of date and don't say much about the new R9 290/290X GPUs. So, here's my take on building a Linux system, as of December 24, 2013 -- Merry Christmas Eve!

Fundamentally, getting scrypt mining going under Linux requires a similar process to Windows:
  1. Install Linux (duh)
  2. Install AMD Radeon drivers
  3. Install cgminer or bfgminer (I have used cgminer 3.7.2)
  4. Configure cgminer and launch
  5. Create a startup script so that cgminer automatically launches (i.e. for occasions when the system crashes and restarts, or there's a power outage).
I might need to create a more detailed set of instructions, but if you're mostly familiar with Linux here's the short summary. Before you begin, set your PC (in the BIOS) to automatically turn on when power is restored. How you do this varies by motherboard, but usually press DELETE to get into the BIOS/UEFI screens and look in the Advanced settings. (Email me or post a comment with your specific motherboard model if you need help.) From there...

First, grab the Linux distro you want to use. I've used 64-bit Xubuntu 13.10 (Saucy Salamandar) as it's pretty simple, but others should work fine as well. (You're on your own for installing other distros!) Short summary: create a bootable device with the image (either a CD/DVD or a USB stick), then launch the installer and set things up. You can use a second USB stick as your OS device if you want, but they can really be slow so I recommend an inexpensive 60GB SSD or even a cheap 2.5"/3.5" HDD over a $5-$30 USB stick. (Seriously, you're spending $500 per GPU or whatever; go nuts and spend $50 on a decent boot device! You'll thank me in the long run, as every time you screw up and crash the OS and need to reboot can feel like an eternity...speaking from experience here.)

The setup process is pretty straightforward. About the only thing to note is that you'll want to automatically log in when the OS starts. (This is a total security no-no, but we're not worried about files on the PC -- we just want it to mine!) Once the OS is installed and you log in, you have a couple options. Either never worry about getting updates, or grab them all right now is my advice. (If something goes wrong, you want it to happen now rather than after everything is mining!) Now we're ready to install the AMD drivers and cgminer.

Open a terminal window. Now remove any old drivers:
sudo apt-get -y remove fglrx-updates fglrx-amdcccle-updates fglrx-updates-dev
(sudo will prompt you for the super user password the first time you run it in a terminal windows.)

Download the latest AMD Linux drivers and unpack to your user directory. Then from a terminal window:
sudo chmod +x ~/amd-catalyst*.run
sudo ~/amd-catalyst*.run
(Reboot)
sudo aticonfig --lsa
sudo rm -f /etc/x11/xorg.conf ~/.Xauthority
sudo aticonfig --adapter=all --initial
sudo reboot
(Wait for reboot again...)
At that point you should have all of the necessary AMD drivers installed. Now get cgminer (nothing after 3.8 supports GPUs, so get the last 3.7.2 build), then extract:
wget http://ck.kolivas.org/apps/cgminer/3.7/cgminer-3.7.2-x86_64-built.tar.bz2
tar jxvf cgminer-3.7.2-x86_64-built.tar.bz2
You're almost ready. Now set some items for future use so that you can mine properly. The sudo ln line is to create a link so cgminer knows where to find libudev. (This has been necessary on the latest 13.10 Xubuntu for me, at least.)
export DISPLAY=:0
export GPU_MAX_ALLOC_PERCENT=100
export GPU_USE_SYNC_OBJECTS=1
sudo ln -s /lib/x86_64-linux-gnu/libudev.so.0 /lib/x86_64-linux-gnu/libudev.so.1
exit
(Note that you may have to close and restart a new Terminal session to have the above stick, I think? In Windows, I know you need to open a new command prompt after setx; doesn't hurt to be safe.)

At this point, try running the following just to see if you can mine at all. (You can change to your own pool, or just test this and throw a few uLTC my way in the process):
export DISPLAY=:0
export GPU_MAX_ALLOC_PERCENT=100
export GPU_USE_SYNC_OBJECTS=1
cd ~/cgminer-3.7.2-x86_64-built
./cgminer --scrypt -I 20 --thread-concurrency 24000 -w 256 -g 1 --temp-target 85 --temp-overheat 95 --gpu-fan 40-95 --auto-fan --gpu-engine 875 --gpu-memclock 1425 --gpu-powertune 30 -o stratum01.hashco.ws:8888 -u trogdorjw73.tester -p tester
Assuming that all works okay, you should get around 725-850KHash/sec per GPU, depending on whether you're running R9 290 or R9 290X, as well as some "luck of the draw" on each card. You'll find that some GPUs will do better than others, and that's normal. From here you need to tune the clocks and thread-concurrency to get optimal performance. Note that if you want to exit cgminer, unless you can find a recompiled version to fix the problem, you do NOT want to press "Q" to quit -- it will crash your system and require a hard reset in my experience. Instead, close the terminal window manually to kill off cgminer.

For tuning, generally speaking go for max memclock first, then play with the core clock to find a good value -- often you'll find that if you push the GPU above 900MHz, it will actually be slower than at lower clocks, as AMD's hardware will throttle if it detects too much power or something going through the card(s). When you've got good RAM and GPU clocks, I tune the thread-concurrency in steps of 64. I haven't noticed a huge difference with changing TC, but you might get an extra 2% out of a GPU with the right value.

Of course, the tuning needs to be done for each GPU as well. One thing to try is once cgminer is running, press G (GPU Settings), the C (Change Settings), and from there you can tune the RAM clock and core clock in real-time, on each GPU. So start on GPU 0, and bump the RAM clock up in 25MHz increments from 1425MHz or so. You'll probably eventually cause the system to crash, so back the RAM clock down 25MHz and you're done on that card. Repeat for the other GPUs.

On the engine clocks, start probably closer to 800MHz and let cgminer run for maybe 5-10 minutes to stabilize. Look at the average hash rate for the GPU, and bump the core clock up 25MHz. Let things stabilize again for 5-10 minutes. If performance didn't go up, try the next step, and you'll probably see performance drop, which means you have reached the limits of that particular GPU for RAM and GPU clocks. Move on to the next GPU and repeat the process.

Tuning thread-concurrency unfortunately requires restarting cgminer each time, so I'd find good clocks first and then tune TC as a group. Start at 24000 or so, run cgminer for 5-10 minutes and note the averages for each card. Close out and bump TC up by 64 and run again. Repeat this for probably 10 iterations (20 at most) and you'll usually find a pattern where every five or so steps of 64 you'll see a peak and/or valley in hashing performance on each GPU.

Now just use the best result for each GPU in your cgminer.conf file and do a test run for a few hours. You may find that after the first 5-15 minutes performance will drop some and then stabilize. This is normal, and if you want you can see if you can tweak the settings a bit more to improve performance. (You might need to back off the RAM a bit more as well -- redlining any part of the GPU may end up in lowered performance over time, not to mention the potential for killing the hardware after six months or so.)

Another idea: having a large fan blow air across the GPUs may help out, though be careful with the potential for dust buildup if you do this. When everything is running well in cgminer, generate a conf file for future use. Press S (Settings) and then W (Write config file) and give your file a name (or use the default); I like to use something other than the default so that cgminer doesn't automatically load a config file when I don't expect it, so for my purposes I use cgminer-current.conf.

When everything is running smoothly, you'll also want to set Linux up to auto-launch cgminer on startup. Crytobadger has some scripts that work well enough, which I'll copy here with minor tweaking. First we make a script:
sudo nano mine_scrypt.sh
Paste the following into nano:
#!/bin/sh
export DISPLAY=:0
export GPU_MAX_ALLOC_PERCENT=100
export GPU_USE_SYNC_OBJECTS=1
cd /home/[LINUX USER NAME]/cgminer-3.7.2-x86_64-built
./cgminer --scrypt --auto-fan --failover-only --config cgminer-current.conf
Save and exit (CTRL+O, CTRL+X), then make the script executable:
sudo chmod +x mine_scrypt.sh
If you open a terminal and type "./mine_scrypt.sh" you'll start mining. (Note you can press [TAB] to auto-complete file and directory names, so typing "./mine[tab]" is usually sufficient.) First we need to make sure we have "screen" installed:
sudo apt-get install screen
Now we need to create a second script to start mining when Linux boots:
sudo nano start_mining.sh
Paste the following into nano:
#!/bin/bash
DEFAULT_DELAY=0
if [ "x$1" = "x" -o "x$1" = "xnone" ]; then
   DELAY=$DEFAULT_DELAY
else
   DELAY=$1
fi
sleep $DELAY
su [YOUR LINUX USERNAME] -c "screen -dmS cgm /home/[YOUR LINUX USERNAME]/mine_scrypt.sh"
Save and exit again (CTRL+O, CTRL+X), and make the script (scrypt? Hahaha) executable:
sudo chmod +x start_mining.sh
Now we edit the system config file to automatically call our script:
sudo nano /etc/rc.local
Add the following line just above the "exit 0" line; the 15 is a delay in seconds, so you can use more or less as you see fit:
/home/[YOUR LINUX USERNAME]/start_mining.sh 15 &
Save and exit (CTRL+O, CTRL+X) and you're done. The only catch is that now when you boot Linux, cgminer is running in the background and you can't see it. To bring it to the foreground, open a terminal window and type:
screen -x cgm
You can also make an alias (command shortcut) to open the cgminer window by editing your own .bashrc file ("sudo nano .bashrc") and add the following near the bottom:
alias cgm='screen -x cgm'
When you close the window showing cgminer now, however, cgminer will continue running. To actually kill and restart cgminer, type "ps -A" find the "cgminer" process, and then type "kill -9 [Process ID]". Now you can just type ./mine_scrypt.sh to restart cgminer if you want (e.g. after you tweak the config file).

Is Linux any faster at mining than Windows? I haven't noticed any major difference, so the main draw is that Linux is free. Personally, I continue to use Windows on my PCs, because I'm more familiar with the programs and things like MSI Afterburner are handy. Besides, again we're talking about $89 for Windows 7 64-bit (or $96 for Windows 8.1 64-bit) on a system that has $2000 worth of other hardware. It's less than 5% of the total cost and increases the resale value if you ever decide to stop mining. Anyway, YMMV.

LTC tips: LfCLyykrNFftzpdWejR73hf478ZtBzQ9jE
BTC tips: 1GGJUb1gFpydygpeKzd6oFoShLRUSyThV7

Monday, December 23, 2013

Flashing Radeon HD 7970 GHZ to R9 280X

I'm in perhaps a bit of an unusual situation in that I have a Radeon HD 7970 GHz Edition GPU, direct from AMD. The Vendor ID is 1002 and the Subsystem ID is 3000. The VRM on this card identifies as CHL822x and the memory is Hynix H5GQ2H24AFR. Looking through TechPowerUp's VBIOS catelog, I kept looking for VBIOS that would provided decent hashing performance from this card. Previously, I only managed to hash at around 510-520KHash/sec, which is quite low for a 7970, but the problem appears to be with most 7970 GHz Edition cards. The solution is to flash to a non-GHz Edition -- if you can!

I tried numerous VBIOS options from a variety of vendors -- ASUS, Sapphire, Gigabyte, XFX, etc. -- all to no avail. I had to force-flash most of these, due to a Subsytem ID mismatch, and not surprisingly several of the VBIOS options I tried ended up requiring me to boot up off a different GPU to recover to a working VBIOS. Up until last night, I was met with zero success -- the Sapphire VBIOS I tried flashed successfully and I could usually boot into Windows, but I would get a BSOD any time I tried to tax the GPU.

As you might guess from the title, the solution for me ended up being to flash to a Radeon R9 280X VBIOS. I still had to force flash (ATIWinFlash.exe -f -p 0 R9280X.rom), but the Vendor ID was 1002 and the Subsystem ID was 3001, so I figured I had a good chance of succeeding...and it worked! Thank goodness -- no more of this 500KHash silliness for my 7970 GHz card!

If you're having a similar problem, most likely you're in the same situation and have one of the "not very fast for scrypt" GHz Edition/Overclocked cards. You'll probably have to try more than one VBIOS before you can find one that works, but don't lose hope! Symptoms of the problem are that your 7970 will actually hash slower at intensities above 13, plus as noted the inability to break 600KHash, let alone 700KHash. Here's what I was running prior to the flash:
cgminer.exe --auto-fan --failover-only --scrypt -o stratum01.hashco.ws:8888 -u trogdorjw73.tester -p tester -I 13 --gpu-fan 40-95 --gpu-engine 1050 --gpu-memclock 1550 --gpu-vddc 1.170 --thread-concurrency 24160 -g 1 --temp-target 85 --temp-overheat 95 --temp-cutoff 100
With that configuration and the original VBIOS I was pulling 510KHash, and I really couldn't get it to run any better. With the update to an R9 280X VBIOS, I'm now pulling around 700KHash with the same settings but I 20. That makes for decent hashing but a totally useless system if you need to do anything else, but the 7970 (R9 280X) has an interesting quirk: you can often get equal or better hash rates at lower intensities with -g 2 and a lower thread concurrency. Here are my current "usable PC" settings (and note that the GPU core is now clocked at 1000MHz instead of 1050):
cgminer.exe --auto-fan --failover-only --scrypt -o stratum01.hashco.ws:8888 -u trogdorjw73.tester -p tester -I 13 --gpu-fan 40-95 --gpu-engine 1000 --gpu-memclock 1550 --gpu-vddc 1.170 --thread-concurrency 8192 -g 2 --temp-target 85 --temp-overheat 95 --temp-cutoff 100
Hopefully that will help some of you out, and if you have any of the 7970/R9 280X cards you can use similar settings to get over 700KHash. Considering a lot of R9 290 GPUs are topping out at 750-800KHash/sec (at least using their stock VBIOS), and the R9 290 cards are currently selling for over $500 (never mind the $650+ R9 290X cards!), if you can find a reasonable price on the Radeon R9 280X (some are going for $350) or one of the older Radeon HD 7970 cards (these tend to be more expensive, so look for the 280X first!) it's definitely worth considering.

Sunday, December 22, 2013

Radeon R9 290/290X Litecoin Mining: New Settings and Revised Expectations

Over the past several weeks I've had a flood of comments and emails about R9 290/290X hashing performance when mining Litecoins (or any other scrypt-based cryptocurrency). Initial experience with the cards suggests that the Radeon R9 290 can hit up to 900KHash and the Radeon R9 290X can hit 1000KHash, but the key part of that is "up to". In practice, the cards vary, sometimes wildly.

There are a lot of 290X cards that seem to top out in the 800-850KHash range, and short of adding better cooling I'm not sure how much farther you can push them. R9 290 tends to be more like 750-800KHash on a lot of cards. I think if we could get voltage adjustments working, we might be able to improve on those results for a lot of cards, but we probably won't have that for a few more weeks if not months.

One of the keys to understanding what's required for tuning performance on the new Hawaii R9 290/290X cards is that AMD has built in safety protocols to keep the cards running "safely". A lot of people have tried my original settings and come up with far lower performance than expected. This is why I provided batch files to help you tune and tweak performance.

Scrypt hashing by design is far more memory intensive than SHA256 hashing. The idea was to make it impossible or at least impractical to do scrypt hashing on GPUs, let along FPGAs and ASICs. So far, no one has yet released any FPGA or ASIC hardware for scrypt devices, and I suspect we're probably still at least a year away from such hardware becoming publicly available. (There may be early hardware undergoing "testing" for month in China or elsewhere first, of course.) So when you're looking to fine-tune your GPUs, start with the memory clocks and push those as far as you can while maintaining stability -- and maybe add a few extra cooling fans to help out! If you want to hit extremely high hash rates, you'll want the memory clock at 1600MHz or higher, and most cards won't do that without some sort of additional cooling or other modification.

Once you've found the maximum reliable memory clocks for your GPUs, only then should you start tuning the GPU clock speed. What's interesting is that even though most cards will happily accept GPU engine clocks of 1000MHz or higher, in reality they'll often run at far lower clocks -- this is AMD's safety protocols kicking in. So if you start off at 950MHz core and 1350MHz RAM and a thread concurrency of 32000 (give or take), and you find your hash rates are closer to 600 or 700KHash rather than 800-900KHash, don't despair!

Start with a lower GPU clock of around 800MHz (on R9 290/290X) and then start bumping it up 25MHz after about 10 minutes or more testing at each clock speed. You'll most likely find that 850MHz ends up being the sweet spot, and then you can play with clocks a bit more bumping it up/down in 5MHz increments to see if you can squeeze a bit better performance out of your system. When all of that is done, only then should you bother with tweaking your thread concurrency.

And with that said, here are my revised settings for R9 290/290X graphics cards. I'm going to include cgminer settings for four cards as an example this time, just to illustrate what you would use. I've also included three pools, the first two being multi-coin pools, since that's what I use these days. I'm also going to try toying around with BFGminer to see if I can coax anything better out of it. For the time being, these settings are more or less "stable".

cgminer.conf settings for ~810 KHash R9 290X / ~770 KHash R9 290
{
"pools" : [
{
"url" : "http://stratum01.hashco.ws:8888",
"user" : "trogdorjw73.tester",
"pass" : "tester"
},
{
"url" : "stratum+tcp://middlecoin.com:3333",
"user" : "13saHMFfUAv1crYp3QLbFr9aP1JYnb89oh",
"pass" : "x"
},
{
"url" : "http://coinotron.com:3334",
"user" : "trogdorjw73.tester",
"pass" : "tester"
}
]
,
"intensity" : "20,20,20,20",
"worksize" : "256",
"kernel" : "scrypt",
"lookup-gap" : "2",
"thread-concurrency" : "24272,24272,24272,24272",
"gpu-engine" : "850-850,850-850,850-850,850-850",
"gpu-fan" : "45-85,45-85,45-85,45-85",
"gpu-memclock" : "1475,1475,1475,1475",
"gpu-memdiff" : "0,0,0,0",
"gpu-powertune" : "50,50,50,50",
"gpu-vddc" : "1.100,1.100,1.100,1.100",
"temp-cutoff" : "100,100,100,100",
"temp-overheat" : "95,95,95,95",
"temp-target" : "85,85,85,85",
"api-mcast-port" : "4028",
"api-port" : "4028",
"auto-fan" : true,
"expiry" : "120",
"failover-only" : true,
"gpu-dyninterval" : "7",
"gpu-platform" : "1",
"gpu-threads" : "1",
"hotplug" : "5",
"log" : "5",
"no-pool-disable" : true,
"queue" : "1",
"scan-time" : "60",
"scrypt" : true,
"temp-hysteresis" : "3",
"shares" : "0",
"kernel-path" : "/usr/local/bin"
}
And just in case this isn't clear, with the above settings you would launch cgminer.exe with the following command:
cgminer.exe --auto-fan --config cgminer.conf --failover-only

Friday, December 20, 2013

Avoiding the CGminer BSOD/Crash on Exit for R9 290/290X

One of the major annoyances with mining via cgminer on R9 290/290X hardware is that it will hard crash your system when you exit "gracefully" -- by pressing "Q" or "CTRL+C". Some people will tell you that the problem is your clock speeds, or that you're using unstable settings, but this is absolutely false. The reality is that the crash is caused by outdated code in cgminer.

You see, cgminer's developer has decided to stop supporting GPUs. I don't blame him -- he's probably earning a ton of money working on developing and maintaining his program for ASICs, and since he's only one man he can't really keep doing both. But it means that code that worked fine in the past may now have difficulties. And that's exactly what's happening.

With their Hawaii architecture, AMD updated some things for the R9 290/290X. Specifically, they've updated their Overdrive engine from version 5 to 6, which helps with things like preventing the GPUs from frying if you run them too hard. This is part of the reason why you need to carefully tune your mining rigs for each GPU -- one R9 290X may run great at 975/1550 clocks while another will totally fail at those speeds. You can often see that you've pushed the GPU engine clocks too far by watching the clocks in MSI Afterburner; if you've set the engine for 950MHz and it's bouncing around between 800-950MHz, AMD's hardware is doing its job and dropping clocks to reduce power draw and protect the chips. Drop the engine clocks 25MHz (or 50, 75, etc. MHZ) and see if clocks go up. But I digress....

So the problem with R9 290/290X (Hawaii) and BSOD/crash on exit is that cgminer is tying into older software/hardware paths that don't behave quite the same on the latest GPUs. When you exit normally and cgminer tries to release things, there's a glitch and a BSOD is the result. Note that this happens on Windows as well as Linux (though without the BSOD on Linux, obviously), so it's not just an OS problem. But what's the solution?

Update: Forget everything below this point! There's a recompiled version of cgminer available that fixes the problem, and I recommend using it.


[Old text follows so you can see how things have developed.]

Simple: don't use any of cgminer's GPU overclocking and/or temperature monitoring features. That means you have to avoid the following (as far as I can tell):
  • auto-fan
  • gpu-engine
  • gpu-fan
  • gpu-memclock
  • gpu-powertune
  • gpu-vddc
  • temp-cutoff
  • temp-overheat
  • temp-target
Okay, those are easy enough to remove, but there's a problem: without tuning your GPUs, performance, hash rates, temperatures, and stability are all compromised. Yuck. The temperature targets in particular are important, as if you leave AMD's drivers to manage everything you'll have severe throttling. So you need to turn to other utilities to manage temperatures and clocks as best you can...or just live with the inability to do a normal exit from cgminer.

For what it's worth, I'm still using cgminer to control things. I tried playing with MSI Afterburner to get things to work "properly", but getting everything to persist between reboots isn't something I've fully figured out yet. When I do, I'll post instructions.

Thursday, December 19, 2013

Alternative Cryptocurrencies: What to Mine?

After branching out into testing Hashco.ws and doing some Frozen mining, I started to realize that there's a huge amount of potential to make more money simply by mining some of the lesser known coins. New coins in particular can be quite profitable -- in the first couple of days of mining FZ, I managed to get something like 10K FZ. I traded that for roughly 6 LTC at the time, but today that same 10K could fetch probably 30 LTC. Even with the recent price drop, that would be a rather staggering $540 in two days. What's more, that was from mining with eight CPUs -- CPUs that were otherwise sitting idle on my GPU mining rigs!

Frozen is somewhat unique (or at least rare) in that it uses the Quark algorithm for proof of work, and Quark is more resistant to GPU mining as I've already mentioned. However, there are other altcoins where you can still generate a decent return without using your highest power GPUs. Most of these coins are newer or not traded as heavily, so you'll want to be cautious and not put all your eggs in one basket (at least not all the time). Personally, I am trading most of my altcoins for BTC right now, but with patience I could probably get far more by holding and waiting for a higher price. YMMV.

So which altcoins are the most profitable right now? The "created as a joke" DOGE (Doggy) is actually pretty common, but we'll have to see where that goes in the coming weeks. I wouldn't hold onto too much DOGE as all value could evaporate...but then again, never underestimate the power of humor! Hashco.ws and Multipool are both doing a fair amount of DOGE mining, for example. But if you want to go out a bit further on the fringe, take a look at Coinchoose.com. Here's a couple screenshots of the current average profitability relative to BTC and LTC:


What you can see in those charts is that quite a few coins are potentially outperforming LTC and BTC mining, sometimes by a substantial amount. If you go after one of the coins with a really low network hash rate, the risks -- and rewards -- can be even greater. But how do you go about mining these alternative coins?

Assuming you don't want to use a multicoin pool, you will either need to find a pool where your mined coins will be held, or set up your own wallet for each currency and then configure your miner(s) and pool(s) to send coins to the appropriate address. So let's just take the current top coin as an example, Diamond. Note that I have not mined any Diamond to date, so this will be a test run for me as well.

First, let's go find some information on Diamond. I searched for "Diamond Coin" and found this thread at Bitcointalk, announcing the coin, and later in that thread we find that Diamond has recently been revitalized. It looks like Diamond was launched back in July 2013. It has a steady state of generation of 1 block every minute, with each block being worth one Diamond (coin). So far so good. It also adds some other features to potentially secure the coin against a 51% attack, like Proof of Stake along with Proof of Work -- I won't get into that here. Diamond is scheduled to run for eight years at 1 block (and 1 coin) per minute, with bonus blocks randomly given out each day, yielding a total of 4,380,000 coins total (give or take). The current exchange rate can be found on Cryptsy: 0.0037 BTC per DMD. Network difficulty on the other hand is reportedly very low at only 1.27MHash/s, but perhaps that's not showing up correctly. Everything looks reasonable, so let's try mining some Diamonds.

First, decide if you want your own Diamond wallet (e.g. for long-term storage). If not, you can skip steps 1-4 and go straight to step 5.
  1. Download the Diamond client/wallet.
  2. Run the diamond-qt.exe (for Windows) client once and then close it; it creates a default directory (C:\Users\[UserName]\AppData\Roaming\Diamond) for you, though you could create that on your own if you prefer.
  3. Create a diamond.conf file in the above directory. There's an example given at the official site, but below is what I've put in my diamond.conf file.
  4. Run diamond-qt.exe again, and now it should begin syncing with the network. This may take some time as there are roughly 200,000 existing blocks to download. You don't need to finish syncing before you can begin mining, but you do need to be synced up to send/receive any DMD.
  5. Mining is pretty simple, as this is yet another scrypt-based coin, so you can mine with the usual cgminer, bfgminer, cudaminer, etc. But first we need a pool to mine with (unless you want to go solo).
  6. I created an account at this pool, since it looks active at around 12MHash/s (so the network hash rate is much higher than what Coinchoose is reporting). After verifying your account via an email link, create a worker in the usual way.
  7. Using your normal cgminer settings (or whatever miner you run), point it at the pool stratum and start mining. For a Radeon HD 6970, here's what I run:
cgminer.exe --scrypt --auto-fan --failover-only -I 20 --thread-concurrency 8000 --gpu-engine 925 --gpu-fan 50-100 --gpu-memclock 1400 --gpu-powertune 25 --gpu-vddc 1.1 --temp-cutoff 99 --temp-overheat 95 --temp-target 85 -o stratum+tcp://dmdpool.digsys.bg:3333 -u trogdorjw73.tester -p tester
With the miner up and running, you should start to see shares periodically. Based on the pool's information, it looks like the rate of return is around 0.08 BTC per 1MHash/s. At a current price of $650-$700, that works out to $52-$56 per day per MHash (1000KHash). If you were mining LTC instead, you'd be earning about 0.3 LTC per day, for around $6 per day.

So here's the question: do you actually get that much DMD (or other altcoin) into BTC? I'll start one system mining as a test and report back later....

Wednesday, December 18, 2013

The China Crash, Altcoins, Playing the Long Game

Not surprisingly, the currently high BTC and LTC prices simply aren't able to be sustained, especially in light of all the speculation by Chinese investors who have now been told that Bitcoin is basically persona non grata. This has been a relatively large bubble from the $150 range up to around a $1200 high, and now we're back in the $550 range and potentially still have a bit more to fall before we bottom out and start rising again. We've seen it before, and we'll see it again -- and we'll see it with pretty much every popular Altcoin worth mining! While BTC had about an 800% increase from mid to late November, Litecoin was actually even more impressive, going from less than $4 to a high of nearly $50 -- around a 1200% gain. I suspect Litecoin is going to see single digits again very shortly, but if you can, keep your coins and just wait for the next bubble, because it's inevitable.

The reason for China and other countries fearing Bitcoin and these other digital currencies is simple: it makes it too easy to move money out of the country! Oh, you can already do that in a variety of ways, but with Bitcoin/Litecoin/etc. it's trivial -- assuming you can buy the coins in the first place, of course. That's probably a large part of what has sparked this latest tumble, with China making it more difficult to buy BTC and investors getting spooked, but that's just it: governments may not like these digital currencies because they can't fully control them, but long-term this is the future.

Related to this is a comment someone made to me recently when discussing Frozen Coin (FZ). He said in effect, "Well, it's not like all of these digital currencies can survive -- most will fail." I disagree, because just like the distributed computing nature of Bitcoin makes it powerful and useful, the altcoins are just another way of distributing things. Bitcoin is the biggest name by far -- I heard a statistic that something like 45% of Americans have heard of Bitcoin -- and so it's going to be the biggest target for the governments. Heck, maybe they even succeed in shutting BTC down in some way. But if BTC fails, there are dozens of others, and some of these are working to make them even more difficult to kill off (e.g. Peercoin, PPC).

Consider this: governments and corporations have been trying to kill off illegal file sharing for years now. Eventually, they more or less realized that it's a fruitless endeavor and what they really needed was to embrace new technologies. And so iTunes went from heavy DRM music to basically go-anywhere music, Blu-rays now come with free digital copies and even a DVD, etc. And guess what? Not only did they not kill piracy, but piracy didn't kill them either -- arguably the movie industry is as healthy as ever! DRM isn't totally dead, but after all the hand-wringing and fear-mongering ("Please, somebody think of the children!"), technology marches ahead.

Bitcoin, Litecoin, and the other various cryptocurrencies are all marching ahead, some more quickly than others. While some governments are sitting back and just watching Bitcoin happen and China is actively trying to fight against Bitcoin, still others are talking about Bitcoin in a positive way. Big names in the US are discussing Bitcoin, and millions of dollars has been invested, with billions more waiting to come.

So if you bought BTC at $1000 or Litecoin at $40 and are feeling like a fool, just sit back, relax, and go find something else to do for a while. Sit on those coins and check back in five or ten years and you'll be able to laugh with others when you tell how you bought them at $1000 or $40 or whatever and thought you screwed up. Then they'll congratulate you on your good fortune and ask you to take them to a nice place for lunch -- because after all, you can afford it.

Or sell what you have, try to cover your losses in other ways, and bemoan your fate for a few years. Then move on and some day you'll be kicking yourself. Mark my words: you'll be sorry twice!

Disclaimer: This is a blog and is full of my own opinions, based on my experiences with Bitcoin, Litecoin, technology, etc. Could I be wrong? Sure. If you invest your life savings into BTC right now and lose it all, don't come knocking on my door. Be responsible and spread out the risk some. This is why I buy and mine coins rather than just buying $2000 worth of coins on a big drop like today -- I'm bad at day trading! Don't invest more than you can afford to lose, and don't go into massive debt because BTC/LTC look like a major opportunity. Grow your cryptocoin portfolio/mining farm slowly, over time. Start with $2000 and when you've recovered that cost, invest the future profits into more hardware. That's how I'm doing it!

Tuesday, December 17, 2013

Adventures in Alternative Cryptocurrency: Frozencoin (FZ)

Last week I got curious about Hashco.ws and did some testing, but as I was investigating whether or not the Hashcows multipool was better than mining LTC (verdict still pending), I got sidetracked by Quark. My testing of Quark quickly confirmed what others have said: it's mined out. 246 million QRK are now out in the wild, and going forward there will only be 1 million QRK per year. That seems short-sighted, but the people that held them until last week likely made a ton of money! Then in the midst of looking at Quark, I found a new coin called Frozen.

Frozen uses the same algorithm as Quark, which makes it more resistant to GPU and ASIC mining (for now at least), and since I have about 20 largely idle CPUs around I thought it would be interesting to mine some FZ and see if I could make any money off of it. The short story: absolutely! The long story? I'm not quite so sure where FZ is going in the coming months.

It's basically Quark 2.0, with only 7.777 million coins (instead of 250 million), plus a guaranteed 1 FZ reward per block minimum (~1051920 FZ per year after the initial mining, corresponding to one block worth 1 FZ per 30 seconds). What that means is that like QRK, when FZ is done, it's not really done... and I'm not sure that's a good thing, as it appears FZ will also be mined out in around six months? But if the value is high enough perhaps the 1 million FZ per year perpetually will be useful.

There's a site for Frozen, but it's in the process of being migrated to a new server (supposedly), which makes trading the coin a bit more difficult. (Update: Trading Forum is back!) The mining difficulty has spiked up ten-fold since I started, which means it's no longer giving me a 5X return relative to LTC mining, but I did get about 10LTC per day in trades several days last week. Thankfully, I also sold the LTC when it was going for $30, but we'll be back to $30+ again -- some day soon, hopefully, but if not then it will still happen.

Okay, back to Frozen. Let's say you want to mine it, since you have some rigs with GPUs and you could do FZ on the CPU still without really impacting performance (though it would use more power). The steps for getting Frozen mining going are pretty simple.
  1. Download the CPU miner and/or Smolen's GPU Smelter. Quad-core i7 will do around 800KHash/sec, while smelter will take 10% of coins to give to the developer. Smelter does 1400-1500KHash/sec on 7950/7970, 2000-2500KHash/sec on 5850/5870 and 6950/6970. (Apparently the developer doesn't have any GCN hardware, so it's not optimized for AMD's newer cards, at least not yet.)
  2. Download the Frozen-QT client, run it once and exit, and then edit Frozen.conf in:
    C:\Users\[Username]\AppData\Roaming\Frozen (mine is below for reference, or included in the chain snapshot).
  3. Now run Frozen-QT again and it should update the block chain and you're ready. (I've got a snap-shot of the chain as of 12/16/2013 available to help get you going faster). The conf file I provided has most of the settings needed to solo mine, including setting rpcthreads (the number of clients that can connect) to 40.
  4. Start mining, with either solo or pooled mining. CPU clients use the following command for the pool, replacing the address with your FZ address from the client:
    minerd64_sse4 -a quark -t 8 -o http://fz.mine-pool.net:9372 -u FTKf7WumfNRJA94frNsSJiudFJhvcGYH3t -p x
    For solo CPU mining, you can run:
    minerd64_sse4 -a quark -t 8 -o http://[Your IP]:18450 -u user -p pass
  5. For GPU mining, it's not possible to use a pool, so you have to do solo with smelter (again, swap in your own FZ address):
    smelter -o http://[Your IP]:18450 -u user -p pass -w 64 -g 2 -i 100 -a FA5Q97XuGzszbpNgGUjUWveTPGiJ9NnzR5
  6. You might need to open up ports 18450/18451 in your firewall, or at least tell the firewall to let traffic through when it prompts (if you're on Windows).
And that's pretty much it; you can sit back and mine Frozencoin. But there's the question: how much is Frozen worth? It's not on any exchanges yet, so you have to trade with people manually. You also need to figure out how much you're willing to accept. I've seen a lot sold at 1 LTC per 1000 FZ, but that may be too low -- or FZ could collapse and no one would want it, but that can happen potentially to any cryptocurrency. If FZ ends up equaling QRK (Quarkcoin), it could be worth $0.10 per coin. Since there are only 7,777,777 FZ (plus ~1 million per year), it should be worth quite a bit more in theory. Time will tell. In the meantime, the difficulty is still reasonably low, so you could mine a few thousand in a week and hold them for the future. Enjoy!

Donations in FZ: F8sGbVmiepUAmVQA3foaW2t4jP2a8sHYKo

Frozen.conf:
rpcuser=user
rpcpassword=pass
rpcport=18450
port=18451
testnet=0
rpcallowip=127.0.0.1
rpcallowip=192.168.1.*
rpcthreads=40
listen=1
daemon=1
server=1
gen=0
addnode=192.241.200.142
addnode=71.84.113.165
addnode=75.142.224.140
addnode=75.166.71.201
addnode=84.249.109.128
addnode=98.214.94.227
addnode=98.242.20.240
addnode=87.119.221.84
addnode=78.128.6.26
addnode=5.9.44.164
addnode=84.238.225.19
addnode=86.100.125.187
addnode=176.215.214.89
addnode=95.85.21.252
addnode=106.187.41.6
addnode=50.201.141.6
addnode=71.84.113.165
addnode=75.142.224.140
addnode=75.166.71.201
addnode=84.249.109.128
addnode=98.214.94.227
addnode=98.242.20.240
addnode=137.117.216.239
addnode=137.117.218.209
addnode=139.190.255.127
addnode=162.242.223.73
addnode=174.100.51.46
addnode=194.68.104.18
addnode=218.74.37.218
addnode=222.126.164.66