Web-server – gzip compression good or bad

apache-2.2gziphttpmod-deflateweb-server

I have a server that currently does a lot of processing in my application and the target users are those who have a very good internet connection.

The output that is sent from the server is always text/html and we do not use any media (audio/video) only images (static site images like logo,etc).

We are experiencing severe performance issues and I wonder if turning off gzip/mod_deflate on the server so that the server would avoid compressing the output. Will this cause an improvement in performance?

Best Answer

In theory disabling compression should free up the CPU somewhat but it is impossible to say exactly how much. Your best bet would be to use a benchmarking application like ApacheBench or siege and test your server's capabilities with compression enabled and disabled. If your server is under heavy load and can't be easily benchmarked you can try just disabled compression and see if the CPU load changes noticeably (a monitoring application would help here).

Speaking from experience, though, if you're in a situation where you have to disable compression due to high loads you're going to have to look at other solutions as well (bigger server, more servers, different architecture, application optimization, etc...).