Apache2 httpd improving performance mod_deflate gzip

written by mikhailov on December 16th, 2008 @ 07:31 AM

How often do you think about improving performance of Apache2 httpd web-server?
“It’s too slow”, “we need more powerfull server”, etc.
Telling the truth, default settings of Apache2 aren’t good and it’s best to try optimizing those first, before thinking of more advanced solutions.

Mod_deflate in apache2 is pretty much the same as mod_gzip in apache1.3, and mod_deflate is included with the apache2 source package. Both modules allow compressing of the apache server on the fly

So, I know, professinals from Amazon EC2 AMI have optimized apache configuration file. Let me show that to site.vhost

<VirtualHost *:80>
...
# Deflate
     AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css application/x-javascript
     BrowserMatch ^Mozilla/4 gzip-only-text/html
     BrowserMatch ^Mozilla/4.0[678] no-gzip
     BrowserMatch bMSIE !no-gzip !gzip-only-text/html
     DeflateCompressionLevel 9
     SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
...
</VirtualHost>

It’s simillar to nginx settings gzip_comp_level.
So, I have Apache2 httpd with great perfomance improvement with DeflateCompressionLevel.

Comments are closed

Custom Search