The toughest part of deciding to mine cryptocurrency is trying to work out if the system you have access can make any profit. In this guide we’ll take a look at how to evaluate a remote Linux server and see if you can make any money using the Minergate GUI.
The remote server that I’m going to use is the following AWS GPU server:
AWS g4dn.xlarge instance:
- 4 x VCPU (Xeon)
- 1 NVIDIA K80 GPU
- 16GB RAM
- 1 x NVIDIA T4 GPU
- $0.15 per hour (spot instance pricing)
Next, I needed to find out how good they are at mining cryptocurrency and work out if they are able to make a profit i.e. generate more cryptocurrency than either the electricity consumption in the case of my laptop or the monthly rental in the case of the cloud machines needs.
It turns out that benchmarking crypto mining performance is a little harder than it looks. This is because of the many different algorithms employed and artificial changing artificial difficulty in mining.
Matters are further complicated by the fact that mining is possible using the CPU and GPU but not with all cryptocurrencies. Rather than trying to install one of the many, many miners that only mine a single coin I found a crypto-mining application produced by the mining pool https://minergate.com/ that supports several.
The Minergate application has two modes of operation. It will either automatically choose the best coin to mine depending on your rig, or you can force it to mine any of the supported coins (ZEC, BTG, ETH, ETC, BCN, XMR, FCN, QCN, XDN, MCN, DSH, AEON). When mining is initiated Minergate will display how many hashes per second the machine that it is running on is capable of. This information is what we want as we don’t actually want to mine unless it going to generate money.
Once we know the hash rate of the machine we can calculate how many coins and therefore money it can generate and if this exceeds the cost of running or renting the machine.
On each of the three machines I ran Minergate it automatically selected Monero as the most profitable coin so that is the coin I used for each machine. However, selecting any of the other coins is just as easy.
My laptop runs ArchLinux and the Minergate package is available in the AUR repo. I also already have the OpenCL libraries installed so Minergate was able to use the GPU.
The basic virtual machine had no GPU so only the CPU was available for mining.
The AWS machine image I selected was the Deep Learning AMI (Ubuntu) Version 6.0 as it comes pre-installed with all the NVIDIA CUDA and OpenCL libraries.
The Minergate program is a available as Windows, Ubuntu and Redhat binaries and is very easy to install.
The Minergate program is a GUI application and so requires an X server to run its window. The X server running on your laptop or desktop has the ability to display the window of an application running on a remote machine. All that is needed is to pass SSH some options and the path to the remote binary and the remote application will use a window on your desktop.
This is the command that I ran:
ssh -CY firstname.lastname@example.org /usr/bin/minergate
The options mean:
Y= Enable X forwarding
C= Enable compression
You will also need to ensure that the following two lines are configured in the
/etc/ssh/sshd_config file on the remote machine:
X11Forwarding yes X11UseLocalhost no
If you are unable to get Minergate, or any remote, app to load on your desktop then you may need to install the
xorg-xauth package on the remote server (and possibly your local machine) first.
The Minergate application displays the performance of the machine as follows:
Laptop ROG GL551JW
The calculator automatically updates every few seconds with the current price of the selected coin and its current difficulty level.
If you are running the hardware yourself then use the top section of the use top table:
Fill in the following fields:
- Hashrate - Enter the combined hashrate.
- Power - The watts your rig uses.
- Power Cost - The cost per KW/h of your electricity. This should be on your power bill.
You will then get an instant read our of the amount of coins your box can produce and if they are worth more or less than your power consumption.
If you are renting a cloud server. Enter your hash rate in the top field and then, in the lower section:
Enter the rental fee in the Reccuring Costs field. Again, the number of coins and losses or gains will be instantly displayed.
These are the final results including costs and the value of Monero in USD at the time of writing for the three machines I tested are as follows:
None of them come close to making a profit for anyone other than the VM provider or the local energy provider. But it’s reassuring to know that I’m not missing out on potentially making a profit.
If you toggle the Live Stats switch you can increase the value of the coin until you do turn a profit and wait until, hopefully, the coin is worth more and a profit is possible.