Bitcoin Amazon GPU
My curiosity got the better of me and I decided to start playing with Bitcoins, which inevitably led to mining and then using Amazon’s High Performance Computing EC2 instances to do the brunt of the work.
Assuming you’ve an Amazon Web Services account, browse to to the EC2 instances dashboard and click “Launch instance”. From here you’ll need to follow the “Quick launch wizard”, reuse or create a private/public key pair, select “More Amazon Machine Images” and use the Amazon Machine Instance “starcluster-base-centos-5.4-x86_64-ebs-hvm-gpu-rc2 (ami-12b6477b)”. Make sure before completing the wizard you select the type “cg1.4xlarge”.
According to htop and free -m this is an EC2 VM with 8 cores, 21GB RAM and 2 Tesla GPUs. Easy and super fun.
Install dependencies
Once connected, there will be a few dependencies that you need to install. This EC2 instance uses CentOS and thus yum for its package (software) management.
- Install git: yum install git
- Install pyserial: pip-2.6 install pyserial
Clone the bitcoin mining tools
Now you’ll need to get hold of a couple of tools.
First up, clone poclbm, the python-2.6 mining toolset that utilises your GPU for the number crunching:
git clone
You can start running your mining against the GPUs by just running python26 poclbm.py -d0 for the first Tesla GPU and -d1 for the second. It’s best to run those in a screen session in case you disconnect.
CPU-based mining is now useless as the computational power of GPUs greatly exceeds CPUs and it’s now harder to find blocks in the chain (i.e. successfully complete the bitcoin “proof”). Most if not all mining software now has CPU features disabled. It’s a shame as 8 cores are just sitting there doing nothing!