Some Bitcoin users might wonder why there is a huge disparity between the mining output of a CPU versus a GPU.
3 min read
To find the answer, we must first look into how mining works. A computer guesses a string of characters and puts them through a hash function to try to reach an expected hash output. However, the computer has no way of knowing how to get to that output. Let’s say the output needed is “6”. The computer doesn’t know what calculations are used to generate the output; it could be 3+3, 5+1, 6+0, 3×2, and a nearly limitless number of other functions. Once the computer has found an input string that works, it can be easily verified by the other computers.
Go back to CPU and GPU!
A CPU is great for multitasking, such as saving documents, editing video, deciphering instructions, running the OS, and much more. However, because it needs to figure out what to do each time, it is a lot slower than a GPU. Think of a Swiss knife. The knife itself may not be very useful, but it has a lot of different tools attached.
What is CPU
The CPU, or central processing unit, is the part of the computer that performs the will of the software loaded on the computer. It’s the main executive for the entire machine. It is the master that tells all the parts of the computer what to do – in accordance with the program code of the software, and, hopefully, the will of the user. They are designed to perform very complex, and often changing in the mid stride, operations.
Most computers have multi-core CPUs nowadays (which is almost the same thing as having multiple CPUs in a single physical package), and some computers even have multiple CPUs.
The CPU is usually a removable component that plugs into the computer’s main circuit board, or motherboard and sits underneath a large, metallic heat sink which usually has a fan, and few are cooled by water.
What is GPU
The GPU, or graphics processing unit, is a part of computer for the video rendering system . The typical function of a GPU is to assist with the rendering of 3D graphics and visual effects so that the CPU doesn’t have to. Powerful GPUs are needed mostly for graphic intensive tasks such as gaming or video editing.
These days, miners are moving quickly to GPU because when GPU was discovered it was said that, it could offer more hash power compared to CPUs, it’s cost is lower and can save electricity.
Why mining with GPU
A CPU is designed primarily to be an executive and make decisions, as directed by the software. For example, if you type a document and save it, it is the CPUs job to turn your document into the appropriate file type and direct the hard disk to write it as a file.
CPUs can also do all kinds of math, as inside every CPU is one or more “Arithmetic/Logic Units” (ALUs). CPUs are also highly capable of following instructions of the “if this, do that, otherwise do something else”. A large bulk of the structures inside a CPU are concerned with making sure that the CPU is ready to deal with having to switch to a different task on a moment’s notice when needed.
A GPU is very different. Yes, a GPU can do math, and can also do “this” and “that” based on specific conditions. However, GPUs have been designed so they are very good at doing video processing, and less executive work. They are designed to do high number of simpler operations than CPU, and to do them quickly.
GPUs have large numbers of ALUs, more so than CPUs. While CPUs can have up to a handful, modern GPUs have between 1.500 and 2.800 ALU. As a result, they can do large amounts of bulky mathematical labor in a greater quantity than CPUs.
That, in a nutshell, is why GPUs can mine Bitcoins so much faster than CPUs. Bitcoin mining requires no decision making, it is repetitive mathematical work for a computer. While CPU can do these calculations one or few at the time, GPU can do more than thousand at the same time. The only decision making that must be made in Bitcoin mining is, “do I have a valid block” or “do I not”. That’s an excellent workload to run on a GPU.
GPU can mine much faster than CPU. In order to mine Bitcoin, you must have at least one GPU installed on your computer.
Also, GPU has the ability to mine different coins such as Ethereum, Bitcoin Gold, and many others beside Bitcoin.
Why to mine with GPU?
GPU is very good at complex computation, is easily sourced, are standardized hardware, have high resale value.and are easily upgradeable. A GPU is great at doing the same thing over and over again: producing graphics. Normally, this involves performing a mathematical equation with two or more numbers that gives an output that is rendered as a pixel. Sounds familiar? That’s because it is. This task is exactly like mining – putting a set of inputs through the same function. Because GPUs when mining have to do this one thing, they can do it very fast. And can do high volume of these operations, just like drawing high number of pixels on your screen.
The choice of CPU in a crypto mining setup doesn’t matter that much because it is only doing telling everything what to do, which isn’t that much of a work load.
The GPUs are the ones doing the heavy lifting. The choice of which GPUs to use is important because you want the best hashing performance. And you are limited as to how many GPUs you can connect in a rig as each GPU requires at least a single PCIe slot.
Thus it is important to choose the motherboard carefully as they can come equipped with between one and six PCIe slots. Luckily, those slots do not have to be of the x16/x8 kind, and x1 suffice well enough. Hashing performance is often rated at hashes per watt given that electricity is your largest cost after the initial investment in a mining rig.
Why to mine with CPU?
At the point when Bitcoin was begun, the only way to mine was utilizing Central Processing Unit (CPU) on PC and Bitcoin core wallet. Intel and AMD were the famous names in CPUs. When bitcoin was released you could dig only 100 coins a day using CPU. But it is impossible today to CPU mine bitcoin because of much higher difficulty which gave rise to ASIC (Application Specific integrated Circuit). Specially designed chips just for mining of a one or the other cryptocurrency.
CPU was designed to switch between different complex tasks. Hash required proof of work in not very complex mathematical calculation. And CPU has less arithmetic logical units. So, when it comes to performance in the large calculation CPU is relatively slow. CPU has the ability to mine different coins such as Zcash, Nexus, Hold coin, Reicoin.
Advantages of CPU mining: there is no specialized hardware required, a very good starting point to enter mining, invaluable educational experience.
And it is fun to mine with CPU.
The bitcoin network hash rate is really high, so in CPU mining there is no longer guarantee for profit. During the mining process, the miners use fast running hardware to try to solve blocks. And slow CPU hardware can only make a certain amount of hashes in a given time frame. You need very good and fastest hardware for faster hashes.
The bottom line
Both CPUs and GPUs are creations made from billions of microscopic transistors crammed on a small piece of silicon.
Trying different hashes repeatedly is a very repetitive task suitable for a GPU. Each attempt varying only by the changing of one number (called a “nonce”) in the data being hashed.
That is why GPUs can mine Bitcoins so much faster than CPUs. Bitcoin mining requires no complex decision making because it is repetitive mathematical work on the same set of numbers. The only decision making that must be made in Bitcoin mining is, “do I have a valid block” or “do I not”. That’s an excellent workload to run on a GPU which can do high number of these calculations at the same time.
Waste your time. Not your money.