Mining Bitcoin & Ethereum @ home: let the beast go!

View this thread on: d.buzz | hive.blog | peakd.com | ecency.com
·@omnicron·
0.000 HBD
Mining Bitcoin & Ethereum @ home: let the beast go!
<html>
<p>I’ve always had a huge interest in science and technology. Now and then I &nbsp;throw myself in a new technology project, not really knowing if my crazy &nbsp;plan is actually going to work out or not. I’m having a lot of fun &nbsp;messing with stuff, using trial and error to get it working. My wife is &nbsp;still thankful for the media-center and server I set up, coming from &nbsp;zero knowledge of Linux and servers and so on. I really had a good time &nbsp;building and configuring those things. It was worth my while, because &nbsp;when my six year old daughter wants to watch a movie on the media &nbsp;center, she always calls it “one of daddies movies”.&nbsp;:)&nbsp;</p>
<p>In 2013 I learned about something that sparked my interest. The Bitcoin. &nbsp;A friend of mine was talking about it and told me what it was and what &nbsp;one could do with it. Turns out Bitcoin is the first decentralized &nbsp;Cryptocurrency payment system ever invented by an entity known as &nbsp;Satoshi Nakamoto. The cash of the Internet, so to say. So I started &nbsp;learning more about Bitcoin, how it worked, and what it’s possibilities &nbsp;were.&nbsp;</p>
<p>I liked the &nbsp;idea of being able to do payments to others over the Internet in a fast, &nbsp;safe and even anonymous way. To me it’s fascinating to see how Bitcoin &nbsp;works under the hood and how all of this is connected to the blockchain, &nbsp;which might actually even be more important than the Bitcoin itself.&nbsp;</p>
<p>I eventually &nbsp;found out it was possible to mine Bitcoin. “Mining Bitcoin” means your &nbsp;hardware has to do some hard calculations and send them to the &nbsp;Bitcoin-network. In return you get some Bitcoin back, which you can keep &nbsp;in a Bitcoin Wallet.I was hooked from the beginning. Not because of the &nbsp;money aspect, but again, just for the fun of it! Those are projects I &nbsp;like getting myself into. For people who want the learn the basics of &nbsp;Bitcoin and mining, feel free to click here: <a href="https://bitcoin.org/en/faq">basics of bitcoin and mining</a>. Another good article can be found <a href="http://www.npr.org/sections/alltechconsidered/2014/02/25/282622916/ignored-bitcoin-this-whole-time-this-one-s-for-you">here</a>. I won’t go into too much detail here, that’s not the essence of this piece.&nbsp;</p>
<p>So, earning money by mining Bitcoin, you say?&nbsp;</p>
<p>Before you get any idea’s: mining Bitcoin yourself has become nearly &nbsp;impossible now. It’s like a gold rush on a field somewhere. Eventually &nbsp;everyone knows about it, showing up with their shovels and pickaxes, &nbsp;digging in the ground. Only the people with the best and most expensive &nbsp;material will actually find something in the end, as you have to dig &nbsp;deeper and deeper to find something. This is called the difficulty of &nbsp;mining. Technically, there is a different explanation of how mining &nbsp;works, but like I said before, we won’t go that way. Just so you do get &nbsp;some idea: this picture below is from 2014, showing the biggest Bitcoin &nbsp;mine at that time. Those green things you see are all pieces of &nbsp;hardware, doing the necessary calculations to get Bitcoin in return. &nbsp;Trying to compete against this would be total madness due to the massive &nbsp;electricity costs.&nbsp;</p>
<p><img src="https://cdn-images-1.medium.com/max/800/0*Re-XpNd15CKlEFCN.jpg" width="800" height="593"/></p>
<p>So, don’t try it at home. Back in 2013 it was still possible to have &nbsp;some profit so I decided to give the mining project a shot. To get &nbsp;everything running I needed:&nbsp;</p>
<ul>
  <li>A &nbsp;raspberry Pi, Model A. A raspberry is a small computer, originally made &nbsp;in England to learn kids how to program. You can do lots of other great &nbsp;projects with it, like building your own Gameboy with it&nbsp;:) Google is &nbsp;your friend if you want to know more.</li>
  <li>The miner itself, back in those days I got myself a 7 GH/s Jalapeno from <a href="http://www.butterflylabs.com/">Butterfly labs</a>. &nbsp;A miner is the piece of hardware that does the calculations on the &nbsp;bitcoin-network and for which you get Bitcoin in return. GH means &nbsp;gigahash. A hash is the unit for the calculation speed.</li>
  <li>An Internet connection, preferably via cable</li>
  <li>Another PC to monitor the Raspberry Pi</li>
  <li>Some knowledge of Linux</li>
  <li>Some luck getting everything up and running in a decent time frame…&nbsp;:)</li>
</ul>
<p>My setup looked a bit like this:&nbsp;</p>
<p><img src="https://cdn-images-1.medium.com/max/800/0*htiIvrCDQcRGFBG9.jpg" width="800" height="450"/></p>
<p>A short notice of how it actually works:</p>
<ul>
  <li>The &nbsp;miner is being connected to the raspberry Pi. I configured both systems &nbsp;to interact with eachother and the miner gets started from a single &nbsp;command from the Raspberry Pi.</li>
  <li>I monitor the Raspberry Pi from my PC within my home network, via the RDP protocol</li>
</ul>
<p>The earned Bitcoin gets delivered to my wallet online, which was at “Slush’s Pool” at the time. Below you can see a picture of the bitcoin mining process.</p>
<p><img src="https://cdn-images-1.medium.com/max/800/1*pfTu85L2F5BZsn8AX1vWew.png" width="401" height="244"/></p>
<p>One thing I didn’t really think of was that miners are really loud &nbsp;monsters. They are like airplanes taking off! They also generate a lot &nbsp;of heat. I placed it in our small storage room at our apartment, hoping &nbsp;it would cover the noise, but it didn’t really help much. I remember my &nbsp;wife coming in right after I turned it on, first looking at the miner, &nbsp;and after that looking at me, giving me the roll-eyes. Still, I love her &nbsp;for putting up with me and my crazy idea’s…&nbsp;</p>
<p>It even got better when the place became hot as hell when the miner, &nbsp;washing machine and dryer each were minding their own business…&nbsp;:)&nbsp;</p>
<p>I had to pull the plug on the project after six months. The mining &nbsp;difficulty had become so high by then it was no longer affordable to &nbsp;mine due to the high electricity costs in Belgium. I had to end it &nbsp;because my electricity costs were higher than my revenues from mining. &nbsp;And finally some silence back in the apartment. At least my wife was happy.&nbsp;</p>
<p>The most important part is that I learned a lot from doing that little &nbsp;rather short-lived project. From that time on my interest in &nbsp;Cryptocurrency and mining was born and I started following up on stuff &nbsp;concerning Bitcoin and everything around it. The whole concept had a lot &nbsp;of potential and could be used for a lot more than only for digital &nbsp;payments.&nbsp;</p>
<p>The Bitcoin itself became popular, but it also had its flaws and limitations. I unhappily refer to the <a href="http://www.coindesk.com/bitcoin-bug-guide-transaction-malleability/">transaction malleability bug</a> &nbsp;back in 2014 and not to forget: the bankruptcy of Mt. Gox, an exchange &nbsp;site for Bitcoin where people could also have their own Bitcoin-wallets. &nbsp;I am sure a lot of people lost a lot of money that day.&nbsp;</p>
<p>Things got really interesting when a brilliant guy by the name of &nbsp;Vitalik Buterin co-founded Ethereum in 2013. The basics of Ethereum can &nbsp;be found in how Bitcoin works, but Ethereum has a whole different &nbsp;purpose.&nbsp;</p>
<p>Ethereum is a decentralized platform that is able to run smart contracts &nbsp;and other applications, also being called decentralized applications &nbsp;(Dapps). A smart contract is a programmed contract that is automatically &nbsp;executed when the conditions of the contract are met.&nbsp;</p>
<p>An example: I have to pay a certain amount of money to my landlord every &nbsp;month. This amount gets deducted from my bank account and gets added to &nbsp;the bank account of my landlord. If I do not have enough money on the &nbsp;account, the payment fails and I can expect an angry phone call. It is &nbsp;perfectly possible to program these conditions in a smart contract.&nbsp;</p>
<p>The big difference is the word “decentralized”. This is a key difference &nbsp;between how a bank works, and how a smart contract works. A bank is a &nbsp;central authority who has all the say about my bank account. The &nbsp;Ethereum platform (and Bitcoin as well) is decentralized.&nbsp;</p>
<p>“Decentralized” means that every system connected to the Ethereum &nbsp;platform has a copy of the contract. This makes sure you cannot tamper &nbsp;with the contract, and downtime is also not an issue here. Another &nbsp;advantage is that you do no longer need a “central authority” like a &nbsp;bank or a notary as everything is being arranged by those “smart &nbsp;contracts”. A good explanation into further detail about smart contracts &nbsp;can be found <a href="http://cryptorials.io/a-beginners-guide-to-smart-contracts/">here&nbsp;</a>.&nbsp;</p>
<p>Next to all these features, Ethereum is also a Cryptocurrency, like &nbsp;Bitcoin is. Even better news: it can also be mined, for now. With &nbsp;Bitcoin, I was able to buy a miner. Now I would have to build one (which &nbsp;is easier than it sounds actually).&nbsp;</p>
<p>As explained before: mining is actually doing calculations to confirm &nbsp;transactions (for example: a payment of a Cryptocurrency from person A &nbsp;to person B) on the network. With Bitcoin, we had a miner who did those &nbsp;calculations. With Ethereum, these calculations are preferably being &nbsp;done by the graphics card (or GPU, graphical processing unit) of the &nbsp;miner. So, to build a good miner, I needed a system with one or two good &nbsp;graphics cards. Below I will explain how I did it all. It’s a bit in &nbsp;detail, but it’s a good reference for people who want to try the same &nbsp;thing.&nbsp;</p>
<p>I had to take a few things into consideration before I went building:</p>
<ul>
  <li>What is my budget for this miner? Eventually I went for around € 500.</li>
  <li>What &nbsp;GPU’s was I going to buy? I needed GPU’s that were actually good at &nbsp;mining. And also: where was I going to buy these? They were going to be &nbsp;the most expensive part of the system so I had to be careful there. I &nbsp;decided to buy 2 used AMD Radeon 7950 GPU’s at Amazon.</li>
  <li>Where &nbsp;was I going to put my miner? I didn’t want to have it in my house due &nbsp;to the noise and heat. So I went for my garage. I had to provide &nbsp;Internet there. I managed doing that by 2 PLC’s or &nbsp;Power-Line-Connectors. Internet via the grid, so to say.</li>
  <li>What &nbsp;OS was I going to use? Windows or Linux? As I like to learn new stuff &nbsp;along the way, I went with Ubuntu Linux. It’s also a free OS, which &nbsp;makes my choice an easy one here.</li>
  <li>I &nbsp;also wanted to be able to connect to this PC from my apartment&nbsp;, so I &nbsp;needed to implement an RDP-connection between the two systems so I could &nbsp;monitor everything from the PC in my apartment&nbsp;. This way I could fix &nbsp;small problems from my house instead of walking to the garage if the &nbsp;miner would decide to go haywire.</li>
</ul>
<p>I went for the following configuration:&nbsp;</p>
<ul>
  <li>Motherboard: Gigabyte GA -B85M-D3H. It’s small, but it does suffice for what we are doing here!</li>
  <li>Processor: Celeron G1840 Boxed. The processor won’t have to do much in the mining process.</li>
  <li>RAM: &nbsp;Kingston 8 GB RAM which I had laying around somewhere. In the end, I &nbsp;eventually installed 4 GB, as one of my sticks is probably broken &nbsp;somehow.</li>
  <li>HDD: SSDnow KC400 128 GB (Will be more than sufficient.)</li>
  <li>PSU: &nbsp;Antec 700VP (which provides 700W), before this I had a Seasonic &nbsp;S12II-Bronze 520W which did not provide enough power for the two GPU’s.</li>
  <li>GPU’s: &nbsp;AMD Radeon 7950 x 2. Good GPU’s at mining and with 3GB RAM. Your GPU &nbsp;must at least have 3GB of ram, or else it will fail when loading the &nbsp;DAG-file. See more info down below.</li>
  <li>Case: An old case I had laying around somewhere which would fit for the job.</li>
  <li>Internet &nbsp;connection: being provided with 2 PLC’s, where one is being connected &nbsp;to my router, and the other one to the miner in my garage.</li>
  <li>Other: 1 cheap LCD screen, keyboard and mouse, for comfort if I needed to check out the system in the garage.</li>
  <li>OS: Ubuntu 14.04&nbsp;. I <strong>strongly </strong>advice &nbsp;against Ubuntu 16.04 as I had a lot of trouble getting the AMD-drivers &nbsp;running. Eventually I bailed out and fell back to 14.04 which went fine &nbsp;from the start.</li>
</ul>
<p>It’s been a long time since I built my last computer actually. Made some dumb mistakes there:&nbsp;</p>
<ul>
  <li>I &nbsp;oriented the CPU-fan away from its connector of the motherboard, so I &nbsp;had to mess around a bit with the cable to get it connected. (I was &nbsp;worried I was going to break stuff when I was to dismount the fan again, &nbsp;so I decided not to.)</li>
  <li>I &nbsp;was looking for about half an hour to find the connectors for the &nbsp;power-, reset-button and HD-LED’s. The reason I could not find them was &nbsp;because I already placed my mammoth-GPU’s on top of them. Evil me!</li>
  <li>I &nbsp;forgot to connect my PC speaker and the PC didn’t want to boot for some &nbsp;reason at the first time. Took a while before I found out I didn’t &nbsp;connect the speaker and, after that, it seemed that one of the RAM’s was &nbsp;faulty. So I decided to go forward with 4 GB ram, which should also do &nbsp;the trick.</li>
</ul>
<p>Anyway, I got everything working in the end. This is how the miner looks like:&nbsp;</p>
<p><img src="https://cdn-images-1.medium.com/max/800/1*0DkaLtcGu3rvGQRNHmPBjA.jpeg" width="800" height="1066"/></p>
<p>Time to install Ubuntu!&nbsp;</p>
<p>Due to lack of a DVD-drive I installed Ubuntu 14.04 with a USB-stick. All you need is the <a href="http://www.ubuntu.com/">ISO of Ubuntu</a> and <a href="https://rufus.akeo.ie/">Rufus</a>, &nbsp;a small program to make your stick bootable and installs the ISO for &nbsp;you on the stick. Great program. The installation of Ubuntu is pretty &nbsp;straightforward. Best is also to have an Internet connection during &nbsp;installation to have the most recent software and repositories &nbsp;installed.&nbsp;</p>
<p>Once Ubuntu is installed, it’s time for the real work. Hook the miner up &nbsp;the Internet if you didn’t do that already and start a terminal. First &nbsp;thing you need to do is getting all the necessary repositories for your &nbsp;AMD GPU to work. In my case the guide found <a href="https://forum.ethereum.org/discussion/2695/frontier-mining-setup-notes-ubuntu-15-04-geth-v1-0-amd-ethminer/p1">here</a> was a great help.&nbsp;</p>
<p>Download the AMD APP SDK (don’t be like me and get the 64bit driver!) from <a href="http://developer.amd.com/tools-and-sdks/opencl-zone/amd-accelerated-parallel-processing-app-sdk/">here</a> and the AMD display library from <a href="http://developer.amd.com/tools-and-sdks/graphics-development/display-library-adl-sdk/">here</a>, &nbsp;save them to your home folder and unpack them. Download the most recent &nbsp;versions. After that, run the commands below from your home folder &nbsp;(e.g.: /home/thomas/). Remember you can check your current folder by &nbsp;typing “pwd”.&nbsp;</p>
<pre><code>$ sudo su<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
$ ./AMD-APP-SDK-v3.0.130.136-GA-linux32.sh # Get the 64bit driver!<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
$ ln -s /opt/AMDAPPSDK-3.0 /opt/AMDAPP <br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
$ ln -s /opt/AMDAPP/include/CL /usr/include $ ln -s /opt/AMDAPP/lib/x86_64/* /usr/lib/ <br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
$ ldconfig<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
$ reboot &nbsp;</code></pre>
<p>The command “sudo su” makes you being superuser after you type in your &nbsp;password. Else you’ll have to type “sudo” every time you issue a &nbsp;command, which is too cumbersome for me, but feel free to do as you &nbsp;please.&nbsp;</p>
<p>Once the miner has rebooted, open the terminal again and install the &nbsp;fglrx drivers (the AMD Catalyst drivers of windows). “aticonfig &nbsp;--list-adapters” will display your AMD-GPU.&nbsp;</p>
<pre><code>$ sudo su<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
$ apt-get install fglrx-updates<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
$ aticonfig --adapter=all --initial<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
$ aticonfig --list-adapters</code></pre>
<p>“aticonfig --list-adapters” will display your GPU(‘s). You should get an output looking like this:&nbsp;</p>
<pre><code>* 0. 01:00.0 AMD Radeon R9 200 / HD 7900 Series<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
 &nbsp;1. 06:00.0 AMD Radeon HD 7900 Series</code></pre>
<pre><code>* - Default adapter</code></pre>
<p>This means that everything so far has been properly installed and we can &nbsp;continue with the next step, which is to install curl, git, geth, &nbsp;cpp-ethereum and Ethereum:&nbsp;</p>
<pre><code>$ apt-get install curl<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
$ apt-get install git<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
$ bash &lt;(curl https://raw.githubusercontent.com/ethereum/frontier-release/master/bin/install-go.sh)<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
$ add-apt-repository ppa:ethereum/ethereum-qt<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
$ add-apt-repository ppa:ethereum/ethereum<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
$ apt-get update<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
$ apt-get install cpp-ethereum</code></pre>
<p>What do all these programs do anyway and why do I need them?</p>
<ul>
  <li>Curl &nbsp;is a program used for sending or downloading files using the &nbsp;URL-syntax. This will be used in the next step to download certain files &nbsp;we will use to generate the Genesis Block.</li>
  <li>Git &nbsp;is used (in this case) to download files from Github, a famous platform &nbsp;which houses lots of software-projects and keeps track of &nbsp;version-history. We will need to download certain software from Github &nbsp;to get everything working.</li>
  <li>Geth: &nbsp;program which will be the “communicator” between you (the node) and the &nbsp;software which does the mining itself (ethminer). It can be used for a &nbsp;lot, lot more, but for now this explanation will suffice. Geth will be &nbsp;installed by the script we run in step 3 (bash&lt;(curl…)</li>
  <li>cpp-ethereum and Ethereum: the software needed to do the actual mining of Ethereum.</li>
</ul>
<p>Next we have to install the Genesis Block. The Genesis block is the &nbsp;first block of a Blockchain (in our case: the Ethereum-Blockchain), the &nbsp;ledger in which you can find all the transactions of the cryptocurrency. &nbsp;Note that Ethereum has its own Blockchain, as Bitcoin does.&nbsp;</p>
<pre><code>$ curl -O https://raw.githubusercontent.com/ethereum/genesis_block_generator/master/mk_genesis_block.py<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
$ curl -O https://bootstrap.pypa.io/get-pip.py<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
$ python get-pip.py<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
$ pip install bitcoin<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
$ pip install --upgrade bitcoin<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
$ python mk_genesis_block.py --extradata 0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa &gt; genesis_block.json</code></pre>
<p>&nbsp;Almost there. Time to create our own wallet, the location where we will &nbsp;store our Ethereum. This wallet is being represented by a bunch of &nbsp;letters and numbers and can only be accessed by the user knowing the &nbsp;password. These addresses are being created by Geth and yes, they look a &nbsp;bit weird. e.g.: 0x123f681646d4a755815f9cb19e1acc8565a0c2ac&nbsp;</p>
<p>You will be asked for a password. Type it in, and do NOT lose it, as it &nbsp;cannot be recovered. If you lose your password, you lose your Ethereum. &nbsp;It’s like putting your money in a box, locking it and throwing the key &nbsp;away.&nbsp;</p>
<p>Next, we must load the Genesis Block created in the previous step, and sync it with the network.&nbsp;</p>
<pre><code>$ geth account new<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
$ geth --rpc --rpccorsdomain "*" --genesis "~/genesis_block.json"</code></pre>
<p>Now, we should be able to start mining. But…there is one more important &nbsp;item: the difference between solo mining and “pool mining”.&nbsp;</p>
<p>As explained before: Mining is where the miner does complicated &nbsp;calculations in an attempt to confirm the translations done by the users &nbsp;on the network. As these calculations are pretty difficult, you can &nbsp;choose to help “solve” these calculations in a pool, so, by a group of &nbsp;miners. Once a solution has been found the miners get rewarded by a &nbsp;certain percentage of the reward for providing the solution. There is &nbsp;also the pool fee, which you have to pay for using the pool.&nbsp;</p>
<p>If you go solo-mining, you alone are trying to solve calculations, &nbsp;without the help of others. If you have a small miner it’s not &nbsp;recommended to try this, because getting a reward is more based on luck, &nbsp;as you are competing against the whole world, finding a solution.&nbsp;</p>
<p>Needless too say, I advice you to start pool-mining, as this will guarantee a certain income of Ether.&nbsp;</p>
<p>At the moment, I’m using Dwarfpool as mining pool. Registration is not &nbsp;required. All you have to do is tell your miner where it has to go to &nbsp;start pool mining. You will be able to follow the mining process at the &nbsp;Dwarfpool-website, which can be found <a href="http://www.dwarfpool.com/">here</a>.&nbsp;</p>
<p>So, the command to get the miner up and running is:&nbsp;</p>
<pre><code>ethminer --farm-recheck 400 -G --opencl-device 0 -F http://eth-eu.dwarfpool.com:80/08ceda86012b77a0e780ba852f4ce7318d1d15a2/worker0 --cl-local-work 256 --cl-global-work 16384</code></pre>
<ul>
  <li>--farm-recheck is the frequency in milliseconds that ethminer will ask geth for new calculations to be done.</li>
  <li>Parameter -G indicates we want our GPU to do the mining. You can also mine with your CPU, which is not recommended.</li>
  <li>-F: here we indicate we want to do farm mining, instead of solo mining</li>
  <li>“Device 0” is my primary GPU. Remember this output? Device 0 is the first line and is the default GPU.</li>
</ul>
<pre><code>* 0. 01:00.0 AMD Radeon R9 200 / HD 7900 Series<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
 &nbsp;1. 06:00.0 AMD Radeon HD 7900 Series</code></pre>
<pre><code>* - Default adapter</code></pre>
<ul>
  <li>http://eth-eu.dwarfpool.com:80/ is the URL of the pool. 08ceda86012b77a0e780ba852f4ce7318d1d15a2 is my own Ethereum wallet and worker0 is the name of the GPU as being known to Dwarfpool. On the site I can follow how the GPU performs by knowing its name.</li>
  <li>cl-local-work &nbsp;256 and cl-global-work 16384 are fine-tuning option for the GPU. i will &nbsp;not explain it in full detail here. It does seem to yield the best &nbsp;results though.</li>
</ul>
<p>Certain people might notice that under these circumstances, now only one &nbsp;GPU will mine. I actually forgot this the first time and it suddenly &nbsp;occurred to me while I was not at home. Activating the second GPU to &nbsp;mine is not hard, once you get the hang of it: remember you must change &nbsp;the value of your device from 0 to 1 and the name of the worker from 0 &nbsp;to 1. Actually, it doesn’t matter how you call you worker. Call it &nbsp;“African_Swallow” or “American_Swallow”, if you like.&nbsp;</p>
<pre><code>ethminer --farm-recheck 400 -G --opencl-device 1 -F http://eth-eu.dwarfpool.com:80/08ceda86012b77a0e780ba852f4ce7318d1d15a2/worker1 --cl-local-work 256 --cl-global-work 16384</code></pre>
<p><img src="https://cdn-images-1.medium.com/max/800/1*vGDmQ_o8Z3prJfFIJMf78g.jpeg" width="800" height="600"/></p>
<p>At first, the miner will build the DAG (directed acyclic graph) and will &nbsp;load it up into the ram of the GPU. You need to have a GPU with more &nbsp;than 2GB RAM or else the DAG-file will not be loaded, leaving you unable &nbsp;to mine. Once this has been done, the actual mining will start. You can see this on the picture above.</p>
<p>It is most interesting to monitor the temperature of your GPU’s. To do this, open a second terminal window and type:&nbsp;</p>
<pre><code>watch -n 3 aticonfig --adapter=ALL --od-gettemperature</code></pre>
<p>This command will watch the temperature of all GPU’s and update it every &nbsp;3 seconds. The temperature of my cards balance between 70 and 80 °C, &nbsp;which is OK. If the GPU’s turns too hot, your miner will hang as a &nbsp;safety precaution. Check this output:&nbsp;</p>
<pre><code>adapter 0 - AMD Radeon R9 200 / HD 7900 Series<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
Sensor 0: Temperature - 73.00 C<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
ERROR - Get temperature failed for Adapter 1 - AMD Radeon HD 7900 Series&nbsp;</code></pre>
<p>I still gotta look for a workaround for the error on adapter 1. It’s a &nbsp;known problem which can be fixed. Both GPU’s are around the same &nbsp;temperature though.&nbsp;</p>
<p>There are other interesting commands out there, but these should do for &nbsp;now. For example: it is possible to keep your miner below a certain &nbsp;amount of °, or letting the fans work at a certain % of their full &nbsp;capacity. Never run your fans at 100% by the way.&nbsp;</p>
<p>Last but not least I installed Teamviewer on my desktop at my house and &nbsp;the miner in the garage. It will do for now, but once everything is &nbsp;running smoothly I will install TightVNC viewer and server on the home &nbsp;desktop and the miner. The installation of Teamviewer is pretty &nbsp;straightforward as you can download it from <a href="http://www.teamviewer.com/">here,</a> &nbsp;choose the Debian package and let Synaptic do the rest of the work for &nbsp;you. Once installed you can register both systems at Teamviewer to make &nbsp;the connection more conveniently. If both Internet connections are &nbsp;stable, the connection between the two systems should go without a &nbsp;problem.&nbsp;</p>
<p>I hope this article sparks your interest in this fascinating technology &nbsp;and who knows, maybe you will even start mining yourself? Don’t hesitate &nbsp;to share, ask questions or comment on my story. You can follow me by clicking <a href="https://steemit.com/@omnicron">here!</a></p>
<p>A sidenote: I also ran experiments with Monero mining. I might write a short article about this in the future&nbsp;:)&nbsp;</p>
<p>Edit: Sorry about my codeblocks going haywire. It's my first post here and I seem to have messed up a bit...</p>
<p><br></p>
</html>
👍 , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,