How Hardware Acceleration Improves Your Gaming PC Performance

The hardware to support a CPU has always been there, even before the appearance of the first home computers and since the time when a computer was a complex piece where a simple CPU was not a single chip, but a TTL chipset on a board. Since then the architects of the new systems saw that a CPU was not efficient for all the tasks that were entrusted to it.

The loudspeaker example

The first personal computers to hit the market were not PCs, but systems such as the Commodore PET and the Apple II, which were extremely rudimentary, since they were nothing more than the hardware for the terminal of a minicomputer but connected to a CPU of 8 bits, in both cases a MOS 6502. Was the first IBM PC better? In many respects yes, but not in terms of sound reproduction, since it also made use of a rudimentary speaker.

In these first computers there was no complex audio hardware, only a speaker connected to a 1-bit interface controlled by the CPU from which error messages were given. This meant that if someone wanted to make a melody in one of these processors they needed to occupy all the time of the CPU to show the audio, since while it was controlling the speaker it was not executing the main program. This led to the release of support chips for the sound, which freed the CPU from having to control the speaker and were capable of reproducing much more complex and less strident melodies.

The example of the speaker helps us to explain why a CPU needs support hardware, no matter how powerful it may be and no matter how banal the task to be performed, in this case sending beeps to a simple rudimentary speaker.

What do we mean by support hardware?

A support hardware is all that hardware that replaces the CPU when performing a function of the same. It must be taken into account that in this we completely discard the data communication interfaces with the memory and the peripherals, which are essential in the basic models of a CPU regardless of its base model, be it Harvard or Von Neumann.

Supporting hardware therefore has to meet these two requirements:

  • It has to free the CPU of a task that it would otherwise have to execute.
  • When executing the task, it must be more efficient than the one it replaces in time, consumption and cost.
  • If it is more efficient in terms of time, it is said that we are facing a case of hardware acceleration.

Therefore, the cost of the support hardware when it comes to implementing it on the hardware should never be greater than the cost of running it on the CPU. It does not make sense to implement hardware to do something that one or more CPU cores can do if its cost in transistors is higher, nor is it if we are talking about higher consumption and even less if it does not perform its work at a lower speed.

Although not always the three points can be fulfilled at the same time, an example is the GPUs, which are support hardware, but they have exceeded in costs to the CPUs, since we have graphics processors from NVIDIA and AMD with sizes and quantities of transistors. much larger than the most powerful CPUs. GPUs are the perfect example of supporting hardware intended for hardware acceleration.

What is hardware acceleration?

We understand as hardware acceleration when a piece of it is foreign, usually the CPU manages to perform a specific job in a portion of the time that the CPU would. This means that it has been done in less time and therefore the execution of that part of the code has been accelerated, hence the name of hardware acceleration.

In the world of PC Gaming, an example of this was the first 3D accelerators that appeared on the market. These graphics cards were only used to display 3D graphics and required a VGA, but they achieved much higher frame rates than using the CPU alone to render the graphics of the games, so they carried out the task of drawing the frames of the game faster.

Acceleration does not occur only in the case of CPUs, it also occurs in the case of GPUs where we have recently seen two very important changes in them. The first change is the addition of support hardware to speed up the calculation of the intersection of rays in ray tracing. The second change is the addition of Tensor units specialized in inter-matrix computation to speed up AI-based algorithms, which abuse this type of computation.

Support hardware should not be confused with hardware acceleration, since although there is support hardware that can speed up the execution of certain functions, other hardware only frees the CPU from a specific task at a lower cost. In the case of acceleration, cost savings are not the main factor but rather the speed at which the task is executed.

Amdahl’s law and hardware acceleration

All code in a program can be divided into two parts:

  • A serial part, which cannot be parallelized and depends on the power of the kernel that is executing it.
  • A part that works with several data in parallel, which can be assigned to several processors or even to supporting hardware

Originally many algorithms worked only on CPUs, but it got to the point where they realized that it was much better to use the capabilities of GPUs to crunch numbers in parallel. At that time the programs stopped being created to run on the CPU to run on the GPU in order to speed up the part of the code in parallel.

Although the programs that we use on our PCs do not seem to use hardware acceleration and that it is something that is limited to video games, this is not the case. For example, when applying a visual effect in an image editing program, it ends up using the GPU hardware to perform this task more quickly. From what we can say that the program is undergoing hardware acceleration.

The complexity of the supporting hardware

As the CPUs have been improving, so has the support hardware, which has not remained static in its design and functionality over time. In some cases when a piece cannot be improved beyond what has been improved up to that moment. That hardware ends up being integrated into other pieces of hardware.

As heavier applications increase processing requirements, not only a more powerful CPU is required, but also higher capacity supporting hardware. The fact of not developing better and better support hardware is counterproductive for the manufacturers of the same, since it would reach a point where the CPU would be faster than the support hardware when executing certain tasks and this would end up being completely useless.

An example of hardware that became outdated were the blitters of certain 16-bit computers, such hardware was used in graphics and its task was to be able to move blocks of data and manipulate them on the fly very fast. When CPUs outpaced this task then they disappeared from computers and stopped being integrated into the hardware.

The emulation problem

When a PC emulates a system it does not have much of the original hardware at hand, so it needs to emulate not only its CPU, but also all its supporting hardware. That is why if we compare a PC with respect to the system it is emulating we will find that there is a huge lag in power and this is not only why it has to interpret the original hardware code, but also the CPU to do the hardware tasks of support for.

The emulation of old systems is the perfect example of what happens when we want to run a program and we do not have the necessary support hardware to do it. We end up needing a massive amount of CPU power compared to the original hardware and we end up with a more inefficient system.

The thing is complicated if we are emulating not only the supporting hardware, but also the elements that accelerated the execution of the code beyond the main CPU. They are the most difficult pieces to emulate and in certain cases hardware acceleration is often used. For example, a good part of the most recent console emulators render their graphics using the system’s GPU for this. Which is a case of hardware acceleration.

Supporting hardware and software compatibility

The software makes use of the supporting hardware in various ways, either through modern DirectX-style APIs or in its day making use of memory-mapped I / O, which consisted of assigning certain memory addresses for communication with the devices. peripherals. But as we have said before, the hardware is not static and evolves and a new type of hardware may appear doing the same task, but breaking the compatibility backwards.

It is often said that the PC inherits a total of 40 years of backward compatibility thanks to the x86 ISA, but this statement is false. There are applications that depend on the use of hardware that no longer exists and it is necessary to emulate or reimplement it. Much of this hardware makes use of I / O interfaces that are no longer used in any PC today.

Hardware acceleration requires the use of APIs that continuously invoke the hardware, this makes those programs very dependent on that specific hardware or on the hardware compatible with said API.

Hardware acceleration for NVMe SSDs

We are going to see an example of hardware acceleration or support hardware today with SSD disks once they begin to use compressed data formats in order to expand their storage capacity. A CPU is not fast enough to decompress the enormous amount of data that is going to reach it fast enough.

In the case of video game consoles, AMD has added data compression and decompression systems capable of supporting the enormous bandwidths of its SSDs. If we talk about the PC, we already have that hardware integrated at the GPU level in the case of RDNA 2 and NVIDIA RTX 2000 and RTX 3000, but in CPUs we will also see the addition of support units. Since it does not make any sense to install an NVMe SSD in the PC, make use of data compression to save storage space and that this takes 2 cores of the central processor of the system.

Currently, SSDs have a lag with respect to conventional hard drives in terms of storage capacity, something that can be solved by using compressed formats, but whose decompression will require high power that must be covered with a greater number of cores CPU or hardware support.

 

by Abdullah Sam
I’m a teacher, researcher and writer. I write about study subjects to improve the learning of college and university students. I write top Quality study notes Mostly, Tech, Games, Education, And Solutions/Tips and Tricks. I am a person who helps students to acquire knowledge, competence or virtue.

Leave a Comment