Skip to content

Adventures in mining cryptocurrency in Hong Kong

December 23, 2017

So I have my cryptocurrency mine up and running.  It’s currently with one AMD RX580 GPU card and the rough rule is that one graphics card produces 1 USD per day.  The mine isn’t going to make me rich, but my old computer broke and it’s running in the background, and this gives me an excuse to get into the world of astrophysics and high performance computing.

The other reason I did some mining was that there is a famous bitcoin celebrity that has come to HK to pitch mining contracts to people in HK, and since I know almost nothing about the practical aspects of mining I thought I should learn.  The other thing is that the HK media has made mining and crypto suddenly fashionable, so my wife has been asking me about setting up a mine.

The economics of crypto mining seems to be a lot like making sushi.  You can learn how to do is.  You can have fun doing it, but if you want to quit your job and open a sushi restaurant, it’s possible, but you need to think about it.

OK here are some random bits of information

Getting the parts…..

I ended up getting the parts from two computer shops.  If you go to the second floor of the Wan Chai computer center than in the back corner there is a computer store that has a crypto-mine operating (未來科技), and I got most of the computer parts from that store.  Some of the graphics cards I got from the Golden Computer Center (not the big one but the smaller center on the side).  The company I used was BNV Computer Center because they have the frame for a mine there.

Also I found that the stores with the best variety were at the Mong Kok computer center, but while they have the best selection the people running the stores didn’t know anything about the parts, whereas with both BNV.  Buying parts from a store that runs a cryptomine turns out to be a weird indicator since it means that you are dealing directly with the manager, since they put out the mine.

Searching for the (ASUS Mining Expert) motherboard on price.com.hk will get you the right stores.

So the only special high tech computer part that I used was the ASUS B250 Mining Expert that has 19 PCI-E ports, which is an interesting card because it has a ton of slots.  I was a bit worried when the Wai Chai computer maker quoted me a single price for all of the parts, but I felt a lot better when he quoted me a price for a terribly weak CPU which showed that he knew mining (i.e. he was trying to sell me a weak CPU, low memory, and a strong power supply which is exactly what you need).  I ended up paying HKD 7900 for a motherboard, i5-7500 CPU, 32 Gig of RAM, and a big 1000 watt Corsair power supply and another HKD 2500 (more or less) for an AMD RX580 graphics card.  This turns out to be high because I got a good CPU and much more RAM than I needed.

The funny thing was that the two special parts that I needed were low tech…..

The first is a frame.  It turns out that the Wanchai store sells a frame for 12-18 GPU’s, but they need to special order.  BNV sells a frame for 6 GPU’s for around HKD 600.  I looked at getting a glass case from Thermaltake, which is really nice but it’s overkill.

I ended up getting a DRAGAN trolley from IKEA (google on youtube for IKEA and mining).  Getting a case turns out to be quite interesting from an anthropological and human psychology point of view just like buying ladies hand bags (so I’ve heard).  On the one hand, you want to be cheap since a case or frame will determine profitability.  On the other hand, there is an issue of practicality (i.e. mounting the parts and air cooling).  And then there is the issue of showing off which turns out to be important since you are hitting the gaming world.  It also turns out that there is a fight brewing between gamers and miners so your case/frame tells you who you are.

So since I’m a DIY/astrophysics kind of guy, I went with IKEA.  It’s cheap, and it turns out to be functional.

By far the hardest part for me to get was the power button.  Since I don’t have a case, I need a button to turn on and off the computer.  It’s a very cheap part, but since it was difficult to find, and I finally found a computer repair shop that dug through their old parts and found a switch for 50 HKD.  It was really hard to find the part, because computer stores don’t sell them, and electronics stores don’t assemble the bits into something that I can use.

Also, now that I’ve taken apart the power button, I can see how to build the switch on my own.

So now hardware assembly…..

It took me about three days to put together the system and it’s your usual DIY game of why @#$#$@ doesn’t this work.  I never was able to get the HDMI output of the ASUS card to send signal to my television, and it turns out that some of the HDMI ports on my TV were broken, but after a few hours of trouble shooting and buying about HKD 500 in adapters I was able to figure out why I wasn’t getting signal.

What I think is happening is that my television is old and can’t handle the HDMI signal from the Intel integrated output of the motherboard, but the signal from the RX580 works fine.

The most annoying part of setting it up was that I got a very nasty and painful shock from a broken power adapter (i.e. the thing with multiple plugs).  The power adapter had a broken ground.  Normally this would matter, but because of my IKEA cart, the motherboard was insulated from the ground by plastic.  So I plugged the motherboard into the bad power adapter, and when I connected the cable from the motherboard to the television, I got a really painful and nasty electric shock because the grounding was different.  The shock was enough to be somewhat dangerous, and it took me about thirty minutes to figure out what was going on.  I tossed the power adapter.

The thing is that this only happened because of the framing I used in which I put the motherboard on plastic trays.  For most cases, the motherboard is electrically connected to the ground so a bad power adapter with a faulty ground would not cause problems.

I was looking into getting a water cooler, but that turns out to be unnecessary from a practical standpoint since fans have gotten a lot quieter than two years ago.  Also installing the Intel CPU was nice since the manufacturers have gotten rid of the pain points.

Now for the software…..

I’m am open source software person so of course I’m going to be running linux, and I’m a packager for Mageia linux.  I end up using AMD rather than Nvidia because more of AMD’s stuff is open source.  It turns out that I got the OpenCL drivers from the AMD package to install on Mageia linux with these instructions….

https://math.dartmouth.edu/~sarunas/amdgpu.html

There are some incompatbilities in the openGL software that means that I couldn’t use a hardware accelerated Cinnamon environment but a LXDE environment worked just fine.

For ethereum software I went to github, started with genoil’s cpp-ethereum, but found ethminer.  To set up the mining pool, I ended up using etherminer.org.  I wasted a day with ethpool.org which happens to have the wrong payment model for the type of small mining what I’m doing (and they have a big banner tell you to understand their payment money).

As an open source person I was happen to find out that the open source software doesn’t suffer from a performance penalty.  When I installed Claymore’s miner, I didn’t get much better hash rates, and the same when I installed the full AMDPRO drivers.  The ethminer software got me really good hash rates, and the key trick was to put in amdgpu.vm_fragment_size=9 in the kernel boot parameters.

But I’m running things on a stack that is more or less open source, so I can tweak most of the stuff.

I tried to find mining software for bitcoin gold, but I couldn’t find anything usable.  There is a lot of good mining stuff for Zcash, but the trouble is that I couldn’t find a decent mining pool for bitcoin gold.

Fashion and movies…..

So you don’t normally think about fashion and movies but I’ve been spending a lot of time with people in the movie and fashion industry, and in some ways the case and the frame that use in building a computer makes a fashion statement about who you are.  One thing that is happening is that you are starting to have a resource competition between the miners and the gamers, and by looking at someone’s case, you can see immediately what camp they belong to.

History….

Also since I’m basically a physicist, I like to find weird connections.  The world of crypto is really a frontier, and since I was educated in Texas, I get some of the culture of the old frontiers and the Old West.

Particularly the Range Wars, and in the English context (Enclosure)

https://en.wikipedia.org/wiki/Range_war

https://en.wikipedia.org/wiki/Enclosure

Also it turns out that Hong Kong has a huge connection with the American Old West.  All of those Chinese railroad workers left for California from Hong Kong and arrived at San Franscisco.  So the connection between the old Gold rush and the modern one is pretty apt. Hong Kong has always been a city of fear and greed.  Fear causes you to run from something.  Greed causes you to run to something.  The thing that you can’t do if you are driven by fear and greed is to stand still for very long.  You can be frozen as you are caught between two forces, but one of them will win (greed usually does) and you get pushed forward by that.

The other thing is that once you go into cyberspace you end up meeting some people from other places with the same sort of culture.  So I end up meeting with Australians from the Outback, Russians from Siberia, and Argentinians with gaucho culture.  And then you end up with weird mixes of ideas.  What happens when you mix cowboys and Buddhists and start talking about the “pure land” of the West.

The thing about the frontier is that it always moves.  The internet was once a frontier but it’s now locked up by google and facebook.  With the introduction of CME futures and Goldman-Sachs talking about doing a bitcoin trading desk, I’m seeing ranchers with barbed wire and mining companies with big machines.  They’ll come in and mess everything up, so I’ll cash in and then move out further West, so part of what I’m doing building this machine is to figure out where to run to once the suits come in divide up everything.

Conclusion…..

So after spending all of the time and effort, I have a mine that is making USD 1 per day mining ethereum and without too much trouble I can get it to making USD 10-20 per day by buying some extra graphics cards.  I can make decent sushi, but I’m not that keen on starting a sushi restaurant or investing in sushi restaurants.

From → Uncategorized

Leave a Comment

Leave a comment