You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Rich Lemanski <rl...@siue.edu> on 2000/07/11 16:22:53 UTC

Perl CGI/Mod_perl testing - HeLp!

Hello all, 

I could use your assistance.  I have been tasked to 
show the performance differences between Perl CGI 
scripts and mod_perl scripts running on an Apache 
web server on a small isolated network. 

I am assuming mod_perl will outperform CGI if the 
scripts are well written. 

I need to send these scripts to Apache so that it can 
run them.  From this I can then generate some statistics 
as to how well each of them performs.  I am not sure 
where to begin in regards to the network aspect of the 
testing.  I have been reading the Apache/mod_perl 
FAQ/How-To's on the net and studying Perl from 
O' Reilly's Learning Perl and Perl Programming.  

I understand that if the Apache server is running:

# apachectl start --> starts Apache
# ps -ef | grep httpd --> starts about 10 httpd processes by 
default to handle connections

Then I evoke a Perl CGI script on the same system:

# perl cgi_test.pl --> the external Perl interpretor processes 
the script and passes it to the Apache web server to be parsed.
 
* I do not know how to proceed in getting a script that 
originated from a client to execute on the Apache webserver?  
Do I need to specify an IP address in the script or configure 
a configuration file? 
* The script would also have to execute many thousands of 
times for better  results. 
* I am assuming that after I compile the mod_perl binaries so 
that the Apache server supports mod_perl, it will still support 
Perl CGI??? 

The testing is being done primarily on Mandrake Linux 7.0 for 
now but I may do the same thing for Win98se.  The Apache 
and mod_perl distros are new within a month.  Anyone have 
any good ideas on how to go about doing this??? Thanks a 
bunch.   

NETWORK CONFIGURATION 

Gateway machine (Win98se) = 192.168.0.1 
Apache webserver (Mandrake 7.0/Win98se/Sol 7) = 192.168.0.2 
Test client (Win98/Mandrake 7.0) = 192.168.0.3 

Sincerely, 
Rich


Re: Perl CGI/Mod_perl testing - HeLp!

Posted by "G.W. Haywood" <ge...@jubileegroup.co.uk>.
Hi there,

On Tue, 11 Jul 2000, Rich Lemanski wrote:

> I have been tasked to show the performance differences between Perl
> CGI scripts and mod_perl scripts running on an Apache web server on
> a small isolated network.

There is a lot of good stuff about this in the Guide

http://perl.apache.org/guide

> I am assuming mod_perl will outperform CGI if the scripts are well
> written.

That's the idea.

> I am not sure where to begin in regards to the network aspect of the
> testing.  I have been reading the Apache/mod_perl FAQ/How-To's on
> the net and studying Perl from O' Reilly's Learning Perl and Perl
> Programming.

Stick with the reading.  You have at least another month of it to do.

> I understand that if the Apache server is running:
> 
> # apachectl start --> starts Apache

Normally you'd use `restart' if the server is already running.

> # ps -ef | grep httpd --> starts about 10 httpd processes by 
> default to handle connections
> 
> Then I evoke a Perl CGI script on the same system:
> 
> # perl cgi_test.pl --> the external Perl interpretor processes 
> the script and passes it to the Apache web server to be parsed.

I'm afraid none of this makes sense.  A Unix book might help you.

73,
Ged.