1

Here is my current server scenario.

I'm running on a Rackspace Cloud instance (16GB of RAM), using cPanel/WHM on a CentOS 5.5 install.

I'm currently running about 10 Magento sites, all varying in size (from medium size to small)

Over time I noticed the speed of the sites slowing down. I've done numerous tweaks to the database and other things to help increase Magento's performance.

I recently enabled gzip compression globally by adding the following the Post Include for the apache config.

<IfModule mod_deflate.c>

    # Insert filter on all content
    SetOutputFilter DEFLATE
    # Insert filter on selected content types only
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript

    # Netscape 4.x has some problems...
    BrowserMatch ^Mozilla/4 gzip-only-text/html

    # Netscape 4.06-4.08 have some more problems
    BrowserMatch ^Mozilla/4\.0[678] no-gzip

    # MSIE masquerades as Netscape, but it is fine
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

    # Don't compress images
    SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary

    # Make sure proxies don't deliver the wrong content
    Header append Vary User-Agent env=!dont-vary

</IfModule>

I instantly noticed a snappier load time for the sites, and was very pleased. However after a few minutes, I noticed that the response time increased..completely wiping out the performance boost and making the sites load 2-3 seconds more than before gzip.

My understanding is that gzip doesn't take too much additional CPU, but with the combination of 10 different websites, could that be the case?

Is there a way to have the content gzip once, than have apache look for that already gzipped file and use it, instead of compressing each file over and over again for each request?

Any insight on this would be greatly appreciated!

Axel
  • 111
  • 2

2 Answers2

1

Maybe you could take a look at mod_disk_cache

Christopher Perrin
  • 4,811
  • 19
  • 33
0

There is a way to gzip your content first, and with some rewrite foo, make this work (in theory) ... but ... if you are in interested in site performance, have a look at a reverse proxy cache, such as varnish. While I don't work with magento, varnish appears to integrate pretty nicely with it: http://www.magentocommerce.com/magento-connect/pagecache-powered-by-varnish.html

HTH.

KM.
  • 1,786
  • 2
  • 18
  • 31
  • 1
    Thanks for pointing out Varnish. Definitely looks like a good contender for what I'm trying to accomplish. I'll post back when I get it installed & configured. – Axel Jun 28 '12 at 13:54