What is the best type of file compression to optimize server response?

Asked

Viewed 419 times

2

Recently I have been researching ways to improve the server performance, decreasing its load and consequently increasing its speed. I found several types of compression and benchmarks comparing the different types of compressed files, but all tests done years ago, I would like to know, currently:

  • In a basic comparison, several references cite the gzip by default, would he be the best? Why?
  • Taking into account not only the final compressed file, but other parameters such as its compression/decompression time, memory used and compression ratio (initial/final size). Which one would have an advantage over the others?
  • What more resources/techniques could be applied(as) to improve a server’s response time beyond code minimizations, query enhancements SQL and application of a new form of compaction?
  • 1

    Compression where? To what file type?

  • Server compression for all types of files (I imagine, or the most important as images, js and css, it would be interesting to take into account the two scenarios), I merged in the concept of various sources recommend the use of gzip to compress the files to optimize the speed.

1 answer

2


It’s hard to say, every case is a case. Without measuring it has no way of knowing.

Keeping files compressed will usually not bring benefits, even more on SSD.

If the file is media it probably already has a compression of its own, it makes no sense to compress it, it will only make the situation worse. It tends to get bigger and will waste a lot of time.

In static files the compression may be large there may be gain, but very little. It may be worse. The decompression time can be longer than the reading time. If the file has less than 4KB it will certainly be much worse. Except in rare large files the cases that there will be gain.

What happens is that certain files must be delivered compressed by the HTTP server itself and the client will take care of unpacking, there is gain, but the biggest gain is in the transmission and not in the reading of the file. But we dropped in the previous item, the file format that will deliver is better compressed. If it is this can only use a compression that the customer expects and as far as I know he expects only the Gzip.

But you need to do everything according to the web standard determines, not just compress the file.

This has nothing to do with SEO directly, may have in the sense of taking less time to answer the indexer may give a slightly higher score.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.