Ethash folder and small SSDs

Hello fellow miners, minters & other altcoiners, a quick note to help with Ethereum mining today.

If you’ve been mining Ξthereum you might have noticed a folder a folder named Ethash in your User profile on Windows.  I found out about it when trying to migrate my HTPC to Windows 10 on a 60 gig SSD and discovered this ersatz 10 gig folder. It contains an up-to-date DAG that the miner needs for optimal performance but 8-10 gigs is quite a lot of space for such a small drive.

By the way, if you don’ t know what Ξthereum is but you did find the folder on your machine, good news!  Someone has been making money using your computer!  Bad news is, it isn’t you.  Maybe someone it’s someone you know, or it could be a virus, either way you should investigate; such a virus can end up costing you a lot in electricity and wear out your hardware.

The usual Ethereum miners don’t have a parameter to set the ethash path, but there two simple workarounds to lighten the load on your small SSD.

  1. Use no-precompute when starting your miner so there are no file saved.  The drawback is that you’ll have to recompute a new DAG every time you restart your miner or after a transition to a new DAG.
  2. Create a hardlink to a larger drive.  I don’t think there’s any noticeable performance hit with using a HDD for this. It could even be a spare old SD card or flash drive, but using those might conceivably add a second of delay to each block mined due to the slower interface.  On Windows, stop your miner, delete your ethash folder (there’s no risk involved) and create a hardlink by starting a command shell as administrator and type
mklink /J c:\user\username\appdata\local\ethash f:\ethminer\ethash

or appropriate folder paths.  Problem solved!

Ok it’s a pretty obvious trick but I hope it helps someone out there.

Kilohashes versus power – safely mining Scrypt for profit

Everybody knows miners have one of the most dangerous jobs in the world. But what about cryptomining? How safe is it?  If you spend hours trying to boost your miner as fast as it can go from a remote shell, it’s easy to forget the electrical juice you’re pulling from that wall plug. But it is the difference between profit and a really big loss!

You should focus on getting the highest hashes/Watts possible while keeping your investment, and your home, safe.  Keep in mind that I am not an electrician, this advice is mostly common sense. Call your electrician before doing anything in here!

Tip #1: Get a Kill-A-Watt or other usage meter.

I got one for about 30$ off Amazon. This will help you find exactly how much power your miners are using at different speeds. Is it worth it running your cards at 1.250 volts for that extra 40 kH/s?  The only way to tell is by measuring how much electricity you’re using at the wall. You WILL be surprised. You might decide to tune down power a little and save on cooling too.

Tip #2: Do not use extension cords!

A quad card miner tuned for maximum output can easily chew through 10 Amps/1200 watts. It’s easy to just run your miner 24/7 without ever tripping the fuse. But that fuse is just there to prevent peaks, not for continual use at that power! The cables in the wall can easily overheat, melt and burn down your house on extended use at such high power. A miner causes “continual load” on the circuit; you should not continually load any home circuit at more than 80% its capacity!  For a 15 Amp circuit, this is a maximum of 12 Amps, but remember this is the MAXIMUM, it doesn’t mean it’s absolutely safe.

Your cheap extension cord is probably NOT rated for a 12 Amps continuous load. It is probably not even the proper gauge to run that kind of power for 15 minutes. It will heat up, melt, burn, cause an electric fire, kill you, kill your family, kill your dog, kill the neighbor’s dog, etc. Avoid them as much as possible, if you do end up using one make sure it is properly rated for it!  Not kidding here, they really can get hot enough to cause a fire very quickly, think of them as giant, cheap fuses.

If you’re running a miner 24/7 on a 15 Amp circuit, play it safe, use powertune or undervolting to go as far below 12 Amps as possible. Even at 10 Amps the wall sockets might get warm and eventually fail. A fire isn’t worth an extra 50 cents a day…

Tip #3: Use a higher rated circuit. 20 Amps, 250 Volts, lions & bears & electricians, oh my!

If your house has been properly wired for 20 and 30 Amps circuits, then you can exert a higher continuous load without getting in the danger zone.  80% of 20 Amps is 16, 80% of 30 Amps is 24.   You should even be able to run 2 low-power miners on a 20 Amp circuit and 2 high-power ones on the 30 Amps. If you don’t have any free circuits, an electrician can install them for you.

When he comes over, tell him that modern computer power supplies can automatically switch to use 220-250 voltage (there is a good variance here, usually that range of voltage is all the same to an electrician). Check your PSU’s manual; and ask your electrician what cords to use. Not only will it be safer to use lines designed for a higher load, power supplies are slightly more efficient at the higher voltages (1-3%).  At 1 kW/h and 8 cents a kW, that’s 21$ a year. And less heat/Amps on your circuits!

Tip #4: Get the best PSUs money can buy.

Another small % efficiency savings is in using the best PSUs you can get. There’s two ways you can use this efficiency to maximize your profits.

A 1000W PSU rated at 80% efficiency (Bronze) actually sucks up 1200 Watts at full load at the plug. First, get ‘Gold’ rated PSUs. As we’ve seen above, a 3% improvement in efficiency can mean 20$ saved a year, and you’re keepign this hardware for more than a year, right?  So a 40$ difference in price is easy to accept. (And in fact, Gold rating 87% efficiency).

The other factor is that 80% efficiency is at full load – PSUs are most efficient at 50% load. If you go for dual PSUs for your quad card miner, with a 600W load on each PSU, you could use two 1200W Gold rated PSUs and get 90% efficiency on each. That’s 120 watts saved, 84$ a year. Obviously this is more of a tip for bargain hunters, but on the other hand that’s 120 Watts you’re taking off your continuous load, and it basically makes your CPU mining ‘free’, if you’ve maxed out your cards. Your CPU should not get used otherwise.

Tip #5: Undervolt your cards/use a green OS

A proper undervolting should keep your cards at peak efficiency while using between 40-50Watts less than normal. On a quad miner that’s a pretty significant 200W total, 120$ a year or so!

Unfortunately the only OS that has the tools to undervolt/overclock all cards properly is Windows. It might also access other power settings (such as eco modes, hibernation, fan controls, CPU underclocks and so on) better than Linux can. The downsides are that it doesn’t seem to support more than 4 cards at a time (I’m not sure 6-card miners are worth the headache) and you need to buy the OS and a hard disk to install it on – a SDD will use little power, but it’s an extra expense nonetheless. But since you save 120$ every year, not such a big deal.

On Linux, there’s really no reliable way to undervolt every card out there reliably. Your best bet is to get a card that can be undervolted outside the OS. The best solution I’ve found is to get Gigabyte WF3s and flash them with the F43 bios. The cards run flawlessly and use 50Watts less at the wall.

It’s odd that card manufacturers would not include something as ‘safe’ as undervolting but I’m sure Gigabyte is glad someone found that loophole, I bet they’re  selling boatloads of WF3s!

That’s all the tips I have for now. Please share your own tips or point out flaws in mine. Once again, I’m not an electrician, but I hope I helped you mine safely and rake in the coins!

Fat-free Litecoin mining guide

Coin mining is a fun hobby but there is a lot of useless, disorganized information about it on the wikis. It could take you a while to get started. Even after two weeks of mining I’m fixing up some of my beginner’s mistakes. So I made this guide; a simple, straightforward way to get you mining and avoid my mistakes. I’m not going into details; it’s a bootstrap to get you going asap so you can learn the rest on your own.

 

1. Can I make money?

If you don’t research on your own you will burn as much money into electricity as you earn in coins.  http://ltc.kattare.com/calc.php is a good income calculator (but the owner has been MIA for a week now 🙁 ). If you don’t know what numbers to plug in, use you computer’s power supply wattage and 330 kH/s (an average of the top 5 most efficient cards). That’s a reasonable scenario; your average game computer may make only 30$ a month after paying for electricity and that doesn’t cover wear. Still, interesting hobby if it’s not all expenses!

 

2. What to mine?

Litecoins (LTC). Unless you have dedicated mining hardware, LTCs are currently more profitable to mine.

 

3. What bare minimum do I need?

  • Always-on Internet. Doesn’t have to have a big data plan.
  • 10+ gb of Hard Disk space to keep the entire blockchain.  You don’t want something that big on your SDD so use your storage HD.
  • litecoin-qt from http://litecoin.org/  You could get an online wallet or download a light wallet that doesn’t need the whole blockchain, but this is the reference implementation, and you’ll need the blockchain if you want to solo mine or p2pool later.
  • A cool room and a well-cooled machine. Miners gets very hot and noisy, but can be any old computer as long as it has a PCIe x16 port and 2+ gigs of ram. It’s the GPU that does all the work in LTC mining.
  • An up to date executable of cgminer from https://bitcointalk.org/index.php?topic=28402.msg357369#msg357369  If you don’t want to compile cgminer yourself, you might have a hard time finding downloadable executables. Read the forum, someone is bound to have made them available – and tell you about trojans to avoid. Do run an antivirus on anything you download anyway.
  • Do NOT get guiminer or other GUIs right away. They’re fine, but you don’t need them and they get in the way. Don’t worry, cgminer has its own UI!

 

4. How to set it up?

Install litecoin-qt.   Before you run it, create a shortcut and add -datadir=F:\LiteCoin\litecoin-data (or wherever you want the huge blockchain to be stored) in its properties. Start litecoin-qt. It will sync for several hours, possibly a day. When it is finished syncing, it will create a new wallet for you. You should choose to encrypt it from the menu and restart right now, instead of waiting till you have a lot of money in there.

If you’ve installed cgminer for your OS (on Windows, just expand the archive to a folder), you’re done, you can start mining!  But wait…

 

5. Picking your battles

At this point you’ve wasted an entire day waiting for that sync. Do not WASTE time SOLO mining! With dual 7850’s the expected time to find a block is 35 days, a long time without news! And it is a lot like the lottery, more power is like getting more tickets. It could be two months before you hit a block. A year. More. I don’t know about you, but I can’t imagine dedicating my gaming rig 24/7 to something that might never pay.

You MUST Join up with other machines, get more tickets, split the profits! Look for a pool at https://github.com/litecoin-project/litecoin/wiki/Comparison-of-mining-pools. You’ll think that a distributed, peer-2-peer pool sounds brilliant. You don’t even have to create an account! DO NOT, at this point, JOIN a P2POOL.  Although it a neat system, and you’ll get some LTC almost right away, it will be split into a great quantity of tiny amounts.  This is ‘gold dust’, it adds up to a nice sum, but so fragmented that you will have to pay a large fee to use it! For example right now if I want to get 8 LTC out of my p2pool wallet I have to pay a 3 LTC fee! A litecoin patch to reduce these fees might come out this month. Also if you have larger chunks of LTC in your wallet the fees should be proportionally smaller. But since you just started, you don’t have either of those things, so avoid P2Pool for now. Sorry!

What you need is a pool that sends LTC in larger chunks. That means they will keep your LTC in their online wallet for days, so you have to shop around and find a pool you trust. The older pools are likely to be more stable/trusted, but age is no guarantee that they will still be around tomorrow. They are also larger so you end up being a tiny fish in a big pond; more frequent but smaller rewards. This is pretty much a guessing game, everything is still so new that a 1-week-old pool might be just as rewarding as a much larger one. This is the part that truly make it into a hobby, you can try a few pools or all of them, but you get to know the people involved. Note that you really must mine with a pool for at least a day before you get any real rewards.

Most pools have similar tools. Let’s create an account on made-up randompool.cad using a spam-protected email address, a password, and a NIP (secondary password) you write down somewhere big and obvious. Once your email is verified, you want to do two things: create workers and set your payment address for autopay. Give your worker a sensible name and password (such as Username.Meltinggpu and smelting, try to follow the format suggested by the site so people can see how well you’re doing in the pretty graphs…) The graphs expose your username so there’s a security risk there, but you don’t want to use a random site as a bank anyway so you’ll transfer your coins to your home wallet whenever possible. Find to the autopay section and put at least 1 LTC (2 might be a week’s work with your starting setup). For the payment address, go to your litecoin-qt, click on ‘receive’ and you’ll see a list of addresses. Click  on ‘Add an address’, put randompool as a label if you want, you will get a new jumble to the right. This is a public address to your wallet – you can post it anywhere on the web; people can only use it to ‘send’ you money.  Copy-paste that to the pool’s site. You might have to enter the NIP you selected when you first registered, this is like a 2nd password to protect your money. (But that doesn’t actually protect your money from the pool admin, only people who cracked your username/password)

The site probably has a ‘getting started’ section where they give you a config or batch file, or settings to use to start your worker. But the typical command is this:

CD to your cgminer folder using a command line interface.

type

cgminer --scrypt -u Username.Meltinggpu -p smelting 
-o http://ltc.randompool.cad:9332 --auto-fan --temp-target 70

And if all went well, you’re mining LTC!

–scrypt means use the LTC algorithm, you can use cgminer to mine BTC, but that requires a different pool and installing bitcoin-qt instead. (you can have both wallets, but you can’t mine both with a single card at the same time).

-u, -p identify your worker with the pool in -o.

–auto-fan and –temp-target 70 try to make sure you don’t melt your 200$ card by adjusting your card’s fan speed automatically so it doesn’t go over 70 c. This obviously varies by card, but 70 c is a ‘safe’ value for any card. 80 is still pretty cool, but not the best if you want your card to last many years. Over 90 and you’re likely to get hardware errors and shorten you card’s life, although it might work without any problems. I prefer to give you safe settings over getting angry emails later. 🙂 Please realize that this WON’T reduce work to keep the card safe.

 

Cgminer displays info at the top of your CLI:

avg is how fast you are solving hashes on average. If this is close to zero you have a setup error or your GPU has melted.

A and R are how many hashes have been accepted and refused. A non-zero R is normal, but if it’s high compared to A then either your network is slow, your card is overheating or maybe you’re using the wrong coin algorithm (remember the –scrypt?).

HW is hardware errors. You want this to be zero. If it’s rising, your GPU is working too hard and melting. Typing Q will reset your card and quit so you can take the time to figure out what’s wrong.

Connected to… Shows you what pool you’re mining and as which user

GPU 0, 1, n below that show you the status of all your GPUs, their temperature, fan speed, hashing speed and details of the info at the top.

There’s a menu of commands you can type, P, G, S, D and Q at first. That’s where the actual nerdy stuff is so explore a little. 🙂 You can play a lot with cgminer’s settings, and that’s part of the fun. You CAN do damage here, I can blow the fuse in my office just by changing the settings on one video card. Stay within safe values till you see your first coins appear in your wallet. Now you’re rich, buy a better card! 🙂

 

6. Turning it into cold hard cash

LTC is worth $, but it isn’t $.  You have to trade it for something you want. There are a few stores that accept LTC, but currently there are no exchanges that trade LTC for CAD directly. You have to trade your LTC for BTC first, on an exchange like BTC-e or Vircurex. This is a quick and easy way to get hooked on day trading by the way, since you’re playing with ‘fake’ money. Be careful! You do have expenses – electricity and wear on your computer/GPU, air conditioning, etc. I try to set aside some gains for those expenses and gamble away the rest in trading.

Once you have some BTC, there are exchanges that will let you trade those for CAD and get an Interact or bank deposit for a small fee like LibertyBit and Virtex, but I have not tried them yet.

According to Canadian law, any trade is taxable based on the value of the trade. Frankly I don’t believe it’s even humanly possible to track the 0.52237641 BTC for 2.325236 LTC trades (taxed at … how much exactly in CAD?) in an exchange, but make sure you declare any goods you actually buy (such as Canadian Dollars) as a capital gain.

 

7. Where to go next/Fun ideas

Now that you’re hooked here’s a few ideas of fun things to do with this hobby.

  • Secure your wallet: Your coins actually reside on a file your computer. Lose that file and you lose all that money. So make sure you have a backup.  You might actually have fun with the portability aspect – maybe you can carry your coins in your pocket in an usb key, or on your smart phone?  Or have the money self-destruct when your kids don’t do their chore?  (Don’t actually do that – coins are unique, so if you destroy them, there are actually less coins in the system. A few lost isn’t bad, but if everybody does it…)
  • Optimize your workers: cgminer is a great piece of software, but by tweaking it you can get much more juice out of your system. You can overclock the RAM and the engine, and how much work you want your card to do. I found out that just by adjusting the intensity setting on one card, I could make a fuse blow in my office.  Nerdy fun!
  • Make a dedicated miner: Dual cards, mineral oil cooled machines anyone?  You can’t play games on a 24/7 miner (unless you have a dual card setup and tweak stuff so most games still run with decent graphics)
  • Use failovers: Any pool can fail, sometimes temporarily.  cgminer can be told to start mining on a different pool if your main one fails, or do some load balancing. Can you optimize your returns this way?  Note that pool-hopping is not as rewarding as a good day’s mining…
  • Start your own pool! Not extremely hard, but not for the faint-hearted either, having people join you instead of hunting for a stable pool sounds like fun!
  • Get your own business to accept BTC and LTC as payments!
  • Start your own company based on this technology!
  • Profit!

Enough for now … Hope you have fun with your new mining hobby!

Did you find this helpful? Saved you hours of googling?  Send a tip to LbYttXy4UqSDXUdP345jpUvq6MR997GX3L  (the L means it’s a LTC address) or 1PuPCtUt3pmMjbiLTgTKD6G9AkQS3FBUtD (See, no L at the beggining, so that’s for BTC!).