Compressors and Decompressors, How Do They Work on RAM and SSD?

Compressors and Decompressors, How Do They Work

One of the problems with solid drives or SSDs is the fact that they have worse storage capacity than conventional hard drives. One way to remedy this problem is by using a series of special units, compressors and decompressors.

Although it is a piece of hardware little known at the moment, we will soon see it cited in the specifications of several CPUs, both for PCs and for other devices. And we are not talking about a piece of science fiction, since systems that are already on sale such as video game consoles and new generation graphics cards already include this hardware unit.

Basic operation of compressors and decompressors

Compresores Descompresores

It is understood as data compression to take a block of information that occupies a certain amount of storage and encrypt it in such a way that a block with the same information that occupies less information is obtained. The encryption created by the compression unit has to be understood by an analogous unit located at the other end, which we call a decompressor

What a decompressor does is apply a decryption algorithm on a data stream that reaches it, obviously said data must be previously compressed by an analog compressor that encrypts the data in a format that the decompressor can understand. So both extremes work in pairs and in a direct correlation.

In general terms, there are two types of compression, the one that is lossy and the other that does not, but in terms of data processing the second is the most efficient, since we are not interested in losing this information to avoid errors when executing a program from RAM.

A CPU is not fast enough to decompress data at that speed

RTX IO SSD

Do a simple test, take a file decompression program on your PC and observe how the CPU has a good time to decompress a file of a few hundred megabytes or a few gigabytes. Now imagine having to decompress tens of gigabytes in real time and you can imagine the computing power that would be required.

This is the reason why in the case of the new GPUs, which are compatible with the DirectStorage standard, they have a special unit to decompress the data on the fly, since even giving access to the VRAM to the CPU this would not be what fast enough for data to get to the processor fast enough.

Compressors and Decompressors to increase the capacity of SSDs

At the moment, one of the advantages of conventional hard drives over SSDs is the cost of storage, since an SSD is much more expensive per gigabyte of storage than a HDD, using a compression / decompression unit then it is possible to increase from efficiently the storage capacity of an SSD without increasing the cost.

At the moment these units are not in the CPUs, but since they are an essential part of the GPUs due to the support for DirectStorage in DX 12 Ultimate, so it is only necessary to move this unit to the processors in future iterations. The problem for its use is that it will require complete compression of the data that previously exists on the disk, but in return it will gain an amount of extra memory for storage, which is always welcome.

The growing chasm between RAM and processor

CPU RAM

The reality is that RAM has not evolved at the same speed as processors, which has had the consequence that the latter have been designed around the limitations of RAM, trying as much as possible to develop new mechanisms within the processor to alleviate this disadvantage. At the moment there are no data CODECS fast enough to allow compression and decompression of these on the fly from a RAM memory, but over time and as their processing capacity increases, we will end up seeing them,

The idea that the data going to the processor can be compressed and decompressed on the fly also results in an increase in bandwidth, since technically we are transmitting a greater amount of data per second than if that data were sent uncompressed, it is it will reach the point where, in order for the RAM not to be left behind, these units will have to be added to both the memory itself and the processors.

A good way to do this is to use several compressors operating in parallel that decompress the data that arrives from the RAM itself, in which each accelerator deals with a different block of data.