apache mod_deflate reduces bandwidth usage by 27% on SuperMotors.net
Posted in: apache, banner advertising, hosting, supermotors, technology, By: E. Long, At: December 2nd, 2006
In the ongoing battle of optimizing, tweaking, and testing, in November we enabled apache’s mod_deflate module on SuperMotors.net. Literally adding about 10 lines of code to httpd.conf (the apache config file), all text-based content on our pages now use gzip compression when delivered to web browsers that support gzip compression. By using this tool, you can see if your site currently utilizes gzip compression. When testing SuperMotors.net with this tool, our homepage size was originally 49K, but with gzip compression thanks to mod_deflate, it is reduced to 9K. This is an 81% savings in bandwidth usage.
So, when implemented over the course of the entire month, we saw an overall 27% reduction in bandwidth. Surprisingly, our absolute unique visitor count was down 14% for November (holidays do this to our site), but page views actually increased by 1%. Page views are ultimately the driver in bandwidth utilization. I interpret this to mean that fewer users were able to do more on our site because they were downloading content in less amount of time.
So, why does the test tool from above show an 81% reduction in bandwidth yet we only saw an overall reduction of 27%? This is because images (and other files) are not compressed when delivered to web clients. Since we primarily serve images and videos, the rest of our bandwidth still remains largely untouched by mod_deflate — which is by design.
This bandwidth reduction is very good news for us. As previously posted, we are leaving the world of colocation and moving to managed hosting — with a new billing model. The “total bandwidth used” billing model favors us even more now that we’ve reduced bandwidth usage by 27%. This translates into squeezing more data out of the pipe than previously anticipated. We’ll be able to maintain our fixed costs and increase revenue, thanks to this little module. The more data we push out, the more page views we serve, and the more revenue we make from our CPM-based advertising model with Tribal Fusion and our in-house ad inventory (read the challenges we face when we introduce Ajax functionality and how it’ll affect our CPM-based ad model).
The mod_deflate module does increase CPU usage due to the need to compress each page sent out. However, this had very little impact on us as we had plenty of processing power to spare. Your results may vary, so keep an eye on CPU usage when you implement this module. The slight increase in CPU usage was worth the risk, because the 27% reduction in bandwidth was a much bigger gain for us.
12/4/06 Edit: Ajaxian has an article on gzip compression with some user responses. Interesting insights (in the comments section) on the law of diminishing returns with gzip compression used on ajax-enabled pages.
