perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rich...@hyperreal.org
Subject cvs commit: modperl-site bench.txt index.html
Date Wed, 31 Mar 1999 20:09:02 GMT
richter     99/03/31 12:09:00

  Modified:    .        index.html
  Added:       .        bench.txt
  Log:
  - Added the benchmarks from Joshua Chamas to mod_perl site and put a link
    under Additional resources
  
  Revision  Changes    Path
  1.22      +5 -3      modperl-site/index.html
  
  Index: index.html
  ===================================================================
  RCS file: /export/home/cvs/modperl-site/index.html,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- index.html	1999/03/03 20:33:28	1.21
  +++ index.html	1999/03/31 20:08:56	1.22
  @@ -1,8 +1,8 @@
  -<html>
  +
   <head>
   <title>Apache/Perl Integration Project</title>
  -<!-- Last changed: $Id: index.html,v 1.21 1999/03/03 20:33:28 richter Exp $ -->
  -<!-- Last changed: Gerald Richter: 14-Feb-1999 -->
  +<!-- Last changed: $Id: index.html,v 1.22 1999/03/31 20:08:56 richter Exp $ -->
  +<!-- Last changed: Gerald Richter: 31-Mar-1999 -->
   </head>
   <body bgcolor=#ffffff >
   <center>
  @@ -112,6 +112,8 @@
   archive</a> for the mod_perl mailing list thanks to Ken Williams.
   <p>
   Links to mod_perl related <a href="faqs.html">FAQs</a>
  +<p>
  +Joshua Chamas started some <a href="bench.txt">benchmarking</a>
   <p>
   The Apache/Perl mailing list (modperl@apache.org) is
   available for mod_perl users and developers to share ideas, solve
  
  
  
  1.1                  modperl-site/bench.txt
  
  Index: bench.txt
  ===================================================================
  ## IIS ## APACHE ## CGI ## EMBPERL ## ISAPI ## VBSCRIPT ## PERLSCRIPT ##
  ASP ## PERLEX ## CHILIASP ## PHP ## WINNT ## LINUX ## SOLARIS ##
  
  HTTPD Benchmarks for Hello World:
  
  What follows is a round-up of some testing done with various www 
  application environments, benchmarking the speed of a minimal
  Hello World program.  Please feel free to contribute to these benchmarks 
  by providing your relevant system information.  Please use code 
  identical to what is provided below, or if in a new environment not
  already represented, please follow the spirit.  
  Thanks. -- Joshua (joshua@chamas.com)
  
  NOTE: These benchmarks mainly tests the overhead of the various www
  application environments, it does not make any comparison about the speed
  "real" applications will need, because the outputing of "Hello World" is
  a really easy task compared with all the other things need to be done for
  a request. Also note that some of the benchmarks are done on UNIX and some
  on NT, some are made with different processors, so they can't directly 
  compared!!! (For example see static HTML on Linux, Solaris and NT!)
  - Gerald (richter@ecos.de)
  
  
  * new results
  
  HTTPD		Web Application Env	Hits/s	Operating Sys.	Chip	Session	Client	HTTP/x	By
  -----		-------------------	------	--------------	----	-------	------	------	--
  apache 1.3.4	static html + mod_mmap	2291.	Linux 2.2.3  	PII350	no	ab	?1.1	jb
  apache 1.3.4	static html		1893.	Linux 2.2.3  	PII350	no	ab	?1.1	jb
  apache 1.3.5dv	static html		1412.53	Linux 2.2.3  	PII300	no	ab	1.1	rl
  apache 1.3.5dv	static html		 612.56	Linux 2.2.3  	PII300	no	ab	1.0	rl
  apache 1.3.5dv	mod_php             	 375.87	Linux 2.2.3  	PII300	no	ab	1.0	rl
  iis 4.0		static html		 330.01	WinNT 4.0 SP4	PII300	no	socr	1.0	jc
  apache 1.3.4	static html		 296.70	Solaris 2.6 	PII300	no	ab	1.0	jc
  iis 4.0      	ssi include		 155.51	WinNT 4.0 SP4	PII300	no	socr	1.0	jc
  apache 1.3.4	mod_perl/asp    	  76.84	Solaris 2.6 	PII300	no	ab	1.0	jc
  apache 1.3.3	static html		  74.08	WinNT 4.0 SP4	PII300	no	socr	1.0	jc
  iis 4.0		perlex cgi		  64.87	WinNT 4.0 SP4	PII300	no	socr	1.0	jc
  iis 4.0		perl isapi raw-cgi	  59.78	WinNT 4.0 SP4	PII300	no	socr	1.0	jc
  apache 1.3.3	chiliasp vbscript	  56.93	WinNT 4.0 SP4	PII300	yes	socr	1.0	jc
  apache 1.3.3	mod_include/ssi inc	  52.66	WinNT 4.0 SP4	PII300	no	socr	1.0	jc
  apache 1.3.3	mod_perl		  50.72	WinNT 4.0 SP4	PII300	no	socr	1.0	jc
  apache 1.3.3	mod_perl/cgi-registry	  40.17	WinNT 4.0 SP4	PII300	no	socr	1.0	jc
  apache 1.3.3	mod_perl/embperl	  37.81	WinNT 4.0 SP4	PII300	no	socr	1.0	jc
  apache 1.3.3	mod_perl/cgi-reg + sess	  37.59	WinNT 4.0 SP4	PII300	yes	socr	1.0	jc
  *apache 1.3.3	mod_perl/embperl	  35.95	WinNT 4.0 SP4	PII300	yes	socr	1.0	jc
  *apache 1.3.3	mod_perl/embperl ssi	  35.66	WinNT 4.0 SP4	PII300	no	socr	1.0	jc
  apache 1.3.4	mod_perl/asp       	  35.38	Solaris 2.6 	PII300	yes	ab	1.0	jc
  apache 1.3.3	mod_perl/ssi include	  32.66	WinNT 4.0 SP4	PII300	no	socr	1.0	jc
  apache 1.3.3	mod_perl/asp/ssi inc	  29.34	WinNT 4.0 SP4	PII300	no	socr	1.0	jc
  apache 1.3.3	mod_perl/asp		  27.76	WinNT 4.0 SP4	PII300	no	socr	1.0	jc
  iis 4.0		vep - velocigen perl	  25.55	WinNT 4.0 SP4	PII300	no	socr	1.0	jc 
  iis 4.0		perl raw-cgi       	  16.35	WinNT 4.0 SP4	PII300	no	socr	1.0	jc
  apache 1.3.3	mod_perl/asp       	  15.75	WinNT 4.0 SP4	PII300	yes	socr	1.0	jc
  iis 4.0		asp perlscript       	   9.54	WinNT 4.0 SP4	PII300	both	socr	1.0	jc
  iis 4.0    	asp/ssi include        	   9.52	WinNT 4.0 SP4	PII300	yes	socr	1.0	jc
  iis 4.0		asp vbscript         	   9.51	WinNT 4.0 SP4	PII300	both	socr	1.0	jc
  iis 4.0		perl cgi          	   3.82	WinNT 4.0 SP4	PII300	no	socr	1.0	jc
  iis 4.0		perl isasp cgi     	   2.96	WinNT 4.0 SP4	PII300	no	socr	1.0	jc
  
  socr	= Socrates, http://www.morphtech.com, multi-threaded for Win32 only
  ab	= ApacheBench 
  jc	= Joshua Chamas
  rl	= Rasmus Lerdorf
  jb	= Jeffrey Baker
  
  # runtime of the test should be around 30 seconds
  # 5-10 clients should be used concurrently
  # Session refers to an ASP style session keyed by unique cookie stored on server 
  
  Matthew Sergeant started this to test the speed of a www
  application environment. His thought was that a simple "Hello World"
  would test for the raw speed of those environments.
  
  The following code was used for the "Hello World". For embeded
  environments, there is one script line, and one static line. For
  pure script environments, there are two script lines to emulate
  what would be an easy translation to the embeded environment.
  
  ## mod_perl program
  package Apache::bench;
  sub handler {
    my($r) = shift;
    $r->content_type('text/html');
    $r->send_http_header();
    $r->print('Hello ');
    $r->print('World');
    200;
  }
  
  ## mod_perl/cgi program; iis/perl cgi; iis/perl isapi cgi
  use CGI;
  my $cgi = CGI->new();
  print $cgi->header();
  print "Hello ";
  print "World";
  
  ## mod_perl/asp program as well; iis/perlscript
  ## for no sessions in Apache::ASP, config:
  ##	PerlSetVar	NoState		1
  <%@LANGUAGE=PerlScript%>
  <% $Response->Write("Hello "); %>
  World
  
  ## iis/vbscript; apache/chiliasp vbscript
  <%@LANGUAGE=VBScript%>
  <% Response.Write("Hello ") %>
  World
  
  ## mod_perl/embperl
  ## Optimized with:
  ##	PerlSetEnv              EMBPERL_OPTIONS 8083
  ##	PerlSetEnv              EMBPERL_DEBUG 0
  ## For user sessions on Win32, in %udat, config:
  ## 	PerlModule		Apache::Session::Win32 ;
  ##	PerlSetEnv		EMBPERL_SESSION_CLASS	Win32
  ##
  ## Please note that print OUT is atypical use in Embperl, but is 
  ## the mechanism similar to ASP's $Response->Write() that you can use
  ## from other modules, when decomping routines out of the main script.
  ##
  [- print OUT "Hello "; -]
  World
  
  ## iis/perl raw cgi script; iis/perl isapi raw cgi
  ## does not "use CGI" which can kill normal cgi apps that don't
  ## cache module loading the way mod_perl and perlex do.
  print "HTTP/1.1 200 OK\n";
  print "Content-Type: text/html\n\n";
  print "Hello ";
  print "World";
  
  ## static html :)
  Hello World
  
  ## mod_php
  <?echo "Hello "?>World
  
  ## velocigen for perl
  <perl> print "Hello "; </perl>
  World
  
  ## mod_perl/cgi-reg + sess on win32;
  ## Apache::Session::SingleThread does
  ## the job since apache/mod_perl is not multi-threaded
  use Apache::Session::SingleThread;
  my $r = Apache->request;
  my $cookie = $r->header_in('Cookie');
  $cookie =~ /SESSION_ID=([^;]*)/;
  $cookie = $1;
  eval { tie %session, 'Apache::Session::SingleThread', $cookie };
  eval { tie %session, 'Apache::Session::SingleThread', undef }  if $@; 
  $r->header_out("Set-Cookie" => "SESSION_ID=$session{_session_id}") 
      unless ($cookie eq $session{_session_id});
  
  use CGI;
  my $cgi = CGI->new();
  print $cgi->header();
  print "Hello";
  print " World";
  
  ## mod_include/ssi include; mod_perl/ssi inc; mod_perl/asp/ssi inc; 
  ## iis/ssi include; iis/asp/ssi include
  ## hello.static is the Hello World static html file
  <!--#include file="hello.static"-->
  
  ## mod_perl/embperl ssi
  ## Execute() is the nearest equivalent to an SSI include 
  ## Optimized with:
  ##	PerlSetEnv              EMBPERL_OPTIONS 8083
  ##	PerlSetEnv              EMBPERL_DEBUG 0
  ## We have to use an abs path, because we are not chdir'ing by
  ## default with the optimizations.
  [- Execute('/abs_path/hello.static'); -]
  
  
  
  

Mime
View raw message