Wednesday, August 30, 2006

performance tests on php, perl and cgi

Keith Winston reports on a test he conducted comparing the three typical open source tools. I expected php to perform well because it supports some pretty high performance sites in real life. The full report is linked, but the essentials are clipped here.

NewsForge | LAMP vs. LAMP
That said, the results of these tests show that for many common Web programming tasks, PHP (mod_php) has a slight performance edge over Perl (mod_perl), based on the majority of the HTML generation tests. In the MySQL test, PHP also edged out Perl. I suspect the MySQL results are a reflection of the database drivers more than the interpreters.

Both mod_perl and mod_php have an enormous performance advantage over standard CGI, as expected. Standard CGI not only doesn't scale very well, but gains no advantage from concurrency. Under load, it could bring a server to its knees quickly.