Apache Compression: Performance Magic

Recently I have revisited the performance issue on my largest project – Diorama.Ru.  4000 users with 60.000 page views hitting the server every day. I am proud to have such a “playground” for performance optimization.

We’ve started with the MySQL tuning several months ago, then I have introduced the application level caching using Smarty template engine and finally pushed the last button – Apache gzip compression via mod_deflate.

First of all many thanks to Kalid Azad for his clear summary of the problem on the BetterExplained.

So what potential I’ve seen in my case? Below is the sample screenshot from HttpWatch trace, executed on Diorama.Ru before the compression was turned on:

Screenshot: before Apache compression

This is the trace from a simple forum page. Look on the numbers highlighted (response time and volume of data transferred).

And here where we come after the simple compression:

Http Trace: after Apache compression

The data was compressed and transferred two times faster. Note this is note the best improvement as the current page has a lot of heavy image content which cannot be compressed. On the pages with the pure text, like a forum index you can win even more performance.

I am really satisfied with the results and really “flying” over the forum pages. So do our visitors :)