here is a update of the patch, (the old one had a bug in it when you used a env 
variable in a virtual include)

My testing on linux and solaris shows an overall improvement in times and machine load
(I've included some output from AB from the linux test)

David Reid's testing shows that it is actually slower on FreeBSD 4, but I don't have 
access to FreeBSD to 
find out why

> > 
> > Ian,
> > 
> > Bad news.  I've added the patch, rebuilt and don't see any 
> > significant increase
> > in speed.  In fact I'm actually seeing a very small drop.  
> > The system is
> > FreeBSD 4 STABLE running on a PIII 700 using localhost.  2 
> > test files, one with
> > only an include (test 2) and another with the same include, 
> > printenv and echo
> > (test 1) commands.  The difference goes like...
> > 
> >                 before            after
> > test 1        480-490        455-475
> > test 2        590-600        560-580
> > 
> > Not sure why there should be a drop, but it could be 
> > something to do with the
> > extra table calls that your patch adds, or seems to.
> > 
> > set_lazy_vars has a call to apr_setn and we call it a few 
> > times now that we
> > didn't before...  table operations can be expensive so this 
> > could be part of
> > the problem.  I guess it depends on your system ??  Just for 
> > my information,
> > why do you make the call to add the table variables?
> > 
> > So, I'm not going to add the patch, sorry.  I like the idea, 
> > but for some
> > reason it isn't quite working...  If you want to try again 
> > just let me know.
> > 
> >> 

-- Old mod_include --

[root@garuda apache]# bin/ab  -c 50 -n 5000 http://127.0.0.1:8080/ssi/main.html This 
is ApacheBench, Version 1.3e <$Revision: 1.70 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2001 The Apache Software Foundation, http://www.apache.org/


Benchmarking 127.0.0.1 (be patient)
Completed 500 requests
Completed 1000 requests
Completed 1500 requests
Completed 2000 requests
Completed 2500 requests
Completed 3000 requests
Completed 3500 requests
Completed 4000 requests
Completed 4500 requests
Finished 5000 requests
Server Software:        Apache/2.0.18-dev
Server Hostname:        127.0.0.1
Server Port:            8080

Document Path:          /ssi/main.html
Document Length:        33513 bytes

Concurrency Level:      50
Time taken for tests:   26.695395 seconds
Complete requests:      5000
Failed requests:        0
Write errors:           0
Total transferred:      168820000 bytes
HTML transferred:       167565000 bytes
Requests per second:    187.30 [#/sec] (mean)
Time per request:       0.267 [ms] (mean)
Time per request:       0.005 [ms] (mean, across all concurent requests)
Transfer rate:          6175.71 [Kbytes/sec] received

Connection Times (ms)
            min  mean[+/-sd] median   max
Connect:    0     1   42.3 0 2991
Processing: 18   264  294.7 234 3225
Waiting:    2   107  267.2 81 3164
Total:      18   265  297.6 234 3225

Percentage of the requests served within a certain time (ms)
  50%    234
  66%    238
  75%    240
  80%    241
  90%    246
  95%    249
  98%    255
  99%   3218
 100%   3225 (longest request)
[root@garuda apache]# bin/ab  -c 100 -n 5000 http://127.0.0.1:8080/ssi/main.html
This is ApacheBench, Version 1.3e <$Revision: 1.70 $> apache-2.0
Copyright (c) 1998-2001 The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient)
Completed 500 requests
Completed 1000 requests
Completed 1500 requests
Completed 2000 requests
Completed 2500 requests
Completed 3000 requests
Completed 3500 requests
Completed 4000 requests
Completed 4500 requests
Finished 5000 requests
Server Software:        Apache/2.0.18-dev
Server Hostname:        127.0.0.1
Server Port:            8080

Document Path:          /ssi/main.html
Document Length:        33513 bytes

Concurrency Level:      100
Time taken for tests:   26.834145 seconds
Complete requests:      5000
Failed requests:        0
Write errors:           0
Total transferred:      168820000 bytes
HTML transferred:       167565000 bytes
Requests per second:    186.33 [#/sec] (mean)
Time per request:       0.537 [ms] (mean)
Time per request:       0.005 [ms] (mean, across all concurent requests)
Transfer rate:          6143.78 [Kbytes/sec] received

Connection Times (ms)
            min  mean[+/-sd] median   max
Connect:    0     1   42.4 0 2998
Processing: 35   532  418.6 478 3470
Waiting:    4   113  146.4 86 3127
Total:      35   532  420.5 478 3470

Percentage of the requests served within a certain time (ms)
  50%    478
  66%    484
  75%    485
  80%    487
  90%    507
  95%    544
  98%   3359
  99%   3464
 100%   3470 (longest request)
[root@garuda apache]# bin/apachectl stop
bin/apachectl stop: httpd stopped
[root@garuda apache]#

-- new mod_include --
[root@garuda apache]# bin/ab  -c 50 -n 5000 http://127.0.0.1:8080/ssi/main.html This 
is ApacheBench, Version 1.3e <$Revision: 1.70 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2001 The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient)
Completed 500 requests
Completed 1000 requests
Completed 1500 requests
Completed 2000 requests
Completed 2500 requests
Completed 3000 requests
Completed 3500 requests
Completed 4000 requests
Completed 4500 requests
Finished 5000 requests
Server Software:        Apache/2.0.18-dev
Server Hostname:        127.0.0.1
Server Port:            8080

Document Path:          /ssi/main.html
Document Length:        33513 bytes

Concurrency Level:      50
Time taken for tests:   22.568364 seconds
Complete requests:      5000
Failed requests:        0
Write errors:           0
Total transferred:      168820000 bytes
HTML transferred:       167565000 bytes
Requests per second:    221.55 [#/sec] (mean)
Time per request:       0.226 [ms] (mean)
Time per request:       0.005 [ms] (mean, across all concurent requests)
Transfer rate:          7305.05 [Kbytes/sec] received

Connection Times (ms)
            min  mean[+/-sd] median   max
Connect:    0     0    0.2 0 8
Processing: 23   223   15.4 223 331
Waiting:    1    74   53.4 68 230
Total:      23   223   15.4 223 331

Percentage of the requests served within a certain time (ms)
  50%    223
  66%    224
  75%    226
  80%    227
  90%    234
  95%    237
  98%    245
  99%    250
 100%    331 (longest request)

--
[root@garuda apache]# bin/ab  -c 100 -n 5000 http://127.0.0.1:8080/ssi/main.html
This is ApacheBench, Version 1.3e <$Revision: 1.70 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2001 The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient)
Completed 500 requests
Completed 1000 requests
Completed 1500 requests
Completed 2000 requests
Completed 2500 requests
Completed 3000 requests
Completed 3500 requests
Completed 4000 requests
Completed 4500 requests
Finished 5000 requests
Server Software:        Apache/2.0.18-dev
Server Hostname:        127.0.0.1
Server Port:            8080

Document Path:          /ssi/main.html
Document Length:        33513 bytes

Concurrency Level:      100
Time taken for tests:   22.571021 seconds
Complete requests:      5000
Failed requests:        0
Write errors:           0
Total transferred:      168820000 bytes
HTML transferred:       167565000 bytes
Requests per second:    221.52 [#/sec] (mean)
Time per request:       0.451 [ms] (mean)
Time per request:       0.005 [ms] (mean, across all concurent requests)
Transfer rate:          7304.19 [Kbytes/sec] received

Connection Times (ms)
            min  mean[+/-sd] median   max
Connect:    0     0    0.3 0 9
Processing: 39   448   49.6 448 763
Waiting:    5   104   93.9 63 458
Total:      39   448   49.7 448 763

Percentage of the requests served within a certain time (ms)
  50%    448
  66%    449
  75%    453
  80%    457
  90%    473
  95%    494
  98%    534
  99%    559
 100%    763 (longest request)
[root@garuda apache]#

mod_include.patch

Reply via email to