LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] simple Perl tests

[ILUG] simple Perl tests

Donncha O Caoimh donncha.ocaoimh at tradesignals.com
Fri Jan 14 10:45:23 GMT 2000


After installing RH61 on a new box yesterday along with apache and
mod_perl I decided to test cgi-bin vs mod_perl again.. here are the
results:
the perl file, t.pl was:
--------------------t.pl-------------------
#!/usr/bin/perl

print "Content-type: text/html\n\n";
print "<html><body bgcolor=\"#ff5050\">";
print "this is a test";
-------------------------------------------

I called it 10000 times, using 300 concurrent connections to a stock
Redhat installation of Apache (I didn't change the number of Apache
children or tune it in any way).

cgi-bin:
The load on the machine went up to 73.26 and the tests took 53 seconds.
Out of the 10000 requests, 4471 failed. It did 185.36 requests per
second, and transfered 87.68 kb/s.

Mod_perl:
The load on the machine went to 5.9 and the tests took 35 seconds. All
requests completed.
It did 285.19 requests per second, and transfered 61.32 kb/s.

PHP3:
As a comparision, I created the same script in php3. 
The load on the machine went up to 18.69 and the tests took 35 seconds.
All requests completed. It did 284.62 requests per second, and
transfered 61.20 kb/s.

Notes:
Perl on its own has always been known as a dog under heavy loads as the
perl interpreter has to be loaded on every request. 
mod_perl has always impressed speed wise.
PHP3 is very fast, but not up to mod_perl speeds. PHP4 is supposed to be
much faster.
The tests were carried out over a 100Mbit switched LAN, the server is a
PIII500 with 256MB RAM, with an IDE disk. 

Don't trust benchmarks :)

There you go, choice is a wonderful thing. I'll still code a web
application in PHP but for stuff that gets a heavy pounding I'd look
seriously at mod_perl. 

Donncha.
PS. recording this for my own benefit as well..




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell