Hello!
At first, great thanks to Gerald Richter and Joshua Chamas for helping to
configure Apache with HTML::Embperl & Apache::ASP.
As I wrote before Embperl 1.1.1 works faster than Apache::ASP 0.16, although
Apache::ASP wasn't configured for best performance. When I upgraded Embperl
to 1.2b9 situation is changed.
Apache::ASP - 19 req/sec, Embperl - 15 req/sec.
------------------- httpd.conf ---------------------------------
<VirtualHost 195.209.67.50>
PerlPostReadRequestHandler My::ProxyRemoteAddr
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /usr/local/httpdata/www.samara.ru/data
ServerName www.samara.ru
ErrorLog "|/usr/sbin/cronolog
/usr/local/httpdata/www.samara.ru/logs/ep%d%m%
<Files *.epl>
SetHandler perl-script
PerlHandler HTML::Embperl
Options ExecCGI
</Files>
<Files ~ (\.asp)>
SetHandler perl-script
PerlHandler Apache::ASP
PerlSetVar Debug 0
PerlSetVar Global /usr/local/httpdata/www.samara.ru/global
PerlSetVar NoState 1
PerlSetVar DynamicIncludes 1
</Files>
<Files ~ (\.pl)>
SetHandler perl-script
PerlHandler Apache::Registry
Options ExecCGI
PerlSendHeader On
</Files>
</VirtualHost>
------------------- httpd.conf ---------------------------------
------------------- index1.asp ---------------------------------
<PRE>
<%
use strict;
use DBI;
my ($dbh,$sth,$login,$fio);
$dbh = DBI->connect("DBI:Oracle:SSUMain","test","test");
$sth = $dbh->prepare_cached("select login,fio from test where login like
?");
$sth->bind_param(1,"Be%");
$sth->execute;
$sth->bind_columns(\$login,\$fio);
local $^W=0;
while ($sth->fetchrow_arrayref)
{
$Response->Write ("$login - $fio\n");
}
%>
</PRE>
------------------- index1.asp ---------------------------------
apache:/usr/local/apache/power/bin# ./ab -n 1000 -c 10 http://apache/index1.asp
This is ApacheBench, Version 1.3a
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-1999 The Apache Group, http://www.apache.org/
Server Software: Apache/1.3.9
Server Hostname: apache
Server Port: 80
Document Path: /index1.asp
Document Length: 303 bytes
Concurrency Level: 10
Time taken for tests: 51.815 seconds
Complete requests: 1000
Failed requests: 0
Total transferred: 586000 bytes
HTML transferred: 303000 bytes
Requests per second: 19.30
Transfer rate: 11.31 kb/s received
Connnection Times (ms)
min avg max
Connect: 0 5 534
Processing: 61 509 3852
Total: 61 514 4386
------------------- test.epl ---------------------------------
<html>
<title>DBTest</title>
<body>
<pre>
[-
use DBI;
$dbh = DBI->connect("DBI:Oracle:SSUMain","test","test");
$sth = $dbh->prepare_cached("select login,fio from test where login like
?");
$sth->bind_param(1,"Be%");
$sth->execute;
$sth->bind_columns(\$login,\$fio);
local $^W=0;
$escmode =0;
-]
[$ while ($sth->fetchrow_arrayref) $]
[+ $login +] - [+ $fio +]
[$ endwhile $]
</pre>
</body>
</html>
------------------- test.epl ---------------------------------
apache:/usr/local/apache/power/bin# ./ab -n 1000 -c 10
http://apache/test.epl
This is ApacheBench, Version 1.3a
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-1999 The Apache Group, http://www.apache.org/
Server Software: Apache/1.3.9
Server Hostname: apache
Server Port: 80
Document Path: /test.epl
Document Length: 355 bytes
Concurrency Level: 10
Time taken for tests: 64.745 seconds
Complete requests: 1000
Failed requests: 0
Total transferred: 614000 bytes
HTML transferred: 355000 bytes
Requests per second: 15.45
Transfer rate: 9.48 kb/s received
Connnection Times (ms)
min avg max
Connect: 0 4 430
Processing: 71 638 11717
Total: 71 642 12147
----------------------------------------------
Sergey Polyakov (BeerBong)
Chief of Web Lab (http://www.mustdie.ru/~beerbong)