Before reading: mining any crypto currency in Azure is a verry bad idea! This article explains why
Update: I have reports that this is being actively blocked by Azure. This was always intended for testing purposes not for actual production mining
Last post I wrote about setting up a simple mining instance in Azure using the GPU instances. As seen the efficiency was very low. However this topic sparked a lot of interest, so I decided to give it another try this time focusing on getting higher efficiency from the rig.
I believe this might be possible due to more efficient miners, tuning the mining parameters and fully using all machine resources CPU and GPU.
Let's get started!
I will use windows instead of Linux and change the way I measure the hashes per second so please do not compare results with my previous post
Most miners are leveraging Cuda and other optimization techniques, this also gives the user the possibility to customize miner settings. With this in mind I wanted to build a script which tries all parameters of a miner within certain limits to find the optimal mining settings. With this I wanted to see if I could raise the efficiency and see how big the difference is between base settings and possible optimized settings.
Secondly, last blog post I described how disappointing it was to see that not all the available CPU power was used in the VM. When using this to mine Ethereum there was literally no effect: the CPU was simply not fast enough to contribute. So this time I wanted to take a look at other coins which run better on CPU instead of only GPU. I have chosen Monero for this, which is also a large coin and has CPU optimized miners.
Hardware to use
In the previous post I used the K80 and M60 Nvidia GPU this, when available I will also use the P100 and P40 GPU and make a new post. I will also test the script on consumer PC hardware to compare this to the cloud GPUs.
How does the program works?
I have written this optimization script in Nodejs, which in turn spawns child processes with the miner. I have used windows so the commands needs to be adjusted a little to work on Linux. This is an easy fix. I have tested and it worked. I am using both Ethminer and Claymore which are also packaged in the optimization script so no need to install or anything.
You can find the code here but below is an easily readable version on how the optimizer works:
Step 1. Create an array with all parameter names and possibilities. Step 2. Loop trough all possibilities and start a miner with the certain options. Step 3. Save the Log output of the miner to a file. Step 4. Analyse the outcome and start the miner with the best parameter settings. To run until VM is shut down.
Did this really work?
|VM Name||Default||Min||Optimized||% default optimized|
Final parameters which I have found:
I have tested both the Ethminer and the Claymore miner, however in all cases the Ethminer performed better.
As you can see the performance gains are very significant so it really pays to spend time to optimize your miners. Unfortunately this does not come near to a profitable solution.
Trying to get some extra cash from the CPU
In previous post I tried to get some extra revenue by using the CPU to mine Ethereum, this failed horribly. So I searched for coins that do not place too harsh of a penalty on mining with CPU, for that I turned to Monero. The miner I am using is the XMR stak miner, my first thought would be that this would get a way higher yield then Ethereum mining.
Regardless of the machines I got roughly 30H/s per core and this scaled completely linear. This would result in roughly $0.09 per day per core. So again this made no sense at all.
Big fail again.
Working with these technologies is really cool, and tuning does really give you a better performance however it is still very far from being profitable. Next step will be to test te same script on the new GPU which will launch coming months in Azure. This might be more profitable when using on personal rigs.
Will keep you posted
As seen this is very inefficient I do not encourage doing this for actual mining, even if you have left over Azure credits.