You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Pierre-Yves BONNETAIN <bo...@acm.org> on 2000/11/07 12:18:57 UTC

Re: how do I really proof, that my script is running under apaches mod_perl?

   Hello Alexander,

> maybe this one is a rookie-question ;)

   Only unsaid questions are rookie-ones :-)
   Is your script doing some system() or `command` ? If so, this will explain 
the fork/exec-ing you see. 
   Beware, some modules do make calls to system() or `command`, so check your
modules also. I had this problem using one module, making 7 fork/exec on a 
tight loop. When I changed for a better algorithm, my perfs just went through
the ceiling (x 40).
   As for the testing tool, you can also use ab (in the Apache distribution),
which can exercise one URL on your server as fast as the server answers.
Very interesting (but some tool that enables you to write scenarii would be
more up to the point in several situations).
   Cheers,
-- Pierre-Yves Bonnetain - Chief Techical Officer - http://www.rouge-blanc.de

> Q:Is it normal, that under linux, running apache with mod_perl, for requests
> on a script a separate system process is starting ?
>  I saw a lot of processes (via `top`), all running separate my script, as I
> made some benchmark tests...
>  - I thought, that everything would be handled by apaches "httpd", if
> mod_perl is installed...
> 
> History:
> I wrote a script, included it via ssh in most of *.shtml - files of my site.
> 
> Everything is working fine, but the benchmark tests.
> I really got some frustrating request/seconds - rates (about 6 req/s), while
> testing the sites.
> So I would really love to know, which way to go:
>  should I try to optimise that script (a lot) more or
>  should I configure that apache server in the right way for mod_perl?
> 
> Some Information:
>  I use these modules in my script:
> use Apache::Registry;
> use CGI::FastTemplate;
> use strict;
> 
>  some httpd.conf snippets of my test server running on linux:
> ..
> KeepAlive On
> MaxKeepAliveRequests 100
> ..
> MaxClients 150
> ..
> AddModule  mod_perl.c
> ..
> Alias   /cgi-bin/ ....
>  <Files *.pl>
>    SetHandler  perl-script
>    PerlHandler Apache::Registry
>    Options     +ExecCGI
>  </files>
> ...
> 
>  well, printing the environment with a cgi:
> ..
> SERVER_SOFTWARE = Apache/1.3.12 (Unix) (SuSE/Linux) mod_fastcgi/2.2.2
> mod_perl/...
> ...
> 
>  I made those benchmark test from an NT-PC, via LAN, using Microsoft's
> freeware: "Web Application Stress 1.1" from
> http://homer.rte.microsoft.com/! - is there a better free tool? - (well I
> don't really looked out for a better one)
> 
> Thanks 4 reading,
> any remarks would be great,
> alex.
> 
>