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

Sunday, February 16, 2014

Non-stop Bitcoin Mining

It's no secret I mine Bitcoins, but I don't bring up that I'm not very good for the obvious geek creed reasons. Today I finally made a change to my mining rig that I hope will end the occasional dreaded "Idle Miner Notification" from btcguild.com.

Screen shot of the log file, how interesting and inefficient.
I have small mining setup, a mix of Block Eruptors and a single Butterfly Labs Jalapeno. We started having strange Internet connection issues, and I immediately assumed it was AT&T's fault (to be fair it usually is). Also about the same time bfgminer reported the Jalapeno was sick. Never crossed my mind these issues were related, but once I sent the Jalapeno off to be RMA'd all most of our Internet problems cleared up.

With the Jalapeno gone, bfgminer ran with no problems. With the Jalapeno the program would inexplicably give up, even with the new one back in action this still happens. As a good administrator I'm sure I could have looked for a log or an error message or something, but it is very easy to putty back in, hit the up arrow, enter, ctrl+A+D, and go on with life. I can even do it remotely with TeamViewer because my home PC is on almost all the time (thanks for nothing logmein). Sometimes it goes for months without my need to intervene, other times only hours (and in the middle of the night).

After nearly a year of manual restarts and an immeasurably small loss of Satoshis, I've finally made a script to continually check if bfgminer is running and restart it if it's not. My apologies for not giving credit where it is due, most of this script came from a post on stackoverflow, but I'm not sure where.

It is far from perfect, but so far so good. I'd love to hear anyone's two cents  Satoshis on how to improve it. I also hope this is an aid to other small time miners.

EDIT: March 4, 2014
It didn't take me long to realize this was better to run as a cronjob. The biggest problem I had was multiple screens running, so I changed it over and made my log file a little better.

My first attempt was to remove the pause line and add the script as a cronjob that runs every 5 minutes.

The Ubuntu Wiki CronHowto was helpful, especially the Enable User Level Cron section.

I also update the log file to show a time. For weeks I thought everything was good, because you know, nothing went wrong. I was suspicious something wasn't quite right because the log file never showed the miners being restarted.

Today the power went out, and when the server came back on I expected miners to be running within 5 minutes... they did not. I dug a little deeper and this comment on the Ubuntu forms pointed out my issue. There were a lot of comments about making sure the script was executable and user level cron was set up. My problem specifically had to do with how screen works. I needed a -d for detach. The new script is in the gist, it's been tested and rocks along well.


Sunday, September 29, 2013

Bitcoin mining - Moving from GPUs to ASCIs

Amazing mining rigs belong
in crappy cases.
Application-specific integrated circuit, that's what ASCI stands for. I always have a hard time remembering, not only what it stands for but what order the letters go in (for some reason I always type ACSI). Bottom line is that it really doesn't matter when it comes to bitcoin mining (also, is Bitcoin supped to be capitalized--maybe we need a consortium to answer these questions).

Recently I retired my two AMD Radeon HD 5830's because the difficulty has skyrocketed so high it's not worth the electricity to run them. I thought about switching them to litecoin, but wasn't happy with the way it worked. I've been easy on these cards. They always had a small overclock (10%), and I kept the intensity down to keep temperatures low. I decided longevity is better than higher speed, and they did a good job for a couple of years. Most recently I sold them on ebay for about half what I paid. Financially speaking these two video cards are the highest return on investment than anything I've ever done with money.

I mine on btcguild (who doesn't these days?), and when they started offering ASCI block erupters for bitcoins I jumped on it. Each one of these things mines faster than the a 5830, and they use less electricity--far less. The fact I could buy them with bitcoins made the deal great.

The only downside was I had to spend real money USB hubs (block erupters are USB devices), and without much thought I picked up a Satechi 12 port hub. To Satechi's credit, they have a great customer service department. Unfortunately this product was not so great. I fully expected the 2 amp DC converter not to power 10 block erupters and a fan, but this hub limits the power... not the converter. When I wired up my own 50 amp power converter I was still limited to the number of erupters that would run. Really who buys a 12 port USB hub to run 12 low power devices? Lesson learned: there is a lot of great information in Amazon comments. Had I read them I would have purchased a hub that works the first time around. After leaving a 1 star product review, Satachi refunded the full cost including shipping of my order. That was even after I informed them I cut the power cable to make use of the DC jack with my other power converter. Not many companies I know would go to such lengths, so props to them.

What was the right hub? Fellow miners and Amazon reviewers agree that Anker makes the right hub for block erupters. They easily power 9 erupters and a fan (I'm really sad to say I broke one of my fan blades... be careful with those things--they are the delicate flowers they look like). Nine erupters per hub makes for almost 3Gh/s. Three hubs later I was mining at ~9Gh/s. Which felt like a lot until I realized difficulty was jumping up like crazy because I am one of thousands of miners moving to easy to acquire ASCI equipment.


As dumb luck would have it, right as the difficulty got so high that my 9Ghz/s was bringing in as little coin as my two old video cards, I get an email from Butterfly Labs. The Jalapeno I ordered in February was shipped. It came a couple of days later in nicer packaging than I expected. They even included this coffee cup with a giant handle. Doesn't that handle seem giant? When I hold it my hand feels really far from the coffee.

This added ~7Gh/s to my mining efforts. No doubt after a jump or two in difficulty it will all be in vain.

Not to be a product review post, but the Jalapeno was much louder than I expected. In it's favor, it is every bit as easy to mine with as block erupter.

I managed to whip up a lame attempt at monitoring software. If you can call it software, it's just a website that grabs the RPC info from bgfminer. It's been a good learning experience as it is my first attempt with the backbone framework. This has been my current side project, and hopefully it will get better as I find time to tinker with it.