Hi,

(as far as i can tell after a quick peek at the code and some debugging)

It looks like there is a bug w/ AxKit::run_axkit_engine() and/or
Apache::AxKit::Cache::_get_stats()

run_axkit_engine() wants to create a .gzip cachefile when AxGzipOutput is off.

When AxGzipOutput is off the .gzip file is never made and _get_stats() 
returns w/ !$self->{file_exists} effectivly disabling delivering cached copies.

With AxGzipOutput enabled both files are created and appropriate cached copies
are delivered as expected.

I haven't decided for myself a best fix except for just enabling AxGzipOutput.

So, I reran hello/bench.pl w/ AxGzipOutput On and sped axkit up quite a bit.

attached are some diffs and a couple of 1 sec bench.pl runs.  Would be
interesting to see how axkit compares now?

Thanks,

Ed

On Mon, Oct 14, 2002 at 12:26:06AM -0700, Josh Chamas wrote:
> Hey,
> 
> The Apache Hello World benchmarks are updated at
> 
>   http://chamas.com/bench/
> 
> The changes that affect performance numbers include:
> 
>   Set MaxRequestsPerChild to 1000 globally for more realistic run.
> 
>   Set MaxRequestsPerChild to 100 for applications that seem to leak
>   memory which include Embperl 2.0, HTML::Mason, and Template Toolkit.
>   This is a more typical setting in a mod_perl type application that
>   leaks memory, so should be fairly representative benchmark setting.
> 
> Note that the latter change seemed to have the most benefit for Embperl 2.0,
> with some benefit for Template Toolkit & less ( but some ) for HTML::Mason
> on the memory usage numbers.
> 
> Regards,
> 
> Josh
> ________________________________________________________________
> Josh Chamas, Founder                   phone:925-552-0128
> Chamas Enterprises Inc.                http://www.chamas.com
> NodeWorks Link Checking                http://www.nodeworks.com
> 
--- hello/bench.pl      Sun Oct 13 04:07:35 2002
+++ hello-gz/bench.pl   Tue Oct 15 00:15:48 2002
@@ -106,7 +106,7 @@
 
 # FIND AB
 my $httpd_dir = $HTTPD_DIR;
-$AB = "$httpd_dir/ab";
+$AB = '/usr/sbin/ab'; #"$httpd_dir/ab";
 unless(-x $AB) {
     print "ab benchmark utility not found at $AB, using 'ab' in PATH\n";
     $AB = 'ab';
--- hello/bench.pl      Sun Oct 13 04:07:35 2002
+++ hello-gz/bench-gz.pl        Tue Oct 15 00:16:32 2002
@@ -106,7 +106,7 @@
 
 # FIND AB
 my $httpd_dir = $HTTPD_DIR;
-$AB = "$httpd_dir/ab";
+$AB = '/usr/sbin/ab'; #"$httpd_dir/ab";
 unless(-x $AB) {
     print "ab benchmark utility not found at $AB, using 'ab' in PATH\n";
     $AB = 'ab';
@@ -583,6 +583,7 @@
            AxAddStyleMap application/x-xpathscript 
+Apache::AxKit::Language::XPathScript
           AxAddProcessor text/xsl hello.xsl
            AxCacheDir $TMP/axkit
+           AxGzipOutput On
 }],
 
  'AxKit XSLT Big' => ['hxsltbig.xml', qq{
@@ -593,6 +594,7 @@
            AxAddStyleMap application/x-xpathscript 
+Apache::AxKit::Language::XPathScript
           AxAddProcessor text/xsl hxsltbig.xsl
            AxCacheDir $TMP/axkit
+           AxGzipOutput On
 }],
 
  'AxKit XSP Hello' => ['hello.xsp', qq{
@@ -601,6 +603,7 @@
            AxAddStyleMap application/x-xsp +Apache::AxKit::Language::XSP
            AxAddProcessor application/x-xsp NULL
           AxCacheDir $TMP/axkit
+           AxGzipOutput On
      }],
 
  'AxKit XSP 2000' => ['h2000.xsp', qq{
@@ -609,6 +612,7 @@
            AxAddStyleMap application/x-xsp +Apache::AxKit::Language::XSP
            AxAddProcessor application/x-xsp NULL
           AxCacheDir $TMP/axkit
+           AxGzipOutput On
      }],
 
 # new Embperl 2.x series
[2002-10-15 00:16:53] Found apache web server at /usr/local/sbin/httpd_perl
[2002-10-15 00:16:53] ==== running 1 groups of benchmarks for 1 seconds
[2002-10-15 00:16:56] testing AxKit v1.6 XSP 2000 at 
http://localhost:5000/h2000.xsp?title=Hello%20World%202000&integer=2000
[2002-10-15 00:17:11] testing AxKit v1.6 XSP Hello at http://localhost:5000/hello.xsp
[2002-10-15 00:17:25] testing AxKit v1.6 XSLT Hello at http://localhost:5000/hxslt.xml
[2002-10-15 00:17:40] testing AxKit v1.6 XSLT Big at http://localhost:5000/hxsltbig.xml

Test Name                           Test File  Hits/sec   # of Hits  Time(sec)  
secs/Hit   Bytes/Hit  
---------                           ---------  ---------  ---------  ---------  
---------  ---------  
AxKit v1.6 XSP 2000                 h2000.xsp    14.8         20       1.35     
0.067600   28680      
AxKit v1.6 XSP Hello                hello.xsp   245.5        261       1.06     
0.004073   353        
AxKit v1.6 XSLT Hello               hxslt.xml   157.6        169       1.07     
0.006343   331        
AxKit v1.6 XSLT Big                 hxsltbig.x   37.3         38       1.02     
0.026816   21590      

Apache Server Header Tokens
---------------------------
Apache/1.3.26
AxKit/1.6
mod_perl/1.27

PERL Versions: 5.006001

[2002-10-15 00:18:04] Found apache web server at /usr/local/sbin/httpd_perl
[2002-10-15 00:18:04] ==== running 1 groups of benchmarks for 1 seconds
[2002-10-15 00:18:07] testing AxKit v1.6 XSP 2000 at 
http://localhost:5000/h2000.xsp?title=Hello%20World%202000&integer=2000
[2002-10-15 00:18:22] testing AxKit v1.6 XSP Hello at http://localhost:5000/hello.xsp
[2002-10-15 00:18:37] testing AxKit v1.6 XSLT Hello at http://localhost:5000/hxslt.xml
[2002-10-15 00:18:51] testing AxKit v1.6 XSLT Big at http://localhost:5000/hxsltbig.xml

Test Name                           Test File  Hits/sec   # of Hits  Time(sec)  
secs/Hit   Bytes/Hit  
---------                           ---------  ---------  ---------  ---------  
---------  ---------  
AxKit v1.6 XSP 2000                 h2000.xsp    14.5         20       1.38     
0.069150   28714      
AxKit v1.6 XSP Hello                hello.xsp   234.0        241       1.03     
0.004274   387        
AxKit v1.6 XSLT Hello               hxslt.xml   349.5        353       1.01     
0.002861   365        
AxKit v1.6 XSLT Big                 hxsltbig.x  280.7        290       1.03     
0.003562   21624      

Apache Server Header Tokens
---------------------------
Apache/1.3.26
AxKit/1.6
mod_perl/1.27

PERL Versions: 5.006001

Reply via email to