Hi all,
I read some references on cloud GPU mining using Amazon Web Services (AWS) instances (
http://aws.amazon.com/ec2/instance-types/). Has anyone ever tried this service and came across howtos? Any ideas on applicability to Ethereum mining and / or projected cost-reward profile?
Thanks - Massi
Comments
24MH/s is not very good considering the amount of hardware involved. All NVidia so not ideal.
Of course, you could use a pre-configured AMI with all GPU drivers installed. However, if you want to get your hands dirty and set everything up by yourself then this is how you do it:
- get a g2.xlarge2 or g2.xlarge8 instance with a default install of Ubuntu 14.04
- make sure to open port 30303 for both TCP and UDP connections from `anywhere` in your security group settings
- ssh into your newly created instance
- the default version of Ubuntu that comes with ec2 is pretty minimal and is missing some drm files which are required for your OS to see the GPU drivers. To fix that:
-
-
- now you need to download the CUDA drivers (ec2 instances use Nvidia units). Getting a .deb (local or network makes no difference) rather than .run package will make your life easier
-
- (or check https://developer.nvidia.com/cuda-downloads for a newer version)
-
-
-
- check your driver is now installed:
-
- check one of the lines that start with "Configuration:", should say something like driver=nvidia. if it doesn't you may need another reboot. What you definitely don't want to see is driver=nouveau. If you do, then something is not right - google how to get rid of it and reinstall cuda.
- build geth from source: https://github.com/ethereum/go-ethereum/wiki/Installation-Instructions-for-Ubuntu#building-from-source
- run geth and leave it to catch up on the chain:
- install ethminer from cpp-ethereum dev PPAs: https://github.com/ethereum/cpp-ethereum/wiki/Installing-clients#installing-cpp-ethereum-on-ubuntu-1404-64-bit
- benchmark ethminer to check that your system is in order:
- You're almost done! Once geth has finished catching up on the blockchain, generate a new account:
- start it again with RPC enabled:
- start ethminer:
- if you're using the larger g2 instance with 4 GPUs you many need to start ethminer 4 times, each time adding a
- now you should be able to see ethminer getting work packages from geth and hopefully even "mined a block" logs in geth.
PS. Yes, I do realise this is one of those "100 easy steps" guides LOLsudo apt-get install linux-generic
(OK the default option when it prompts you to)sudo reboot
wget http://developer.download.nvidia.com/compute/cuda/7_0/Prod/local_installers/rpmdeb/cuda-repo-ubuntu1404-7-0-local_7.0-28_amd64.deb
sudo dpkg -i <cuda repo package>
sudo apt-get update
sudo apt-get install cuda
lshw -c video
~/go-ethereum/build/bin/geth
ethminer -G -M
(should give you your current hashrate, roughly 6MH/s)~/go-ethereum/build/bin/geth account new
~/go-ethereum/build/bin/geth --rpc
ethminer -G
--opencl-device <0..3>
argumentMaybe the best thing to do for dummies like me would be to stay away and wait for a desktop client with a graphic user interface (Mist?)
Anyway, what I'm trying to do is to turn all the wikis by developers, for developers into a "100 easy steps" (ha ha, this time for real) into something the average joe can apply immediately.
I want to contribute from the start.
The faster we make Ethereum "understandable" for average people, the more people will come in, the more traction ethereum will get.
Frankly, I still have problems getting to gpu mining.
Here is my draft:
https://medium.com/@angelomilan/cb2c8d3fa8b6
If you want to contribute, you are very welcome
Ciao!
sorry for any spelling errors - @CanaryInTheMine @angelomilan @Michael_A
https://github.com/angelomilan/ethereum-guides/blob/master/GPU-cloud_mining.md
Massi
$ ethminer -G -M
[OPENCL]:Found suitable OpenCL device [GRID K520] with 4294770688 bytes of GPU memory
Benchmarking on platform: GPU
Preparing DAG...
Warming up...
Trial 1... 0
Trial 2... 0
Trial 3... 0
Trial 4... 0
Trial 5... 0
min/mean/max: 0/0/0 H/s
inner mean: 0 H/s
Phoning home to find world ranking...
At least genoil and others seems to have some insight how to run instances.
How to use gpu instances just for mining and blockchain syncing for memory optimized instances? How to communicate between instances?
We have also updated the guide to generate the Genesis block in the AWS instance.
Follow the link: https://github.com/angelomilan/ethereum-guides/blob/master/GPU-cloud_mining.md
Launch it with a g2.8xlarge or g2.2xlarge instance (spot 8x is probably the better value, though neither is great at this point depending on your price predictions). Automatically on boot, the AMI will start up geth and ethminer in GPU-mining mode (genesis block already installed). You just need to wait a bit (at most 5 or 10 mins) for it to boot and catch up to the blockchain. Then use "geth attach" to change to the coinbase of your choice. You should get about 8 or 9 MH/s on the smaller instance, 35 or 36 MH/s on the larger. Miner logs are in em.log and geth logs are in geth.log, so you can watch them with "tail -f em.log"
Disclaimer: you should not trust me, I said "Y" for you and created the genesis block for you, and the default coinbase is of my choice so don't forget to change it to yours!
TBH I am not really sure that GPU mining on EC2 actually works, it's possible people are only mining using CPU and thinking they are mining on GPU.
sudo nano /etc/rc.local
I think you could use ec2-metadata to use the user tags, so you can preconfigure it for each instance.
Update/Solved: use screen
Followed the excellent outline above from jesus666 above but when i get to the, "make geth" stage, I error out with the following:
build/_workspace/src/github.com/ethereum/go-ethereum/Godeps/_workspace/src/github.com/huin/goupnp/goupnp.go:97: unknown http.Client field 'Timeout' in struct literal
make: *** [geth] Error 2
All the steps leading up to this worked well for me.
________________
Edit: Time to sleep. Just realized I had the wrong version of Go installed, which the 100 step guideline did actually mention.