OpenPOWER CPUs and Nvidia GPUs represent the best in class computing Power per $
To test that, I thought I’ll give compiling Ethereum mining suite a try on our Barreleye G2 server. As background information Barreleye G2 is a server Rackspace is building in collaboration with Google, IBM and Ingrasys
To compile Ethereum on Power9 with Nvidia P100 GPUs you have 2 options:
A) Compile it for CUDA
B) Compile it for OpenCL
In this post we will go with Option A (Compile it with CUDA). To do this you need to first get Nvidia Drivers and CUDA working on your openPOWER server. The link to blog post on how to get these working is here:
Once you have CUDA working (run an example CUDA application to make sure), install the build dependencies necessary for compiling ethereum. We will use cmake to configure and build.
sudo apt-get install libleveldb-dev libmicrohttpd-dev cmake
After looking around I realized that main github source for ethereum “ethereum/cpp-ethereum” no longer supports mining for GPUs. So instead I used: https://github.com/ethereum-mining/ethminer for my mining experiments with Nvidia P100 GPUs. I found the release “0.12.0.dev2” to be stable.
Download the latest official release zip and unzip
Make a build directory for your build activities and make that your current directory
Since I’m building for CUDA and NOT OpenCL, I made sure, my cmake configuration reflects that. This step 3-4 minutes on Barreleye G2 server
cmake .. -DETHASHCUDA=ON -DETHASHCL=OFF
Once cmake configure is done, we get to the fun part, building:
cmake –build .
If your build from source looks good, your screen should roughly look like this:
Make install the ethminer binary
sudo make install
At this point you have successfully built your ”ethminer” binary and it should reside in “/usr/local/bin/ethminer”
Play around with your newly built binary with command-line options:
Before actually mining you can benchmark / simulate to see how many Hash Rate (MH/s) can you hit
/usr/local/bin/ethminer -M -U
Once you have simulated and your expected MH/s match your expectations. Its time to actually mine ethereum.
You need to create a ethereum wallet and get your own address to send your mined coins to. Go to the below address, create and save your credentials safely
Once you have you created <ethereum address> and think of <miner tag> to identify your machine (helpful you are mining via multiple machines)
/usr/local/bin/ethminer –farm-recheck 200 -U -S us1.ethermine.org:4444 -FS eu1.ethermine.org:4444 -O <wallet address>.<tag>
/usr/local/bin/ethminer –farm-recheck 200 -U -S us1.ethermine.org:4444 -FS eu1.ethermine.org:4444 -O 0x4ff2de61282aa5da02E5F8399DB7d47A66Be1465.barreleyeg2
Soon your will receive console output indicating completed shares and your Hash rate:
Now how do you confirm / check the number of shares / amount of ethereum you have mine ? Got to below website and look up your wallet address from above:
You will be able to see details like below:
You can use below command to check how much power your nvidia GPUs are consuming
Please comment below if you have questions or are interested in price of this server / setup OR profitability.