Why SSDs Lose Performance with Compressed Files

It is well known that SSDs often have quite a few performance problems when they have to work with compressed files , with their performance being drastically reduced. In this article we are going to tell you why this happens, and how compressed files work to cause so many performance problems to our SSDs.

As you know, depending on the file allocation size that we configure when formatting a storage unit (either SSD or not) it influences the way and the performance in which the device manages the files. In the same way, it happens that depending on how the compression has been performed, it will cost more or less for the SSD to manage these files.

With that said, let’s start at the beginning, because to understand what causes these performance issues to SSDs with compressed files , we must first understand how file compression works.

compressed files

How file compression works

File compression is known as ” Lossless Compression “, or lossless compression. Unlike the “Lossy Compression” or lossy compression used for example for video or music, reducing the size of the files does not mean losing quality. Literally lossy compression reduces the quality of the audio or video file by removing parts of it, and if we did that in a file it would stop working.

Therefore, file compression is always lossless , and its purpose is to group several files into one that occupies less size.

Compressed files

To explain how this compression is performed, which to some may seem like magic, we are going to give a very basic example. Imagine that the files are blocks of colors , and by compressing them what we are doing is putting the same color together in a single block as many times as possible. The ideal is to have only one block of each color, but many times it is not possible. With the image below you can easily understand it.

Obviously these “disappeared” blocks are annotated , so that when we want to unzip the file we will know exactly where they were and what they contained to “restore” them to their original form.

Another example for you to see better, also with color blocks, but with an ideal setting in which only one block of each color would remain. Here we have 10 blocks: 2 blue, 3 red and 5 yellow. When compressing them we would have only three blocks, one of each color and each with an index indicating what was originally there.