August 12th 2010
upgraded Trap25 email filters today to ward off some nasty and tricky emails getting through.

August 6th 2010
#ff @danielnorton @melbournehost @gourmetbutcher @topleftdesign @danirosenfield bit of a mixture for #ff but may take your fancy.

August 6th 2010
@danielnorton no problem. All sorted. nice site by the way! http://www.daniel-norton.com/

August 6th 2010
@danielnorton you've renewed domain but not hosting. Perhaps got mixed up with the renewal reminders?

You are here: Home » 3DPixelBlog

Apache Global Output Compression

Something we’ve been playing with for a while… global gzip / deflate compression on apache servers. Naturally you can do this in php or via .htaccess but why not do it globally from the apache configuration?

Decided to give it a whirl on some of our own dedicated servers the other day.

Dowsides:

  • Increases CPU load
  • Increases CPU load
  • Increases CPU load

Obviously there is only one major downside. The server has to compress the page on request and this takes processor power to do.

Upsides:

  • Reduces bandwidth
  • Increases client perceived responsiveness due to reduced page side

edit the main httpd.conf /etc/httpd/conf/httpd.conf for us:

#Alans gzip optimisations
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE application/x-httpd-php
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xhtml+xml

Obviously you need to have the mod_deflate DSO added to apache (default configurations from RedHat / CentOS have this). It’s also advatageous to note what you want compressing – it’s not worth compressing zip files for example or binary files as you are simply wasting CPU power.

Not Gzipped

Not Gzipped

Success! We’ve since enabled this on our shared platforms as we are not currently CPU limited.

Leave a Reply

You must be logged in to post a comment.