Tuesday, 3 April 2018

Mining on a budget PC

Building a budget mining PC

There are lots of youtube videos about building a "budget" mining rig. But most of them at least spend a $1000 on their build and get around $100 a month which makes the payback period 10 months. So, I recently decided to build my own mining PC for just $300 dollars which could generate around $150-$170  per month. My aim was just to test these and I don't actually mine any cryptocurrency.

Parts

Motherboard - ASUS M5A78L-M/USB3
Processor - AMD Fx-8320E
Power supply - CORSAIR CX Series CX450
Case - Thermaltake V3 Black Edition
RAM - Patriot Signature 4GB DDR3
GPU - MSI RX 570 4Gb gaming X

All these parts cost me around $300( to see the detailed price of each item you can check out this blog).


Mining with stock settings

When I was mining on the stock settings for both the CPU and the GPU, I was getting around 180-200H/s while mining with Minergate and around 22-225H/s with Nicehash for mining Monero(with CPU) and around 500-550H/s with Minergate and 550-600H/s with NiceHash(with GPU). For Ethereum, I was getting a really bad performance of just 10Mh/s with Miner gate. With Nicehash I was around 20Mh/s, which is a lot better than MinerGate but still not the best that RX 570 can do.

Note: At this point, the gaming driver of AMD RX 570 was installed. I didn't know that AMD has released a different driver for improving mining performance. To download this driver go to this link.


Optimizing RX 570 to give around 28-29Mh/s while mining eEthereum (Dagger Hashimoto). 

I did the following modifications to get 28-29Mh/s from my RX 570.

  1. Install mining driver( improves hash rate by around 2Mh/s)
  2. Modify RX 570 ROM ( improved hash rate by around2-2.5Mh/s)
  3. Undervolt RX 570 using afterburner
  4. overclock memory(improved hash rate around 3Mh/s)
  5. Overclocking the core clock speed doesn't help much
Installing the mining driver is fairly simple. Just go to the link I provided above, download the driver and install it. Modifying the ROM is easy but it fails it can make your GPU useless and you may have to take it to the service center. To modify the ROM I followed this youtube video.
Undervolting: I saw that undervolting little bit doesn't affect the hash rate at all and brings down the power usage and temperature a little. You can try different values for this in afterburner, I have set it to -100mv.
Overclocking the memory: This is the step which gave the most performance gain. It was showing  1750Mhz on MSI afterburner, I increased it up to 2022Mhz. If you increase it too much the system will not be stable. The screen will go blank and then come back again with default settings. Settings for my RX 570 are the following:


Warning: don't overvolt if you are not 100% sure what you are doing. Don't let the fan run at 100% all the time as it may decrease the life of the graphics card. I saw that the fan was running at 99% so I ordered cooler master 120mm 4 case fans set for $11 and it has helped a lot. The fan speed remains around 35% now. If you can keep it with the case open it will help reduce the temperature a lot. I had to close the case as I wanted more protection for the expensive graphics card. If you are sure that your CPU is in a very safe place and keeping the case open wouldn't be a problem then you can keep the case open and use a table fan to remove heat.

Optimizing PC to get around 330H/s for mining Monero(Cryptonight).

There were two things I did to get around 330H/s while mining Monero

  1. Overclock the Processor.
  2. Lock Pages in Memory

Overclock

You can overclock the processor either through the BIOS or through the software. I don't know much about overclocking so I used the AMD overdrive to overclock the processor. SAVE all your work before trying to overclock the processor as it may make the system unstable and the PC restarts( I learned this the hard way). Always remember that setting the core frequency very high will most probably not harm your computer as long as you are not increasing the voltage. 

Open AMD OverDrive as administrator(right click -> run as administrator). Click on clock/performance which is under "performance control". Now click on "Turbo Core Control".




In the Turbo Core Control window on the top right side, you will see the drop-down menu which lets you select the number of cores you want to overclock, change it according to your preferences. On the top left side make sure "Enable Turbo Core" is checked. In this Window, you will see what the CPU core multiplier is by default.


 Now, increase the CPU 0 core multipler slowly by increments of 1 or 0.5. You want to make sure that your system is stable at that multiplier. If you set this value too high the system might restart and the default values will be restored. Not that along with setting the multiplier to 20X, I have also increased the voltage little bit as I saw it was giving a better performance at this value. Don't set the voltage too high as it may damage your system permanently. 



Locking page files in memory

Doing this increased the hash rate around 30%.
To enable the lock pages in memory option
  1. On the Start menu, click Run. In the Open box, type gpedit.msc.
  2. The Group Policy dialog box opens.
  3. On the Group Policy console, expand Computer Configuration, and then expand Windows Settings.
  4. Expand Security Settings, and then expand Local Policies.
  5. Select the User Rights Assignment folder.
  6. The policies will be displayed in the details pane.
  7. In the pane, double-click Lock pages in memory.
  8. In the Local Security Policy Setting dialog box, click Add user or group.
  9. In the window that opens, enter your computer's username and click on search names and it will add your user account. I would suggest adding both your account and the administrator account there.
  10. Click on Ok and then apply.

Performance after changing the setting to get max output

Minergate: Monero hash rate- 190-200H/s on CPU,  650-700H/s on GPU. Whenever I start mining( auto mining, which according to them mines currencies which give you the best profit that time) it only mines Monero with both CPU and GPU. I manually started Ethereum mining to see how much hash rate I am getting after all the optimization. Even after all the optimizations, I was only getting 13-13.5Mh/s.

Nicehash: Monero hash rate- 310-330H/s on CPU. Ethereum hash rate- 28.5Mh/s. So, as you can see from the results Nicehash was performing a lot better than Minergate.

Minergate vs Nicehash

As you can see from the results Nicehash is far better than Minergate. If you are using Linux setting up Nicehash may be a little difficult compared to Minergate. If you are mining on a system like this, it may be a month or so before you get your first payment. Nicehash pays you when your balance reaches 0.01BTC for external wallets. No matter which coin you are mining Nicehash automatically converts your earnings to Bitcoin and keeps it until it reaches 0.01BTC. 



Note: Please try all these modifications at your own risk.



3 comments:

  1. Hello I am so delighted I located your blog, I really located you by mistake, while I was watching on google for something else, Anyways I am here now and could just like to say thank for a tremendous post and a all round entertaining website. Please do keep up the great work.
    JingleMining Jasminer

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. Your text messaging within this template are actually specific, observe Pictures wrote this page could be very top shelf. LOGISTICS

    ReplyDelete