Apache Benchmark Results - PHP vs PERL

I have used Apache Benchmarking tool and ran it for 1000 requests with
concurrenncy 2

You can learn about this tool on http://httpd.apache.org/docs/2.0/programs/ab.html

Testing PHP

This is the result of Processing the Whole secureslash.com/index.php . We have sent 1000 request to
it to see how it performs.

PHP Results:

*
Requests per second:    85.96 [#/sec] (mean)
Time per request:       58.168 [ms] (mean)
Time per request:       11.634 [ms] (mean, across all concurrent requests)
*

This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 1997-2005 The Apache Software Foundation, http://www.apache.org/

Benchmarking secureslash .com (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Finished 1000 requests

Server Software:        Apache/2.2.6
Server Hostname:        secureslash.com
Server Port:            80

Document Path:          /
Document Length:        23188 bytes

Concurrency Level:      5
Time taken for tests:   11.633571 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      24052000 bytes
HTML transferred:       23188000 bytes
Requests per second:    85.96 [#/sec] (mean)
Time per request:       58.168 [ms] (mean)
Time per request:       11.634 [ms] (mean, across all concurrent requests)
Transfer rate:          2018.98 [Kbytes/sec] received

Connection Times (ms)
min  mean[+/-sd] median   max
Connect:        0    2   4.0      1      27
Processing:    26   55 114.2     37    1357
Waiting:       21   44 114.2     28    1349
Total:         26   57 114.5     39    1364

Percentage of the requests served within a certain time (ms)
50%     39
66%     45
75%     51
80%     54
90%     65
95%     77
98%    195
99%    804
100%   1364 (longest request)

—————————————————————————————————————————–

Testing Perl

This Is a result of JUST HELLOWORLD Program in cgi bin — > secureslash.com/cgi-bin/index.cgi see the
times below it is SLOWER than php .

PERL Results

*
Requests per second:    86.01 [#/sec] (mean)
Time per request:       58.131 [ms] (mean)
Time per request:       11.626 [ms] (mean, across all concurrent requests)*

This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 1997-2005 The Apache Software Foundation, http://www.apache.org/

Benchmarking secureslash.com (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Finished 1000 requests

Server Software:        Apache/2.2.8
Server Hostname:        secureslash.com.com
Server Port:            80

Document Path:          /cgi-bin/index.cgi
Document Length:        12 bytes

Concurrency Level:      5
Time taken for tests:   11.626206 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      258320 bytes
HTML transferred:       12000 bytes
Requests per second:    86.01 [#/sec] (mean)
Time per request:       58.131 [ms] (mean)
Time per request:       11.626 [ms] (mean, across all concurrent requests)
Transfer rate:          21.68 [Kbytes/sec] received

Connection Times (ms)
min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:     5   56 206.2      7    2441
Waiting:        5   56 205.9      7    2441
Total:          5   56 206.2      7    2441

Percentage of the requests served within a certain time (ms)
50%      7
66%     11
75%     13
80%     15
90%     25
95%    508
98%    821
99%   1027
100%   2441 (longest request)

———————————–

Moral is PHP is faster than CGI-Perl.




2 Comments so far »

  1. Alexandr Ciornii said,

    Wrote on May 13, 2008 @ 8:39 am

    You don’t say how they were configured - I assume PHP was run as mod_php and Perl as mod_cgi. Try fair run - run them both as FastCGI, or Perl as mod_perl.

  2. apachebench said,

    Wrote on June 27, 2008 @ 6:37 pm

    […] Testing PHP This is the result of Processing the Whole secureslash.com/index.phhttp://secureslash.com/apache/php-vs-perl-an-apache-benchmark-results-2/Performance testing with ApacheBench / eZ Publish Performance …Jan 16, 2007 … ApacheBench, or […]

Comment RSS · TrackBack URI

Leave a Comment

You must be logged in to post a comment.

Google