Friday, April 6th 2018

Confessions of a Crypto Miner: Green(er) Mining

Welcome back to "Confessions of a Crypto Miner," my column about a crypto miner from 2013 trying to get caught up with the latest standards. I'm presently mining and reporting to you from a dual-GTX 1080 based rig mining zCash. Today, I'm going to talk about saving energy and reducing a miner's impact on the environment. How can you do that, you ask? Simple: Consolidation.

Mining inherently consumes a lot of energy, but a lot of things we do as tech geeks are actually not all that efficient. Case in point, my NAS I've had for years. Old Lenovo server-something or another, modded pretty hardcore, but still energy-drinking to the core. It's based around a Core 2 Quad and uses around 400W of power on its own when not doing much of anything more than being an NAS. It features big RAID arrays and big blower fans, none of which I really need in this day and age and all of which consume power. I've been thinking since I got my Ryzen quad core mining rig: What's to stop me from mining and doing my NAS stuff on the same rig, thus saving power? As it so happens, not much. My miner has the same memory size as the old Lenovo DDR2 solution and a far more energy efficient, likely faster CPU. So I can fold that 400 W server into my 550 W of mining, far reducing my footprint in a green sense. Let's get to it.

There are some caveats of course (aren't there always?) I don't have enough CALs to use Windows Server (my license is an old Academic one), so we'll be going Linux. In this case, Gentoo, since it's what I'm familiar with and I like its performance when you get it going.

Gentoo is a source-based distribution, so if you want to follow along, I suggest a strong understanding of Linux-based systems. Most of what you need can be found in the Gentoo Handbook at Gentoo.org. I will glance over a lot of the low-level stuff and just briefly describe my process for posterity.

I started off with a basic system AMD64 install with Ryzen optimizations to the make.conf, and then I proceeded to follow the respective guides for X11, the NVIDIA binary driver, and XFCE. For XFCE, I set it up with very little installed and minimalist to the core. I set up a browser (Firefox), a process manager for killing processes in the GUI (mate-system-manager), and a GUI package manager for Gentoo's portage package management system called "porthole" (clever, eh?). I also installed a binary remote desktop management system (RealVNC), for which I already have a license. Its advantage is that is supports native encrypted connections, but you can find other open source solutions if you dig around; they just require more setup. I also installed Samba for the NAS functions. Samba is the Linux equipvalent of Windows File Sharing and is compatible with the latter. Configuring Samba's smb.conf is beyond the scope of this article, but it's really not hard, especially if you are just doing a "family folder" style setup like me.

Once all that is done, I have a desktop that looks roughly like this:
The next thing to do, is get our miners and wallets functioning again. Storing your coins on the machine that mines them is not exactly the best security practice, but it does save energy vs firing up another machine, and the risk can be mitigated by periodic cash-out or transfer to cold storage (paper for me). Again, in this case I am choosing the energy saving option, and I am powering down a small highly firewalled system that in the past ran wallet software 24/7. Between all this, the miner at 550W is now running virtually for free if you count all the energy reductions, so why don't we CPU mine while we are at it? We will not just load our typical mining setup of EWBF's CUDA-based Zcash miner, but also xmr-stak, a highly capable Monero miner for the CPU. It will use half our CPU, or 2 cores, leaving enough power for the wallets and NAS to function. In an earlier column I talked about Monero not being worth it, but I feel it might be worth giving it another try, to see what comes out of it.

First, let's start with the wallets. We grab our wallet files and install the official Zcash client from source using the guide at the Zcash site. It's a simple CLI client, so I also load a Java-based SwingUI GUI from GitHub to pipe the commands and make management easier (note, the client is marked deprecated, but works fine). All this is compiled relatively easily in Gentoo, which is pretty much a complete development environment having gotten this far. The only thing I needed to emerge (install) to complete this is oracle-jdk-bin, which is the package for the Java 8 SDK needed to compile the SwingUI based GUI.

The GUI, when finished, imports the wallet fine and looks like this (probably time for a weekly cash-out, speaking of which!):
Next, I install Electron Cash, a Bitcoin Cash light client wallet (I seldom hold Zcash, and this is where most of my coin is now for lower fees and higher liquidity at cash-out). It installs relatively easily as well, as it's based on Python and its dependency list is easily installable via porthole, the GUI package manager we already met earlier.

Note that there is an ebuild (Gentoo Package) for Electron Cash. Don't use it. It's woefully out of date and has dangerous security loopholes. Why it isn't blocked on the Gentoo repository is beyond me.

Now, with those set up, we can download the binary EWBF's CUDA miner, which installs easily because it is binary, and then xmr-stak, whose build guide is easy to follow and also installs easily and with few dependencies besides openssl and obvious things. We have them installed now and point them to our pools. They are waiting to fire up, but I have one more thing I want: Wine, which is a Windows emulator for Linux.

Why do I want Wine? Because I have a funky old UPS that carries my miner through short circuits that plague our location. It doesn't run long, but it allows it to shut down properly, and it stops short circuits from resetting everything. It's an Opti-UPS GS1100B, which is a known Windows-only non-HID compliant piece of crap that requires some Windows software to function. The Windows software communicates over a virtual COM port on USB, which surprisingly, the latest Wine supports. We emerge (install) it, and check .wine/dosdevices to make sure the mappings are right. We find our USB UPS COM port present on COM5 as a symbolic link to /dev/ttyUSB0
Feeding that to the software gets us some figures:
It passes a self-test, as evidenced in this screenshot; communication is thus working (note the load meter does not work during a self-test. It is normally at about 80%):

Now, finally, it's time to kick things online. I write some startup scripts, assign them to startup via settings-manager - Session and Startup in Xfce, and reboot. I am greeted by the following:
We're mining happily, and the file server works fine. I'm even hosting a DLNA server on the side. I guess what I want you to take away from this as a miner is, your miner can do more than mining cryptocurrency. Consolidate. Just because we're miners doesn't mean we can't "think green." That's silly. Turn some things off and reduce your power and carbon footprint to compensate for the big one you'll be making while mining. Then, the next time someone calls you "mining scum" and accuses you of polluting the planet more than the average geek, you can happily prove them wrong. And why not? At least for a small-time miner, it isn't hard to do, it's fun, and that's part of why we IT types do everything we do, is it not? This guide isn't the only way, but there certainly are ways to accomplish what I'm saying. Get to it!
Add your own comment

45 Comments on Confessions of a Crypto Miner: Green(er) Mining

#26
BiggieShady
R-T-BJust because we're miners doesn't mean we can't "think green." That's silly.
I see why you put it in quotes ... I'm imagining artist trying to get a green shade by mixing 2 drops of green with gallons of brown ... so it is silly, but for a different reason
Posted on Reply
#27
R-T-B
BiggieShadyI see why you put it in quotes ... I'm imagining artist trying to get a green shade by mixing 2 drops of green with gallons of brown ... so it is silly, but for a different reason
I don't really see a small time miner as being "gallons of brown" though. I mean I draw 600Ws on my miner. That is a very small percentage of my home electric bill, honestly. Heating costs way more.
Posted on Reply
#28
BiggieShady
R-T-BHeating costs way more.
Your cost is your own benefit or burden, whatever, but the footprint is the same because it is all heating, all of 600W is turned into heat ... if we are still talking about being "green" ... maybe the green thing to do is to partly base your house heating system on mining machines
R-T-BI draw 600Ws on my miner.
In your category (lightweight category, the one with most members) for every miner that's 0.5 to 2 kW range extra power requirement from the grid ... let's be realistic, most likely it all comes from ramped up burnig of coal/oil in thermoelectric power plants. It's just the way things are.
Posted on Reply
#29
moproblems99
So everyone cries because mining is wasteful. Everybody cries when someone tries to make it less wasteful. So does that mean no one should try and make anything that is wasteful less wasteful?

Edit: Removed accidental quote
Posted on Reply
#30
hat
Enthusiast
No, it means some gamers are butthurt* over hardware prices as of late, so they hate all miners and everything they do.

*Butthurt found in varying degrees, this statement doesn't apply to every non miner who can't get a video card at a decent price.
Posted on Reply
#31
BiggieShady
moproblems99So everyone cries because mining is wasteful. Everybody cries when someone tries to make it less wasteful.
I guess you just like to imagine different crying voices while reading other people comments :laugh:
Posted on Reply
#32
infrared
I figured if I had 10 watercooled 1080Ti's mining away, I could have money coming in while heating my hot tub for free :D ... just need 10 grand worth of GPU's first :rolleyes: (imagining further - you could have a temp sensor and a script to start/pause mining based on temp, would be a cool setup!)

In all seriousness I'm looking forward to the cryptocurrency thing getting taken over by ASIC's so the GPU prices can get back to normal. Mining is an amusing thing to dabble in but I wouldn't actually invest money into hardware for it.
R-T-BNext, I install Electron Cash, a Bitcoin Cash light client wallet (I seldom hold Zcash, and this is where most of my coin is now for lower fees and higher liquidity at cash-out).
I need to try Electron Cash, so far I've been using Jaxx and the mining fees seem fairly high 0.00017 charge for a 0.00180 deposit
Posted on Reply
#33
Renald
R-T-BThis article obviously didn't strike the right chord. BESIDES just turning off my miner and quitting, which can't happen anymore than the world can be expected to stop crypto in general, do you have any suggestions on what the next piece should be? I'd love to hear them. I'm thinking about maybe a piece on how crypto functions and particularly, where it falls flat: The Proof of Work mining method we all have learned to hate, and maybe a brainstorm attempt on what could replace it.
I have one, and it already exists : use an ASIC miner (or standard GPU) inside your heaters when it's too cold. You'll heat your room and mine.
You can mine like that and not on greedy needs.

I named you coward because you flushed away the fact that miners are a hell of a problem just with : "Mining inherently consumes a lot of energy, but a lot of things we do as tech geeks are actually not all that efficient". You couldn't even separate mining (which is a greedy activity) from benchmarking your computer or computing for things like Folding@Home. Seriously ? Is that so hard ?

You stated "and reducing a miner's impact on the environment" => Where can I find it ?
This article is about being greener. Not being a greener miner, sorry for being very harsh on you on this subject, but you can't tell things like that.
You can be "greener" only by not using greedy cards, that's all (and that's still to temper because you have to "trash" your card and buy a new one, with an ecological footprint).

Edit: www.qarnot.com/crypto-heater_qc1/
Posted on Reply
#34
Xpect
I don't understand all this hate. From the beginning R-T-B was saying, this series of articles will run for a year and provide us with insight to the consumer mining world, of course biased on how HE sees it.

And in that regard I like this. R-T-B, as an IT enthusiast like most people on here are, has some interesting (albeit not necessarily useful) "gadgets" at home e.g. his NAS which is way too power hungry. In a german forum I also frequent there is a in comparison huge community of owners of HP Microservers. Also powerhungry and mostly only used as NAS devices.
Now R-T-B included his NAS into his mining rig. He shut down a device, that sucked 400W out the wall. He got rid of his "gadget NAS" that (and I'm assuming stuff here) he built completely overpowered and with too high of a power footprint with the intention of learning more about servers and maybe setting more stuff up on it, which never happened (again similar to this HP Microserver community I mentioned). So yes, hiw mining rig might consume 550W uselessly, but at the same time it replaced a 400W NAS and now has a "small" use (for R-T-B). Since I would now argue, that, since it was running reliably, R-T-B wouldn't have shut down the NAS in the course of this year anyways, he now used the opportunity and in comparison his mining rig is now "only" at 150W useless energy use compared to the status quo before R-T-B started his seeries of articles. At the same time, since his miner now runs on Linux, which in comparison to a Windows box is less propable to be attacked, he shut down another system that he heavily firewalled. BUT(!) this system was also only used for mining (in this case storing the wallet), so we can neglect the power saving here.
He then put a DLNA server on there and also gave us a nice tidbit about his UPS, which might be interesting to some people that for some reason use this UPS on a windows machine and want to switch to Linux.

I really hate mining, because it keeps me from gettingg a good and cheap GPU, even if used (I mostly buy used). Especially since my PC was stolen and I'm running on stuff that was donated to me by several friends. At least I can run my beloved Dota, barely.

But still, R-T-B himself stated, this series of articles is an experiment. So why hate on this?
Maybe it will give several more hardcore miners a good idea.
And now just imagine, if 100 miners have 400W servers/NAS running happily in their basement and transfer that into their mining rig now?
That'd be 40000W or 40kW saved in energy.
Every hour.
400kW in 10 hours.
Around 1MW a day.
It may be utopic, but as home-miners tend to be tech savy people the possibility of such servers existing in the hundreds is in my humble opinion relatively high.

Regards,
the German,
citizen of a country known for constantly seeing everything new and not inherent to our culture as negative and generally shit.
Posted on Reply
#35
R-T-B
RenaldYou couldn't even separate mining (which is a greedy activity) from benchmarking your computer or computing for things like Folding@Home. Seriously ? Is that so hard ?
Frankly, yes, because I don't see much of a difference.

ASICs aren't an answer either because they just use more chips and end up consuming the same power. Been there, done that.
BiggieShadylet's be realistic, most likely it all comes from ramped up burnig of coal/oil in thermoelectric power plants. It's just the way things are.
Not if your electric bill doesn't increase overall.
Posted on Reply
#36
aldo5
I am sad of twisted logic that is being spread by this person (R-T-B - I have tried to reason with this person, but sadly that is "one way street"). I mean we all have right to do whatever to mine or not mine to hate or to love it to keep it to your self or talk loud about it, but that also includes "to spread false logic and completely ignore any facts or constructive criticism". I wish some TPU admins had any time and capacity to proof at least simple logic of this editorial series.
Posted on Reply
#37
Vayra86
R-T-BThat really is the point, isn't it?

We all consume energy doing things we love. I make an article about how to compensate for that and somehow that's cowardly? I really can't see that. I try to understand all the replies but a lot of this just seems to be irrational hatred at the expense of logic.

Mining IS a flawed practice, but some of us enjoy it and do it as a hobby. A lot of things we as tech geeks do for a hobby consume undue amounts of power, but if every one of us tech guys tried to do a little of the above consolidation in any of our tech activities (mining, crunching, hosting, whatever) it could do some good. That's not cowardly, that's being productive. Cowardly is not giving a shit.

For the record, I am not pro mining and I have no plan to mine beyond years end (which was my original contractual term for the agreement with this article). This is more an experiment to see how an average miner can mine at full capacity and still reduce his impact (as well as maximize his profits... they are NOT mutually exclusive). I'm trying to solve a problem rather than whine endlessly at it. The way I see it, I'm doing a good thing. Something that actually can make a difference. You seem to miss that entirely.
You're right about all of this in my view AS LONG AS you're just reflecting on your own situation. But you 'sell' it in the article as something 'all miners should/could do' and you end the article with that specific one liner of justification. That's where it gets weird. Because the vast majority of mining does NOT happen because people love the tech so much, it happens because it was a nice way to make a quick buck, and for that vast majority, the hypocrisy of such a statement is immense. The true hobbyists started back with Bitcoin and a simple GPU or two. How many of those are really left?

The simple comparison to other activities we 'love to do' such as gaming does fly, but only in those specific cases where people 'mine a bit' because they love the technology. If you run a farm that is a steady source of income though, that becomes a very questionable statement. A gamer doesn't use twenty rigs to play games on simultaneously, he needs one. Just like you need only one to mine for 'fun'. And here's the kicker; if everyone mined 'for fun' like you, the whole basis of this article wouldn't even exist, because no one would even remotely care about the lost GPUs or the energy footprint of it.

Anyway, I see you're taking things on board, kudos for that.
Posted on Reply
#38
R-T-B
Vayra86You're right about all of this in my view AS LONG AS you're just reflecting on your own situation. But you 'sell' it in the article as something 'all miners should/could do' and you end the article with that specific one liner of justification. That's where it gets weird. Because the vast majority of mining does NOT happen because people love the tech so much
I think on this forum, the percentage that operate that way is much higher than you might expect. But I am open to be proven wrong.
Vayra86How many of those are really left?
Me and @cdawall. :laugh:
aldo5to spread false logic and completely ignore any facts or constructive criticism
I've taken a lot of constructive critisism here... not seeing the "one way steet." Did you seriously read the thread? My comments too? I even bolded part of it for people who may miss that kind of stuff.

I'm also not sure my logic is "false logic." It's sound logic, if you accept my premises. You may not of course, and that is your right to disagree I suppose.

I already have a good idea of the angle for my next article. Again, the goal of this series is to anaylze cryptos weaknesses and see what we can do about them. In that vein, my next article will cover Proof of Work... the demon inside every crypto coin and why it needs replacement very badly (and how hard that is to actually do).

Thank you all for the feedback.
Posted on Reply
#39
Vayra86
R-T-BI already have a good idea of the angle for my next article. Again, the goal of this series is to anaylze cryptos weaknesses and see what we can do about them. In that vein, my next article will cover Proof of Work... the demon inside every crypto coin and why it needs replacement very badly (and how hard that is to actually do).
That will be an interesting topic indeed.
Posted on Reply
#40
BiggieShady
R-T-BNot if your electric bill doesn't increase overall.
That would be counting in earnings from mining (otherwise how can you spend the same?) ... from an ecological standpoint, if we are still talking about that, those coins do nothing ... summertime with all electricity spent on AC and no savings in heating department, offsets that balance further
Posted on Reply
#41
Franzen4Real
R-T-Bdo you have any suggestions on what the next piece should be? I'd love to hear them. I'm thinking about maybe a piece on how crypto functions and particularly, where it falls flat: The Proof of Work mining method we all have learned to hate, and maybe a brainstorm attempt on what could replace it.
I have never had much interest in crypto currencies and therefore have never cared to seek out information in order to have a good understanding of it. I get the general gist of it as a payment system, the increasing difficulty, -- but on a very elementary level. I think the reason for this is that the cost to run the payment system (i.e. any and all resources involved, hardware, electricity, etc) seems to be extremely disproportionate to the end result (verification) so it just doesn't feel to me like this revolutionary tech break through due to this huge inefficiency. Perhaps some feel its de-centralized nature justifies this steep cost. And again, this all could simply be because I am uninformed.

What I would have more interest in reading about is real world uses of mining that result in MUCH more work produced. Not necessarily an article that shows block chain could be used for ________, or has the potential to someday do _______ (fill in the blanks)... But instead something that talks about current real world use cases. For instance, last year I came across an article about the Render Token (I believe this one was pointed out a few weeks ago by another commenter) and thought that it was a very interesting idea. This one in particular could be a great fit in the mining discussion, as it centers around computer graphics, 3D modeling, VR, and other scenarios that directly relate to the enthusiasts here at TPU. (or at the very least, maybe it will come off as a slightly useful case for mining to those who dislike it the most?) Anyways, just an idea...

edit: I had to go back and search after posting this, it looks like @cdawall mentioned rendertoken and a few others in an article on 2/1. Ill check out those mentioned there as well.
Posted on Reply
#42
W1zzard
The goal of these articles is to provide opinionated pieces of content related to crypto and mining, that provide insight and get you thinking.

RTB comes to me every two weeks or so with ideas for the next article and I discuss+approve.

He does take suggestions from you, on what should be posted next, so feel free to share your thought with him, either in public or private, but please don't just hate.
Posted on Reply
#43
cdawall
where the hell are my stars
R-T-BMe and @cdawall. :laugh:
Many many more than that, we are probably just the most vocal.

If you ever need data to add into your editorial don't hesitate to shoot me a pm.
Posted on Reply
#44
hat
Enthusiast
Vayra86But you 'sell' it in the article as something 'all miners should/could do' and you end the article with that specific one liner of justification. That's where it gets weird.
It's not that hard to imagine somebody with one mining rig (even if it has like 6 cards or more) might also find another use for it besides mining. A file server of some sort is a good one. Maybe it could also be a router, or a web server, or a game server, or all of those things...
Vayra86Because the vast majority of mining does NOT happen because people love the tech so much, it happens because it was a nice way to make a quick buck, and for that vast majority, the hypocrisy of such a statement is immense.
Blame giant mining farms for that one. I've come right out and said since I started that I was doing it to help me financially, but I didn't quit my day job either. Now I'm in a position where hopefully I can just save up enough coin to maybe use it to upgrade my computer some day... something which would be really hard to pull off otherwise in the face of other issues life throws at me. If that day were today, something like an 8600k would be nice, so whatever the equivalent of that is when the time comes that I can do it...
Posted on Reply
#45
verycharbroiled
hatIt's not that hard to imagine somebody with one mining rig (even if it has like 6 cards or more) might also find another use for it besides mining. A file server of some sort is a good one. Maybe it could also be a router, or a web server, or a game server, or all of those things...
more or less like RTB did, i run an old i5 computer with freenas and the equivalent of raid 5 as a NAS, a dedicated 7 card mining rig, with wallets on my daily driver rig.. so, three computers for the three purposes.

a NAS and a mining rig are pretty much at opposite ends of the spectrum. a NAS or game/web server should be built for rock solid uptime and reliability. as such whatever is running on it should be solid too. mining software is pretty raw at times, and (for the closed source miners) sometimes even shady quality. no way i would run or store anything sensitive (like wallets and personal files) on a mining rig. also mining software and video drivers tends to get updated fairly often on mining rigs, possibly requiring reboots, something pretty rare on my NAS

now a mining rig can be built for power optimization (or not, of course) and to do that you need to undervolt and possibly under clock the cards. this is much easier on windows than *nix at this time. although you can vbios mod and get around that, that can be risky, and not all miners like to mess with the vbios as it generally voids the warranty. different algos may want different voltages/clocks for the most efficient power or hash goals. finding these values often involve trying a setting and seeing if it crashes/BSODs/corrupts something. so easier to just use msi afterburner or something on windows. and these are definitely things not to do on a NAS or other type of server.

so guess it all depends on what your comfort level, hardware, software and algos are.

anyway, interesting build RTB.

EDITS: man i suck at spelling and grammar
Posted on Reply
Add your own comment
Nov 24th, 2024 07:01 EST change timezone

New Forum Posts

Popular Reviews

Controversial News Posts