{"id":27,"date":"2009-08-31T18:33:59","date_gmt":"2009-08-31T16:33:59","guid":{"rendered":"http:\/\/vladimir-shapiro.com\/en\/blog\/2009\/08\/31\/apache-compression-magic-impact-on-performance\/"},"modified":"2016-08-18T11:29:41","modified_gmt":"2016-08-18T09:29:41","slug":"apache-compression-magic-impact-on-performance","status":"publish","type":"post","link":"https:\/\/vladimir-shapiro.com\/en\/blog\/2009\/08\/31\/apache-compression-magic-impact-on-performance\/","title":{"rendered":"Apache Compression: Performance Magic"},"content":{"rendered":"<p>Recently I have revisited the performance issue on my largest project &#8211; <a href=\"http:\/\/www.diorama.ru\/\">Diorama.Ru<\/a>.\u00c2\u00a0 4000 users with 60.000 page views hitting the server every day. I am proud to have such a &#8220;playground&#8221; for performance optimization.<\/p>\n<p>We&#8217;ve started with the <a href=\"http:\/\/vladimir-shapiro.com\/en\/blog\/2008\/10\/19\/mysql-parameters-performance-optimization\/\">MySQL tuning<\/a> several months ago, then I have introduced the application level caching using<a href=\"http:\/\/smarty.net\/manual\/en\/caching.php\"> Smarty<\/a> template engine and finally pushed the last button &#8211; Apache gzip compression via <a href=\"http:\/\/httpd.apache.org\/docs\/2.0\/mod\/mod_deflate.html\">mod_deflate<\/a>.<\/p>\n<p><!--more-->First of all many thanks to <a href=\"http:\/\/betterexplained.com\/about\/\">Kalid Azad<\/a> for his <a href=\"http:\/\/betterexplained.com\/articles\/how-to-optimize-your-site-with-gzip-compression\/\">clear summary<\/a> of the problem on the <a href=\"http:\/\/betterexplained.com\/\" title=\"BetterExplained - simple about complex projects\">BetterExplained<\/a>.<\/p>\n<p>So what potential I&#8217;ve seen in my case? Below is the sample screenshot from <a href=\"http:\/\/www.httpwatch.com\">HttpWatch<\/a> trace, executed on <a href=\"http:\/\/www.diorama.ru\/\">Diorama.Ru <\/a>before the compression was turned on:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/vladimir-shapiro.com\/en\/blog\/wp-content\/uploads\/_blog-before-opt.png\" alt=\"Screenshot: before Apache compression\" \/><\/p>\n<p>This is the trace from a simple forum page. Look on the numbers highlighted (response time and volume of data transferred).<\/p>\n<p>And here where we come after the simple compression:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/vladimir-shapiro.com\/en\/blog\/wp-content\/uploads\/_blog-after-opt.png\" alt=\"Http Trace: after Apache compression\" \/><\/p>\n<p>The  data was compressed and transferred <strong>two times faster<\/strong>. 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.<\/p>\n<p>I am really satisfied with the results and really &#8220;flying&#8221; over the <a href=\"http:\/\/www.diorama.ru\/forum\/\">forum pages<\/a>. So do our visitors :)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently I have revisited the performance issue on my largest project &#8211; Diorama.Ru.\u00c2\u00a0 4000 users with 60.000 page views hitting the server every day. I am proud to have such a &#8220;playground&#8221; for performance optimization. We&#8217;ve started with the MySQL tuning several months ago, then I have introduced the application level caching using Smarty template [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"tags":[],"_links":{"self":[{"href":"https:\/\/vladimir-shapiro.com\/en\/blog\/wp-json\/wp\/v2\/posts\/27"}],"collection":[{"href":"https:\/\/vladimir-shapiro.com\/en\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vladimir-shapiro.com\/en\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vladimir-shapiro.com\/en\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/vladimir-shapiro.com\/en\/blog\/wp-json\/wp\/v2\/comments?post=27"}],"version-history":[{"count":1,"href":"https:\/\/vladimir-shapiro.com\/en\/blog\/wp-json\/wp\/v2\/posts\/27\/revisions"}],"predecessor-version":[{"id":116,"href":"https:\/\/vladimir-shapiro.com\/en\/blog\/wp-json\/wp\/v2\/posts\/27\/revisions\/116"}],"wp:attachment":[{"href":"https:\/\/vladimir-shapiro.com\/en\/blog\/wp-json\/wp\/v2\/media?parent=27"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vladimir-shapiro.com\/en\/blog\/wp-json\/wp\/v2\/categories?post=27"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vladimir-shapiro.com\/en\/blog\/wp-json\/wp\/v2\/tags?post=27"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}