Saturday, June 4, 2011

Bitcoin - Solo Mining - Windows 7 - ATI HD 6970

v 0.7
Before you do anything with Bitcoin, you need to be running the Bitcoin software.  Of course, you will have visited the Bitcoin website and read everything there.  The software is on the front page of the website.

Bitcoin Website.

I ran the software for a couple of days before I realised that I was only using the Intel processor, not my video card's GPU to generate bitcoins.  Some research and I downloaded Guiminer and tried that, however whilst this provided part of the puzzle, it failed to get things working and I ended up doing the gruntwork with the command line "poclbm".  Of course, since the command line programs are supplied with Guiminer, then no extra download for that is needed.

The final piece of the puzzle is getting "OpenCL" working.  Guiminer does NOT recognise the latest AMD incarnation, only the previous one.  I ended up installing both, so had to choose when I started the command line up, as you will see when I get to the startup command line instructions.

Software
Guiminer
https://github.com/Kiv/poclbm
Download button on the upper right lets you download the latest .. here is a direct link to the latest at time of writing:  https://github.com/downloads/Kiv/poclbm/guiminer-20110521.exe

Stream opencl
http://developer.amd.com/Downloads/ati-stream-sdk-v2.3-vista-win7-32.exe
http://developer.amd.com/Downloads/ati-stream-sdk-v2.3-vista-win7-64.exe
http://developer.amd.com/Downloads/ati-stream-sdk-v2.3-xp32.exe
http://developer.amd.com/Downloads/ati-stream-sdk-v2.3-xp64.exe

or

AMD SDK
amd-app-sdk-v2.4-windows-64.exe    from
http://developer.amd.com/sdks/amdappsdk/downloads/pages/default.aspx


Here is a guide for guiminer which helped me to get started, however I had to work out the end details:  http://forum.bitcoin.org/index.php?topic=10438

Procedure

Install and run Bitcoin.  For mining with your GPU, you will need to run bitcoin as a server, but for the moment, we can look at the interface.  There is your bitcoin wallet address, and on the bottom right, your connection status and downloaded blocks.  If you want to generate coins with your CPU, then click "settings" and "generate coins".  Don't expect much.

Make sure you have un-installed any conflicting video drivers and installed the latest ATI drivers for the 6970.  I also ran a registry cleaner to make sure there were no confusing pointers, then rebooted.

If I had to do it over again, I would only load the "ati-stream-sdk-v2.3".  Guiminer recognises it and it saves an extra flag in the command line.  Reboot.

Install and run "guiminer".  Have it in a convenient directory that is easy to refer to on the command line.  We will be using the "poclbm" program it comes with later.  What you get out of running the command line is that you can set up the configuration files.  IF you have installed the stream sdk properly, then everything will work when it starts up and you will see it has found your video card in the "Device" drop down, otherwise it will complain that it can't find an "opencl" device.
  • Select "solo" miner.
  • Under solo utilities, enter the username and password you wish to use to log into the bitcoin server.
  • Enter any extra flags you want to use for the device (see the hardware comparison from the previous post).
  • Save the configuration.
There are two configuration files:

First
\User\AppData\Roaming\bitcoin\bitcoin.conf
Within that file, should be two lines set from guiminer.
        rpcuser=username
        rpcpassword=password

Next
\User\\AppData\Roaming\poclbm\poclbm.ini
Inside this is the solo miner configuration.

{
    "profiles": [
        {
            "username": "user",
            "balance_auth_token": "",
            "name": "Default",
            "hostname": "localhost",
            "external_path": "",
            "flags": "-f60 -v -w128",
            "autostart": false,
            "device": 0,
            "password": "password",
            "port": "8332"
        },
    ],
    "bitcoin_executable": "C:\\Program Files (x86)\\Bitcoin\\bitcoin.exe",
    "show_opencl_warning": true,
    "show_summary": true,
    "show_console": false
}

The Command Line

Open the command line.

       start /D"C:\Program Files (x86)\Bitcoin" bitcoin.exe -server

This line starts the bitcoin program as a server.  The bitcoin window will open as a separate process. The directory switch means you can run the command from anywhere.
Wait till a connection has been made.

start /DC:\pro\guiminer poclbm.exe --platform=1 --device=0 --user=username --pass=password

Enter the above command line (altered for your machine of course).  Note the directory switch nominates the directory - there is a space between the directory and the program executable name.  Also note the --platform switch.  I use 1 because I have two possible libraries as I have both the AMD and the ATI Stream libraries loaded - ATI Stream is the second one (1) that the system recognised first, so I'm staying with that.  I follow it with the device switch which is the video card, and then the username and password that you set in the configuration file.

It took me a while to get it sorted, but then my Video card sprang to life and the fan went wild and you could almost feel the load.  Instead of 3 M/hash per second, I was getting 350 M/hash per second.

Best of luck and I hope it works as advertised.



Later ...

Update:
I included a flag "-f60" in the poclbm.ini file.  I found without that flag, the default of "-f30" made the priority of the poclbm process too high.  I would find that after an hour or so, with the computer churning away, if I came back and wanted to do some work on the machine, it would apparently "lock" up on me and I'd have to reboot.

Update 2:
The "-f60" flag has definitely improved stability with no noticeable loss of processing.  The only problems I've had is when trying to play a Youtube video, when the system locks up.

Update 3:
The lock-up remains no matter what "f" flag I use.  It would appear that Flash video and bitcoin mining are mutually exclusive.

Update 4:
The solution I use (for the machine lockup with video playback) is to use a virtual machine for much of my work.  I have Debian 64 set up as a virtual machine using Virtualbox, and I also have instructions for a Slackware VM elsewhere in this blog.  Video playback works fine in the VM and it all works seemlessly.  My normal use of the machine barely touches its capabilities and I can run the mining on Windows.

Update 5:
Yesterday I found I had "rcp connection problems".  Solutions presented on the net didn't work for me.  Then I had a look at the bitcoin version I had (21) .... I updated to the latest (23) and the problems went away.  I also discovered that once you start the bitcoin server, you can then start the poclbm miner.  It will complain about no connection etc but as soon as there is one it starts churning away.

Update 6:
There was an update to my Catalyst Control Center from AMD tonight.  It broke the miner I had sorted.  That's the bad news - it gets better from here.  In the article above, I talk of downloading the ATI stream SDK 2.3 ... well, that is broke and we must move on.  Install the AMD 2.4 SDK and all will be fine.  In my setup, I had both - the 2.4 was platform 0 and the 2.3 was platform 1 (as reported to me).  I simply changed the "platform=1" switch to "platform=0" and all was again well.

Bitcoin - Solo Mining Considerations

v 0.3
I had intended this to be posted in a day or two, however within minutes of me posting my last piece about Bitcoin, I had several visitors to my blog about just this subject.  Having been through the frustration of trying to get the software to work for solo mining, I can understand people eager to find what they are missing.  Before I get into my setup though, a bit more about what is involved.

First, be very clear that solo mining will produce returns very few and far between.  The payoff is a block of 50 bitcoins, and since these arrive in one go, and with the current return, you can expect a payoff only once or maybe twice a year.  To get that, you will have to use the GPU on your video card to achieve that.  As an example, I have an AMD HD 6970 video card with an Intel 8400 quad core processor.  Mining with the CPU is only 1% as effective as the GPU.

Bitcoin Hardware comparison.
Bitcoin Mining Calculator

Next, what sort of Video Card.  ATI / AMD are the only way to go.  As an example, the HD 6970 is almost half the price and more than twice as productive as an NVidia GTX 580.  The best description of why, that I've seen, is that you can consider the ATI/AMD cards to use a large number of dumb calculators to get things done, whereas the NVidia cards use a small number of very smart calculators.  Brute force wins in this case.

Next post ... how I got my setup working ..


Later .........


Update 1:
Whilst I'm really happy to have so many hits on my bitcoin posts, I'm also concerned that people look at this as an instant wealth exercise.

I'd encourage you to look at ALL my bitcoin posts.

Please.

Bitcoin - Some Thoughts

v 0.2

A couple of weeks ago, I chanced on a reference to "Bitcoin", perhaps in a Slashdot article.  I remembered that I'd seen something about it a few months ago and started to read some more.  Whilst it took me some time to "get my head around it" what developed was an interesting comparison with conventional money concepts.

Gold is next to indestructible and whilst you can find some, there is still a finite supply and it cannot be counterfeited.  Gold is gold.  By itself, gold is worthless - just metal - though useful for some industrial applications.  Gold's value comes from our collective decision to have faith that someone will provide us with trade for it.  It has developed into a universal currency because we have decided that it is reliable as a medium of exchange.

Bitcoin is the digital equivalent of gold. It is run by an open-source peer-to-peer network.  It can be transferred by email and that transfer registered with the network.  It has finite supply and can be manufactured (or mined) in accordance with the rules set by the network, and as a reward for taking part in the network.  As time goes on, and the supply approaches the pre-determined limit of 21 million bitcoins, then it becomes harder to manufacture a bitcoin, and reward for participating in the network will move to transfer fees.

Is Bitcoin destined to become the defacto currency?  Perhaps, perhaps not.  Whilst it has no intrinsic value, it is certainly secure and a convenient way to transfer funds over the internet.  As more people accept bitcoins, I can see that its use could easily develop such that people simply use bitcoins as normal currency and never bother to convert back to conventional currency.  Certainly over the last six months, the value of a bitcoin has rocketed from a few US cents, to nearly US $10.  Now, this rise in its value is almost certainly driven largely by speculation, and we've all seen what wreckage a "bubble" leaves behind.  HOWEVER, as a medium of exchange, a bitcoin has value and in the short term, I see people buying some bitcoins, sending them as payment and the merchant cashing them in.  As confidence builds, then people other than speculators will have more confidence to keep their bitcoins in their digital wallets for spending.

Time will tell.


Next post, I'll talk about my experimentation taking part in the network and setting up a mining test.



Later ........

Monday, May 30, 2011

Installing an ATI HD 6970

v 0.2

I'm getting old.  It used to be easy doing this stuff.  Stick the card in, load the driver and away you went.

Not so now.  Let's start at the very beginning, as Julie Andrews advised.

I have a quad-core Win7 64 desktop I keep for a WWII Flight Simulator.  A very good flight simulator as it turns out .. and then there is FS-X with the Pmdg 747-438 (which I haven't played with for a while, but nostalgia might get to me).  I was using an nVidia GTS 450, DVI cable and Chimei 22 inch monitor at 1650x1080 resolution.

Now, IL2 ( the WWII Flight Sim ) has released a new version.  Wonderful graphics BUT needs tweeking and VERY demanding of video cards.  An HD 6970 or nVidia 570 would probably be the minimum you would think of.

Back to the installation.  I removed the nVidia card and replaced it with the 6970.  That 6970 sure is a much heftier card than the GTS 450.  First problem.  I ran out of power supply points.  Then I realised I had replaced the power supply some time ago with a more powerful one and I had some spare cables.  Reading the labels on the spare plugs on the power supply - hmmm specific plugs for video power supply.  Search my desk drawers .. presto .. connect and done!

Connect the DVI cable to the main port (the card has DVI and HDMI output) and boot.  Blank screen.  Let it churn for a while.  Reboot.  Churn and then ... a screen at 640 x 480.  Install drivers, then update drivers .. screen resolution STILL only 640 x 480.  Bother.

Phone a friend.  It is the monitor.  Find drivers for the Chimei monitor ... nope.  Bother.  Final suggestion was to use the DVI - VGA plug and plug the monitor in using the VGA cable.

TA-DA

Worked like a charm and straight to the native resolution.

So now, I need to find a driver for either my Chimei monitor OR a similar 22 inch monitor that does 1650 x 1080 and then try DVI again.


Now where did I leave that Horse-hair vest .........


Later....