Scientific computing with a crypto mining rig

Second Chance

Article from Issue 278/2024
Author(s): , Author(s): , Author(s): , Author(s):

Lots of retired Bitcoin mining computers are showing up on the second-hand market for cheap. Could these once-impressive machines have a second life in scientific computing or machine learning?

Despite the steady increase in computing power from one generation to the next, computers are rarely fast enough for their users. Over the years, programmers and PC vendors have found ways to speed them up. If you know exactly how a computer will be used, you can design it to maximize performance and minimize cost.

Crypto rigs are created with only one task in mind: to perform the arcane mathematical computations associated with crypto mining. The crypto gold rush has led to a rapid evolution of the technology – a mining unit that was competitive a few years ago might already be obsolete. For instance, a few years ago, mining rigs made extensive use of Graphics Processing Units (GPUs); in more recent years, Field Programmable Gate Arrays (FPGAs) and then Application-Specific Integrated Circuits (ASICs) have replaced graphics cards. Crypto mining has also experienced a bit of a downturn recently due to environmental fears and instability of the larger economy.

As a result of these and other factors, mining rigs are increasingly ending up on the second-hand market, where you can buy them relatively cheaply even if you are not a professional user. Could one of these rigs serve another role?

Mining rigs make extensive use of GPUs, and GPUs are well suited to scientific computing and machine learning. Several GPUs in a single computer will boost the potential performance many times over for a computation-intensive activity, such as solving a large mathematical problem.

We decided to buy a used crypto mining rig and see how it compares to a higher-end computation-focused commercial system. This article summarizes our findings. First, however, we'll provide a little background on what you do (and don't) get when you invest in a used mining rig.

PCIe Versions

Most used mining rigs power regular graphics cards via Peripheral Component Interconnect Express (PCIe) [1]. If the board is large enough, the rigs can be plugged in right next to each other. There are also variants where the motherboard does not offer the slots directly but outsources them to a PCIe backplane. Depending on the version of the motherboard, up to 18 cards can be addressed. They then no longer fit into a case but are connected via extension cables (risers) – either actually as a 1:1 extension of the slot or via an x1 plug-in card that simply transmits the PCIe signal via an inexpensive USB 3 cable.

The PCIe bus, which has been around since 2003, can play host to a number of components, from the WLAN board to the graphics card. The speed of the PCIe bus has doubled with each new version of the standard; the current version is 4.0. If you take a look at a motherboard, it is clear that the slots have different widths, which means that different numbers of PCIe channels can connect to the card – from x1 (one channel) up to x16 with 16 times more throughput. (You can also install an x1 card in an x16 slot and vice versa.) The slots are compatible with each other up to PCIe 4.0; in other words, systems designed for different versions can communicate with each other via the standard of the lower version.

Power Supply

The power supply plays an important role in systems that need to run continuously. The requirements are very high due to the possibility that several graphics cards could experience peaks simultaneously (after all, the tasks run in parallel). In just a few months, you might discover that the electricity bill exceeds the initial cost of the rig.

Mining rigs often use second-hand server power supplies to reduce costs. A server power supply is powerful and very energy efficient: Most achieve the 80 Plus Platinum efficiency rating (more than 94 percent efficiency at 50 percent load) and are often unbeatably cheap to run. However, this kind of power supply only gives you 12V and is therefore not suitable for the ATX-based motherboards found on many common PCs [2] without changes. It is easy to understand why the small PicoPSU power converter board [3] has become popular, because it also supports other voltages. Replicas of the PicoPSU are also available from various Chinese manufacturers. These boards are very popular, especially for home theater PCs or similar devices.

PicoPSUs and their replicas come with some pitfalls that you need to watch out for. They mainly provide power on the 12V rail, which they simply loop through from the power supply. If the consumer requires other voltages, such as 3.3V or 5V (say, for SSDs), the power supply could fall short. A look at the datasheet reveals a current of 6 amps – not really much, considering that a PCIe card is allowed to draw 3 amps from the 3.3V rail according to the standard. Since the motherboard also needs some power itself, this is actually only enough for a single PCIe card.

GPUs don't cause problems because they convert the voltage from the 12V line themselves and cause virtually no load on the 3.3V rail. But other cards can quickly create a power squeeze. M.2 solid-state drives (SSDs), for example, are only connected to the 3.3V rail (M.2 only has 3.3V pins) and can consume up to 10W under load – at 3.3V, this is half of the permissible power consumption at 3 amps. This just goes to show how quickly you can provoke a load-dependent failure. SATA devices are also allowed to draw up to 4.5 amps per rail.

If you are buying new components, choose a motherboard and power supply that match each other. But our focus is on budget used hardware. The combination of inexpensive used server power supplies and a PicoPSU is often both cheap and fit for purpose.

If you are buying a used rig, keep in mind what the hardware was once designed for. Server hardware, for example, is not optimized for quiet operation. In my case, both the fans of the original mining rig and the fans of the replacement case were so loud that they were annoying even when I put them in a different room and kept the door to the room closed. If you think you can solve the noise problem by installing the graphics cards into a normal PC case, think again. In this case, the graphics cards are passively cooled and dependent on the airflow in the case.

CPU and Chipset

Mining hardware is usually radically cost-optimized. The optimization typically starts with the CPU. The CPU is not used for the actual mining, so mining rigs often use an inexpensive, power-saving processor like a Celeron and save their budget for other more critical components. The mining rig we used in our test had a small dual-core Intel CPU in a ball grid array (BGA) package, which means it was soldered and could only be replaced along with the motherboard. GPU mining rigs usually have no more than 4GB RAM. Better graphics cards offer the possibility to interconnect – NVIDIA calls this Scalable Link Interface (SLI) or NVLink; CrossFireX is the AMD equivalent. This interconnect feature allows multiple cards to act as a single large board, reducing communication on the PCIe bus.

Cost optimization is also reflected in the case (Figure 1): The test rig case is not much more than a galvanized steel box with a few cutouts for fans (Figure 2). Preparations for cable routing, for example, were not needed because everything was plugged into a backplane. If you are thinking about a potential hardware conversion, you should get used to the idea of using a drill, pliers, and a little creativity to work around the limitations of the case.

Figure 1: The spartan test computer: Cost-optimization was the top priority.
Figure 2: The case is little more than a galvanized steel box with some fan cutouts and everything plugged into a backplane.

The processors already provide the PCIe channels. The motherboard distributes these channels to the slots – either directly or via a PCI switch in professional systems. This design means that only a limited number of PCIe channels are available. A single card can access the full x16 bandwidth of the PCIe channels. However, if there is another card in the slot next to it, each card receives a maximum of x8, and this can drop to x1 as you add more cards.

Motherboard descriptions often prove to be anything from superficial to misleading when they refer to the physical width of the slot instead of the number of channels feeding the card. PCI switches are also available on the server boards, but the total number of available PCI channels is higher due to the use of two processors. Currently, AMD's PCIe 4.0 standard offers a technical advantage on both desktops and servers with twice the transfer speed per channel and a higher number of channels provided by the processor.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • PCIe SSDs

    A PCIe SSD can accelerate your system considerably, but you need to do your homework and choose the right product for your computer.

  • Fighting COVID-19 with BOINC

    Linux and the BOINC distributed computing platform help researchers fight the COVID-19 virus.

  • Xeon Phi

    The Xeon Phi accelerator card from Intel takes an unusual approach: Instead of GPUs, the Xeon Phi features a cluster of CPUs for easier programming.

  • Mining Monero

    The Monero cryptocurrency lets you get in the game without spending thousands on hardware. We'll show you how.

  • Mining Litecoin

    Although not as popular as headliners like Bitcoin and Ethereum, Litecoin is one of the oldest crytocurrencies, and it offers some useful features, such as dual-mining with Dogecoin.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More