Wednesday, September 7, 2016
Monero mining on Linux
With Monero's recent jump in price to over $10, it's the new hot coin for GPU mining. Monero has been around for a couple years now, so there are a couple options for mining. There's a closed-source miner from Claymore, and the open-source miner from Wolf that I used.
I used the same Ubuntu/AMD rig that I set up for eth mining. Building the miner took a couple updates compared to building ethminer. First, since stdatomic.h is missing from gcc 4.8.4, you need to use gcc 5 or 6. Second, jansson needs to be installed. On Ubuntu the required package is libjansson-dev. The default makefile uses a debug build with no optimization, so I modified the makefile to use O3 and LTO "OPT = -O3 -flto". I've shared the compiled binary on my google drive.
To mine with all the GPUs on your system, you'll have to edit the xmr.conf file and add to the "devices" list. The "index" is the card number from the output of "aticonfig --lsa". Although the miner supports setting GPU clock rates and fan speeds, I prefer to use my aticonfig scripts instead. It is also necessary to modify "rawintensity" and "worksize" for optimal performance. The xmr.conf included in the tgz file has the settings that I found work best for a R9 380 card clocked at 1050/1500. For a R7 370 card, I found a rawintensity setting of 640 worked best, giving about 400 hashes per second.
Although Monero was more profitable to mine than ethereum for a few days, the difficulty increase associated with more miners has evened it out. Dwarfpool has a XMR calculator that seems accurate. The pool I used was monerohash.com, and instead of running the monero client, I created an account online using mymonero.com.