Monday, January 20, 2014

Green mining?

Green server room was a hot topic a couple of years ago. The cost of energy plays a large part in the total operating cost of any computer system today, and this might indeed have been the largest incentive for the industry to go green (in addition of the PR value). The energy requirements are also worth noticing with private computer use.

In the previous post I talked about cryptocurrencies.  Mining is the most reliable way of gaining wealth with them, trading at exchange being more risky (yet also having greater potential profits). Mining is computationally very intensive, though, and thus it is also energy intensive (quite like traditional mining industry), and there are two main points about energy - the economical cost and the ecological cost. The economical cost is largely due to cost of energy, and ecological cost comes from production of the energy. The economical efficiency of a cryptocurrency miner is dependent - in addition to the price of energy - on the kilohash/s per kilowatt ratio of the mining equipment. The specialised mining rigs build for the single purpose of mining Bitcoins have pretty good kH/s per kW ratio, and it is a constant race to enhance the efficiency even more. Still, I'd also guess that most operators try to get their electricity at the lowest possible price, which many times means power mills burning coal. Coal (or either oil) is not that good for the ecological efficiency, which I'm going to measure in kH/s per CO2 (metric) ton. CO2 is being used due to simplicity although it represents only a fraction of all ecological effects (e.g. enviromental effects of mining and refining of the fuel, other emissions from the production of energy, and building of the facility are somewhat harder to take into account).

My initial idea with the small project that was described in the previous post was to take advantage of my work laptop while I'm not working, more precisely to borrow the hardware in a way no different to if I was surfing in Youtube over the weekend or trading stocks after office hours, using my own Internet connection and the electricity I pay myself (thus, I feel I'm not being taking advantage of my employer). I chose laptop not for the computing power (which is not that great) but for the energy efficiency of mobile equipment. The max output of the charger of the laptop is 65 W - a mere desktop processor of roughly the same specs can have max TDP of 95 W - not to mention the consumption of the rest of the hardware.


Calculating efficiency ratios

Let's toss some numbers around:

The laptop topped 14.1 khash/s - although that might not be the best that can be got out of the hardware due to only utilising the CPU - with measured power draw of 47 W, which means kH/s per kW ratio of 300. With 3 threads the hash rate decreased to 11.9 kH/s with power draw of 43 W, which actually means the efficiency ratio dropped, too, to 277. With only 2 threads (one per physical core) the rate came down to 9.7 khash/s with the power draw of 40 W, which means efficiency ratio of 243. A good example why it is worth measuring and calculating these things, since at least to me the result was not evident from the mere numbers. I would have also expected the power consumption to come down a bit more. No wifi or bluetooth was enabled, but I haven't touched the PM settings either - probably there might be some things to tweak.

There are not many (if any) LTC mining rigs (at least such that would compare to the BTC rigs) on the market due to the nature of the LTC hashing algorithm. However, I found a tutorial for building an LTC mining rig which quotes some specs to assess the efficiency. The rig ought to reach 1940 kH/s with power draw of 720 W when ideally tuned, which makes 2694 kH/s per kW - much better than the laptop.

LTC and BTC mining rates are not directly comparable, and since also the exchange rates are different and vary all the time, it is quite impossible to do comparison with the BTC rigs. However, just out of curiosity, let's peek at the first ASIC powered BTC mining rig I found with specs on the power consumption. It also happens to be the best you can get from the market at the moment. The specs say it can do 2 Thash/s at nominal power of 1650 W, so the efficiency ratio here is 1,212,121. That is mighty lot of hashing power (even though the figure is not comparable with the ones above). No wonder there is a market for such an ultra-expensive gear that can do exactly one thing and due to the continuous rise of the mining difficulty will get obsolete in less than six months. With that kind of computing gear it starts to become necessary to have proper A/C in place even in the most arctic climate (since computer gear don't like to get too cool, either), and the average figure for server rooms is that it takes at least as much power to get the heat out than to run hardware that produced the heat, which would practically halve the mining-power efficiency ratio. Having just one of those should be quite enough for keeping part of a small house warm during the cold season.


The cost of electricity and return of investment

The total price of electricity where I live during the last year was on average 0.125 EUR/kWh (based on the pricing for a small single house with estimated consumption of 18 MWh/year). Running the 2 TH/s BTC rig all around the year (14.5 MWh) would cost roughly 1800 EUR. With the current obscenely high exchange rate of BTC it would take 2.92 BTC to cover the electricity cost (and 7.15 BTC to pay back the rig of 5999 USD list price).

With the same electricity price, the home-built LTC rig would drain 6.3 MWh in a year, costing roughly 788 EUR (currently equivalent of 45.3 LTC), and to pay back the price of the parts (1356 USD) would take additional 57.6 LTC.

According to a Bitcoin calculator, the above mentioned BTC rig would have paid itself back on the third week, but assuming mining difficulty increase of 30%, the electricity price as above and the current exchange rates and other constants as they are now, the profit would have dropped to mere 100 EUR/week in just 190 days. At that point the return of investment would, however, be over 10,000 EUR, so it wouldn't be a bad investment as such. Adding some delivery and maintenance fees, the profit would likely be around 8000 EUR. It is worth noting, that the calculator listed some recent rigs that will never break even (assuming the current situation and forecast), let alone gain any profit.

In contrast to that, it would take 200+ days for the LTC rig to pay itself back, even if assuming the recent stability of LTC mining difficulty. It would take roughly 560 days to get about the same sized profit relative to the price paid as above (and here I didn't even throw in any maintenance fees yet). As it is unlikely that difficulty will keep at the current level that long and also electricity price is likely to go up, it might take a year just to break even. So, either BTC value is vastly bloated to make BTC mining so profitable, or specialised HW just beats commodity gear in efficiency.


The carbon dioxide foot-print

From the ecological side, generating 14.5 MWh of electricity would produce something like 13.9 tons of CO2 if generated by coal-fired thermal power, 10.9 tons of CO2 (oil-fired thermal power) or 7.4 tons of CO2 (natural gas combined). Also other sources of energy cause some CO2 emissions indirectly (building and operation of facilities etc), from 0.5 tons (solar power) to less than 0.2 tons (water power).
(Sources: Hitachi, U.S. Energy Information Agency. Values shown here calculated from averages between the sources)

Even though there are skeptics who claim climate change due to human actions is a myth, there is a strong scientific evidence that CO2 emissions alter the climate. There's also no question about the adverse ecological effects of all sorts of large scale industrial actions, or the fact that fossil fuels are going to end some day (or more precisely, it will become too expensive to extract them from the ground). So, in the ever-continuing absence of fusion power plants, I think it is well worth thinking where we are using the energy that is produced, and what kinds of production methods should be preferred.


Summary

After such a rant it is always hard to draw things to a closing, but I'll try...

Clearly it is best to have the equipment you're running match the requirements as closely as possible to be as efficient as possible. Home computers are bad at that since they usually try to offer a balanced but wide set of features. Servers are built with a different mind-set, they have a target task that needs to be filled with no extras.

Financially, the best you can probably do with a high-end gaming GPU (or an array of such) is to put it mining for cryptocurrency when you're not gaming. That will pay at least some of the next generation gear you'll likely want to buy at some point. If possible, aim for renewable energy sources for the electricity you buy, to get some of that greeniness into your personal IT, too. It can be argued that the heat dissipation of home electronics reduces the energy needed for heating, but that applies only to the cold season, having A/C to bust out the excess heat in the summer would just put the profits down the drain and be a waste of energy.

Also, if you have boxes that are on 24/7, it's worth trying a CPU miner with a low priority (in Windows) / high nice value (in Linux). That way you'd get something out of those otherwise idle hours, to compensate the base cost of having a box on (you have measured the power consumption of your computers when they idle, haven't you?).

However, one thing is sure: If you're going to make an investment, especially for financial purposes, be sure to calculate beforehand if the investment will pay itself back in a reasonable time.
(Uh, that might be the first financial statement I have ever made :D )
submit to reddit Delicious

No comments:

Post a Comment