Bitcoin mining with graphics card
Some Bitcoin users might wonder why there is a huge disparity between the mining output of a CPU versus a GPU.
First, just to clarify, 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.
Most computers have multi-core CPUs nowadays (which is almost the same thing as having multiple CPU's 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, a few are cooled by water.
The GPU, or graphics processing unit, is a part of the video rendering system of a computer. 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.
Servers usually have very limited or no GPU facilities as they are mostly managed over a text-based remote interface. Most mainstream computers have much slower but less power consuming and cheaper IGPs (Integrated Graphics Processor), which are GPUs as well but integrated directly into the chipset and soldered onto the motherboard, rather than separate, more powerful but power consuming AGP or PCIe cards with GPUs, but separate GPUs. Powerful GPUs are needed mostly for graphic intensive tasks such as gaming or video editing. For example, the translucent windows in Windows 7, or technologies like Mac OS X's Quartz, which powers the Aqua desktop and its beautiful, water-like graphical effects and animations such as bulging the Dock in a smooth animation when the mouse is moved to the lower edge of the screen or "sucking" windows into the Dock when they are minimized - these are powered by GPUs.
A GPU is like a CPU, but there are important internal differences that make them suited toward their special tasks. These are the differences that make Bitcoin mining far more favorable on a GPU.
Short Answer
A CPU core can execute 4 32-bit instructions per clock (using a 128-bit SSE instruction) or 8 via AVX (256-Bit), whereas a GPU like the Radeon HD 5970 can execute 3200 32-bit instructions per clock (using its 3200 ALUs or shaders). This is a difference of 800 (or 400 in case of AVX) times more instructions per clock. As of 2011, the fastest CPUs have up to 6, 8, or 12 cores and a somewhat higher frequency clock (2000-3000 MHz vs. 725 MHz for the Radeon HD 5970), but one HD5970 is still more than five times faster than four 12-core CPUs at 2.3GHz (which would also set you back about $4700 rather than $350 for the HD5970).
A CPU is an executive
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 CPU's job to turn your document into the appropriate file type and direct the hard disk to write it as a file. CPU's can also do all kinds of math, as inside every CPU is one or more "Arithmetic/Logic Units" (ALU's). CPU's 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.
CPU's also have to deal with quite a few other things which add complexity, including:
- enforcing privilege levels and the boundaries between user programs and the operating system
- creating the illusion of "virtual memory" to programs
- for the most popular processors, being backwards compatible with legacy code
A GPU is a laborer
A GPU is very different. Yes, a GPU can do math, and can also do "this" and "that" based on specific conditions. However, GPU's have been designed so they are very good at doing video processing, and less executive work.
Video processing is a lot of repetitive work, since it is constantly being told to do the same thing to large groups of pixels on the screen. In order to make this run efficiency, video processors are far heavier on the ability to do repetitive work, than the ability to rapidly switch tasks.