Hardware and Project Selection Part 1 - CPU vs GPU
As I spent more time browsing the Gridcoin subreddit, it becomes increasingly apparent that a lot of users don't actually know what hardware their computer is comprised of. This trend extends to a lot of other crypto-currency mining operations, where people become increasingly reliant on copy-pasta exes that make the most of your hardware with very limited user input. In response to this, and in lieu of answering the same hardware questions repeatedly with minimum detail, today I would like to examine the two most important pieces of mining hardware: the CPU (Central Processing Unit) and the GPU (Graphics Processing Unit).
NVIDIA affectionately describes the two components like this:
The CPU ... has often been called the brains of the PC. But increasingly, that brain is being enhanced by another part of the PC - the GPU, which it its soul.
To give an example, imagine that we are trying to add together two integers using your PC. You input the numbers into the computer using the keyboard, and the keyboard controller logs the numbers in the form of binary. This binary sequence is relayed to the CPU via the registry, at which point the CPU will use its integrated Arithmetical Logical Unit (ALU) to carry out the addition operation. Finally, the CPU transfers the result back to whatever output device needs it.
As you would have probably realised, adding two integers is an overly simple example, but it gets the point across. In exactly the same manner, your CPU is able to carry out all forms of work, including mining hashes or BOINC tasks.
GPUs are optimised for taking collosal data sets and performing the exact same operation endlessly, running many threads simultaneously, and doing so very quickly. Such a problem is called 'embarrassingly parallel'. To understand why the GPU is so good at jobs such as this, we have to take a look at the architectural differences between the CPU and the GPU.
A CPU is composed of a few cores (the most powerful i9 processor is expected to boast 18) with a lot of cache memory that can handle a few parallel processes. On the other hand, GPUs can have many thousands of cores that allows them to handle huge numbers of parallel processes simultaneously. The ability of a GPU to run such a massive number of simultaneous threads means that for repetitive tasks such as mining, the GPU vastly outperforms even much newer CPUs.
You might be wondering at this stage why GPUs, which came into existence in their current form far later than CPUs, have outperformed their older brother. The reason is the gaming industry. The amount of money available from the gaming industry, combined with its endless demand for higher fidelity, has pushed GPU development into the fast lane. While this is great for most applications, there have been some unfortunate consequences as a result. Primarily, games do not require high precision logic, so single precision (FP32) GPUs have pushed double precision (FP64) GPUs out of the mainstream limelight and banished them to being research models. However, that is a discussion we can have another day.
The Take Home Message
If you remember nothing else from this article, remember that:
- The two key components in your PC that you can utilise for mining are the CPU and the GPU. Whether you are 'mining' by running BOINC or doing something more traditional, that still holds true.
- The CPU and GPU have to be put to work and optimised independently to get the most out of your machine
- GPUs are generally more power and cost efficient than CPUs for mining. There are exceptions.
Next time we touch base, we will be looking at how to select appropriate BOINC projects based on your CPU and GPU.
In the mean time, keep crunching!