----- "Graham Leggett" <minf...@sharp.fm> wrote:

 
> The very definition of "tuned" means "tailored for your local setup".

It's actually quite hard to get this thought accross. I think we should
put it in a reboot of the performance ``optimization'' documentation.
 
> The default httpd configuration works reasonably well out the box. It 
> 
> is only when your site has special needs that it should start changing
>  
> the setup, and the site should understand what their needs are and  
> whether it is appropriate to turn it on.
> 
> Zooming into mod_deflate, mod_deflate only makes sense if you have the
>  
> CPU to support it. If you don't have enough CPU support (think  
> virtualised hosts), mod_deflate will be a performance drag, not a  
> boost. Typically, you would want to front a mod_deflate with an HTTP 
> 
> cache, such as mod_cache (or equivalent). Here mod_cache only makes  
> sense if you have the disk space to support it, and there is no real 
> 
> one-size-fits-all cache setup.

We arrive at one of my pet-peeve topic: Sane defaults.
mod_cache's default values for CacheDirLevels and CacheDirLength will
tear your file-system apart. And that is pretty much what:
http://httpd.apache.org/docs/2.2/caching.html says...

> The next problem is that you only want to enable mod_deflate on  
> compressible content - that means "not images" for most people, but  
> might not be. Again, not every site has the same content, and  
> therefore not every site has the same setup for mod_delate.
> 
> This said, our default config is 15 years old, and attempts to disable
>  
> deflate for browsers that don't support it, like "Netscape 4". Unless 
> 
> there are modern browsers that have broken protocol support for  
> transfer encoding, these obsolete examples need to be removed.

An entirely different topic, but related to your proposal is that
mod_deflate suggests to use a mod_filter based setup, but there's no
example on how to configure that.
(See my attached patch. Then you might understand why ;)

> Regards,
> Graham
> --

Bye,
-- 
Igor Galić

Tel: +43 (0) 699 122 96 338
Fax: +43(0) 1 91 333 41
Mail: i.ga...@brainsware.org
URL: http://brainsware.org/
Index: mod/mod_deflate.xml
===================================================================
--- mod/mod_deflate.xml	(revision 949964)
+++ mod/mod_deflate.xml	(working copy)
@@ -44,32 +44,20 @@
       AddOutputFilterByType DEFLATE text/html text/plain text/xml
     </example>
 
-    <p>The following configuration, while resulting in more compressed content,
+    <p>The following configuration, while being the recommended setup using mod_filter,
+    results in more compressed content than the above but
     is also much more complicated.  Do not use this unless you fully understand
     all the configuration details.</p>
 
     <example><title>Compress everything except images</title>
       &lt;Location /&gt;<br />
       <indent>
-        # Insert filter<br />
-        SetOutputFilter DEFLATE<br />
-        <br />
-        # Netscape 4.x has some problems...<br />
-        BrowserMatch ^Mozilla/4         gzip-only-text/html<br />
-        <br />
-        # Netscape 4.06-4.08 have some more problems<br />
-        BrowserMatch ^Mozilla/4\.0[678] no-gzip<br />
-        <br />
-        # MSIE masquerades as Netscape, but it is fine<br />
-        BrowserMatch \bMSIE             !no-gzip !gzip-only-text/html<br />
-        # Don't compress images<br />
-        SetEnvIfNoCase Request_URI \<br />
-        <indent>
-          \.(?:gif|jpe?g|png)$ no-gzip dont-vary<br />
-        </indent>
-        <br />
-        # Make sure proxies don't deliver the wrong content<br />
-        Header append Vary User-Agent env=!dont-vary<br />
+	  # Declare filter, add mod_deflate for all text/* MIME Types<br />
+      FilterDeclare COMPRESS<br />
+      FilterProvider COMPRESS DEFLATE resp=Content-Type $text/<br />
+      FilterChain COMPRESS<br />
+      FilterProtocol COMPRESS change=yes;byteranges=no
+      Header append Vary User-Agent env=!dont-vary<br />
       </indent>
       &lt;/Location&gt;
     </example>

Reply via email to