Hello,

It seems that if I use mod_deflate to compress zope's responses, I take a
major hit -- around 1.4 seconds without compression and around 16.4 seconds
with.  I can't figure out what I'm doing wrong here.

I have zope 2.7.7 running with the fast-cgi ZServer enabled.  Urls beginning with http://pkfinance.info/pkf-z1/ go to Zope.  Here's what I see:


a% /usr/bin/time curl -v -o /dev/null http://pkfinance.info/pkf-z1/news/index_html
* About to connect() to pkfinance.info port 80
*   Trying 207.210.209.230... connected
* Connected to pkfinance.info ( 207.210.209.230) port 80
> GET /pkf-z1/news/index_html HTTP/1.1
> User-Agent: curl/7.14.0 (i386-portbld-freebsd4.11) libcurl/7.14.0 OpenSSL/0.9.7d zlib/1.1.4
> Host: pkfinance.info
> Accept: */*
>
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0< HTTP/1.1 200 OK
< Date: Wed, 17 Aug 2005 06:57:57 GMT
< Server: Apache/2.0.54 (FreeBSD) DAV/2 PHP/4.3.11 mod_webkit2/0.5 mod_fastcgi/2.4.2
< X-Powered-By: Zope ( www.zope.org ), Python (www.python.org)
< Content-Length: 65751
< Vary: Accept-Encoding,User-Agent
< Content-Type: text/html; charset=ISO-8859-1
100 65751  100 65751    0     0  44744      0  0:00:01  0:00:01 --:--:--  196k* Connection #0 to host pkfinance.info left intact

* Closing connection #0
        1.48 real         0.00 user         0.00 sys
a%
a% /usr/bin/time curl --compressed -v -o /dev/null http://pkfinance.info/pkf-z1/news/index_html
* About to connect() to pkfinance.info port 80
*   Trying 207.210.209.230... connected
* Connected to pkfinance.info ( 207.210.209.230) port 80
> GET /pkf-z1/news/index_html HTTP/1.1
> User-Agent: curl/7.14.0 (i386-portbld-freebsd4.11) libcurl/7.14.0 OpenSSL/0.9.7d zlib/1.1.4
> Host: pkfinance.info
> Accept: */*
> Accept-Encoding: deflate, gzip
>
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0< HTTP/1.1 200 OK
< Date: Wed, 17 Aug 2005 07:00:10 GMT
< Server: Apache/2.0.54 (FreeBSD) DAV/2 PHP/4.3.11 mod_webkit2/0.5 mod_fastcgi/2.4.2
< X-Powered-By: Zope ( www.zope.org ), Python (www.python.org)
< Content-Length: 65751
< Vary: Accept-Encoding,User-Agent
< Content-Encoding: gzip
< Content-Type: text/html; charset=ISO-8859-1
13 65751   13  8719    0     0    530      0  0:02:04  0:00:16  0:01:48     0transfer closed with 57032 bytes remaining to read
13 65751   13  8719    0     0    530      0  0:02:04  0:00:16  0:01:48     0* Closing connection #0

curl: (18) transfer closed with 57032 bytes remaining to read
       16.46 real         0.01 user         0.01 sys
a%

The relevant bits of my httpd.conf:

<IfModule mod_fastcgi.c>
  FastCgiExternalServer /home/pkf/www/docs/pkfinance.info/pkf-z1 -socket /home/pkf/pkf-z1/var/fcgi-socket -pass-header Authorization
</IfModule>

<VirtualHost *>
    ServerName pkfinance.info
    ServerAlias www.pkfinance.info
    ServerAdmin [EMAIL PROTECTED]
    DocumentRoot /home/pkf/www/docs/pkfinance.info
    ErrorLog /home/pkf/www/logs/pkfinance.info/error.log
    CustomLog /home/pkf/www/logs/pkfinance.info/access.log combined
    # zope
    <IfModule mod_fastcgi.c>
      <Location /pkf-z1>
        SetHandler fastcgi-script
        SetOutputFilter DEFLATE
        BrowserMatch ^Mozilla/4 gzip-only-text/html
        BrowserMatch ^Mozilla/4\.0[678] no-gzip
        # BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
        BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
        SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
        Header append Vary User-Agent env=!dont-vary
      </Location>
      DeflateFilterNote Input instream
      DeflateFilterNote Output outstream
      DeflateFilterNote Ratio ratio

      LogFormat '%t "%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
      CustomLog /home/pkf/www/logs/pkfinance.info/deflate.log deflate
    </IfModule>
</VirtualHost>

In my deflate log I see stuff like

[16/Aug/2005:11:40:03 -0500] "GET /pkf-z1/news/index_html HTTP/1.1" 8852/64328 (13%)


Thanks,

Faried.
_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to