You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Steve Finkelstein <sf...@stevefink.net> on 2008/03/14 21:34:14 UTC
[users@httpd] Logging mod_deflate compression ratios
Hi all,
I'm trying to log actual ratios of Compression that mod_deflate is
responsible for handling. I've followed the guidelines on Apache's
site and have the following directives setup:
DeflateFilterNote Input instream
DeflateFilterNote Output outstream
DeflateFilterNote Ratio ratio
SetOutputFilter DEFLATE
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
Header append Vary User-Agent env=!dont-vary
DeflateCompressionLevel 9
LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
CustomLog logs/deflate_log deflate
After restarting Apache, I unfortunately only see the following in deflate_log:
argon logs # cat deflate_log
"GET / HTTP/1.0" -/- (-%)
"GET / HTTP/1.0" -/- (-%)
"GET / HTTP/1.0" -/- (-%)
"GET / HTTP/1.0" -/- (-%)
"GET / HTTP/1.0" -/- (-%)
"GET / HTTP/1.0" -/- (-%)
etc.
Any idea on what I'm possibly doing wrong?
/sf
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
[users@httpd] Re: Logging mod_deflate compression ratios
Posted by Steve Finkelstein <sf...@stevefink.net>.
Well, since I use VirtualHosts, I guess the right thing to do would be
to stuff the CustomLog into a VirtualHost directive, silly me. :P
One last question. I'm trying to figure out how the ratio system
works for this log config. For instance:
"GET /javascript/ext/ext-all.js HTTP/1.1" 134241 (26) "Mozilla/5.0
(Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.12) Gecko/20080201
Firefox/2.0.0.12"
New filesize is 134241 after compression. If the original size is
507857, where is it deriving (26) from? What does the 'ratio' signify?
It's not percentage in savings, clearly.
/sf
On 3/14/08, Steve Finkelstein <sf...@stevefink.net> wrote:
> Hi all,
>
> I'm trying to log actual ratios of Compression that mod_deflate is
> responsible for handling. I've followed the guidelines on Apache's
> site and have the following directives setup:
>
> DeflateFilterNote Input instream
> DeflateFilterNote Output outstream
> DeflateFilterNote Ratio ratio
>
> SetOutputFilter DEFLATE
> SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
> Header append Vary User-Agent env=!dont-vary
> DeflateCompressionLevel 9
>
> LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
> CustomLog logs/deflate_log deflate
>
>
> After restarting Apache, I unfortunately only see the following in deflate_log:
>
> argon logs # cat deflate_log
> "GET / HTTP/1.0" -/- (-%)
> "GET / HTTP/1.0" -/- (-%)
> "GET / HTTP/1.0" -/- (-%)
> "GET / HTTP/1.0" -/- (-%)
> "GET / HTTP/1.0" -/- (-%)
> "GET / HTTP/1.0" -/- (-%)
>
>
> etc.
>
> Any idea on what I'm possibly doing wrong?
>
>
> /sf
>
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Logging mod_deflate compression ratios
Posted by Steve Finkelstein <sf...@stevefink.net>.
Hi Eric,
I'm using FF2 on a macbook pro, and after verifying with Live HTTP
Headers, the client is indeed advertising the required headers with
the following:
Accept-Encoding: gzip,deflate
I can even see with Firebug that the requested files are being reduced
in size by a great ordeal after a cleared cache. I'm confident
mod_deflate is working, I'd just love to see some statistics using
CustomLog and that's where the problem is.
/sf
On 3/14/08, Eric Covener <co...@gmail.com> wrote:
> On Fri, Mar 14, 2008 at 4:34 PM, Steve Finkelstein <sf...@stevefink.net> wrote:
> > Hi all,
> >
> > I'm trying to log actual ratios of Compression that mod_deflate is
> > responsible for handling. I've followed the guidelines on Apache's
> > site and have the following directives setup:
>
>
> Is your client advertising that it understands gzip/deflate via the
> Accept-Encoding header? You can log %{Accept-Encoding}i
>
> --
> Eric Covener
> covener@gmail.com
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Logging mod_deflate compression ratios
Posted by Eric Covener <co...@gmail.com>.
On Fri, Mar 14, 2008 at 4:34 PM, Steve Finkelstein <sf...@stevefink.net> wrote:
> Hi all,
>
> I'm trying to log actual ratios of Compression that mod_deflate is
> responsible for handling. I've followed the guidelines on Apache's
> site and have the following directives setup:
Is your client advertising that it understands gzip/deflate via the
Accept-Encoding header? You can log %{Accept-Encoding}i
--
Eric Covener
covener@gmail.com
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org