Author Topic: [GUIDE] Mining on Amazon EC2 using Spot instances  (Read 37544 times)

0 Members and 1 Guest are viewing this topic.

Offline joesmoe

  • Jr. Member
  • **
  • Posts: 40
    • View Profile
Re: [GUIDE] Mining on Amazon EC2 using Spot instances
« Reply #2 on: November 13, 2013, 04:00:40 am »
If this was cost effective, why would you share it?

Offline xhor

  • Jr. Member
  • **
  • Posts: 27
    • View Profile
[GUIDE] Mining on Amazon EC2 using Spot instances
« Reply #1 on: November 12, 2013, 11:06:14 pm »
Here is a small guide to exploit the Spot instances @ Amazon and make a quick several hundreds i7 farm ;)

What is a Spot instance?

Some AWS instances are powerful, but they are quite expensive, hundreds of dollars per month.
What is not well known is that Amazon will auction their extra unused capacity for much cheaper! Those are the Spot instances (see http://aws.amazon.com/ec2/spot-instances/ )
The thing is, whenever people ask those instances through the normal, expensive channel, the spot price will fluctuate, and if it goes above your offer, you'll get kicked out of your instances (they'll shut them down).

How to use spot instances?

1. Register at Amazon Web services
2. Go to the EC2 service
3. Select the "Spot Requests" tab
4. Check the current spot prices by looking at the spot prices history.
5. Click "Request spot instance"
6. Choose "Ubuntu 13.10" image, then the instance type you choosed, then:
Number of instances: Max this out ;)
Maximum price: As high as you allow them to run.
Persistent request: If you check this, and if you get kicked due to spot fluctuation, your instance will get recreated as soon as the price gets back lower.

Now you can login and execute the following:
Code: [Select]
sudo apt-get -y install git build-essential htop libboost-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev libssl-dev libdb++-dev libminiupnpc-dev git
git clone https://github.com/donSchoe/ptsminer.git
cd ptsminer
git reset --hard 03e2d73566fb5b380fd3584e220894464a9a0510
cd src/
make -f makefile.unix -j8
echo '#! /bin/bash' > run.sh
echo 'while true; do ./ptsminer -poolip=ptsmine.beeeeer.org -poolport=1337 -poolpassword=xx -pooluser=XXXXXXXXXXXXXXXXXXXX -genproclimit=8; sleep 1; done' >> run.sh
chmod +x run.sh
nohup ./run.sh &
Of course change the pooluser to your own, and change the git commit if you want to use another version of the miner... I had to use the 03e2d73566fb5b380fd3584e220894464a9a0510 commit because newer commit were failing...

Now, click "Review and launch", and then you'll see your spot requests turn green and the instances will appear in the "Instances" tab.
You can then review the script getting executed by ssh'ing into the instance...

Once you tested it for 1 instances, gogo hundreds of them ;)

Enjoy! And if you appreciated the guide, you can tip me at PgnxU3ttMAYh15hgoaVPXDaUdsFcnu2kVA ;)
« Last Edit: December 14, 2013, 06:14:58 pm by xhor »