How to mine Monero (XMR) on Rackspace Barreleye G2 Server (IBM POWER9)

Previous post, I’ve documented process of mining ETH / Ethereum on GPUs on POWER processor based server (called Barreleye ). Barreleye G2 is a open-source hardware server developed by Rackspace / Google.

In this post I explain, how to mine crypto-currency on CPU and still be profitable:

A. You pick the IBM POWER8 / 9 processors because of vector instructions supported on this CPU, helping the hashing algorithms (Specifically cryptonight algo – basis for Monero). (In your leisure, read this cryptonight standard that explains the basis of the algorithm itself )

B. You mine #MONERO – XMR because of its relative GPU / ASIC resistance. Monero has become one of the most popular cryptocurrencies due to its excellent privacy. Its website describes it as “secure, private, untraceable currency.”

For my guide I tested mining speeds on Rackspace server called : Barreleye G2 .
Example Speeds:  Hash-rate on Barreleye server running 2 POWER8 /POWER9 (10 core chip) (~5 KH/s) —- Equivalent to 9 x GeForce 1070 Mining hash-rate (475 H/s)

 

Currently verified operating systems are :

A. 16.04

B. CentOS 7.x

Here are the steps to follow for mining Monero on Barreleye G2 on Ubuntu 16.04. The only changes for CentOS will be in installing AT10 (look below for what AT10 is) and dependency package names (usually different for debain vs RHEL based repos):

Before starting make sure your SMT level is at 4 and not 8 (4-way multi-threading yields the best results – Discovery through experimentation)

ppc64_cpu –smt=4

1. Clone the xmr-stak-power repository for POWER based on xmr-stack-cpu and cd into source directory

git clone https://github.com/agangidi53/xmr-stak-power

cd xmr-stak-power

      2. Building a binary for mining on POWER needs gcc 6.3.1 which is available for public via Advanced toolchain 10. Install AT10.0 (Follow instructions below)

2a. Change Source list to add AT10 path

nano /etc/apt/sources.list

add “deb ftp://ftp.unicamp.br/pub/linuxpatch/toolchain/at/ubuntu xenial at10.0” at the end of the file

apt-get update

2b. Install the 4 AT10.0 packages and add them to the PATH:

apt-get install advance-toolchain-at10.0-runtime \
advance-toolchain-at10.0-devel \
advance-toolchain-at10.0-perf \
advance-toolchain-at10.0-mcore-libs
export PATH=/opt/at10.0/bin:$PATH

3. Install dependencies before building the mining binary:

apt install libmicrohttpd-dev -y
apt install libhwloc-dev -y
apt install libssl-dev -y

4. Configure, Make and Build the XMR-STAK-POWER binary

export LD_LIBRARY_PATH=’/usr/lib/powerpc64le-linux-gnu/’

cmake

make

make install

Binary will be built and saved as <source-directory>/bin/xmr-stak/power

5. Create a Monero wallet and make not of wallet address and private keys

Use https://moneroaddress.org/

6. Replace above the Wallet address and your email in following file <source-directory>/bin/config.txt in below format.

We are using supportxmr pool so use the below template for pool address.

Only replace your email / wallet address. Follow template for everything else.

“pool_address” : “pool.supportxmr.com:5555”,
“wallet_address” : “4945WAJVEC6A3ZM8hwWMrV15VSJeeAvUv3fRbwwMajToCQ2usQa2tefGyx6PFQwXqMfpk7dVdxX6BBqZfYibx3JD3UKzrFk”,
“pool_password” : “MinerName:<email-address>”,

Please note that the default config file assumes you have

8. Start mining by executing the binary you previously built. This binary will refer to config.txt to determine your wallet address, the pool you are joining and number of CPUs in the server etc. ( It assumes you have 2 x 10 core POWER proc. If its different config, you need to change the config file to reflect that )

Use a screen session to run the mining binary so that binary runs in background (and you don’t have to baby sit it)

apt install screen

screen

<hit enter for the message>

<source-director>/bin/xmr-stak/power

7. After mining for 5 minutes, login to supportxmr.com using these default credentials ::

username:     <your-wallet-address>

password:     <your-email-address provided in above config.txt>

8. Change your password to your choice after getting in to the website.

9. At this point the Top Right Corner on supportxmr.com shows your current hash-rate mined via the pool. Here’s test output using 2 Barreleye G2 servers:

Screen Shot 2017-11-20 at 4.00.15 AM

Advertisement

How to mine Ethereum on Rackspace BarreleyeG2 OpenPOWER server with Nvidia P100 GPUs

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

Screen Shot 2017-09-02 at 9.56.50 PM

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

wget https://github.com/ethereum-mining/ethminer/archive/v0.12.0.dev2.zip

unzip v0.12.0.dev2.zip

cd ethminer-0.12.0.dev2/

Make a build directory for your build activities and make that your current directory

mkdir build
cd build

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:

Screen Shot 2017-09-02 at 8.00.00 PM

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:

/usr/local/bin/ethminer –help

Before actually mining you can benchmark / simulate to see how many Hash Rate (MH/s) can you hit

/usr/local/bin/ethminer -M -U

Screen Shot 2017-09-02 at 9.22.26 PM

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

https://www.myetherwallet.com/

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:

Screen Shot 2017-09-02 at 9.44.26 PM

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:

https://ethermine.org

You will be able to see details like below:

Screen Shot 2017-09-02 at 9.48.41 PM

You can use below command to check how much power your nvidia GPUs are consuming

nvidia-smi

Please comment below if you have questions or are interested in price of this server / setup OR profitability.