Hi all,
I was looking for some performance data for EmbPerl, PHP, etc. but
could only find "Hello World"-type tests. So, I decided to add a few
other tests to the mix and post the results.
These test results are still very crude.
Any feedback/analysis/criticism would be appreciated.
Thanks!
Rob
MACHINE:
Dual Pentium III 500 MHz
256 MB RAM
RedHat 6.0 (Linux 2.2.5-15smp)
DATABASE SERVER:
Postgres 6.5.2
WEB SERVERS:
Apache w/ mod_perl, EmbPerl (using Apache::DBI)
- Apache/1.3.9 (Unix) mod_perl/1.21
Apache w/ mod_php (using persistent DB connection call)
- Apache/1.3.9 (Unix) PHP/3.0.12
AOLServer 2.3.3 (supports persistent DB connection)
- NaviServer/2.0 AOLserver/2.3.3
- threw this one in just for kicks
RELEVANT APACHE SERVER SETTINGS:
MinSpareServers 20
MaxSpareServers 35
StartServers 20
MaxClients 150
MaxRequestsPerChild 0
PerlSetEnv EMBPERL_OPTIONS 8082
PerlSetEnv EMBPERL_ESCMODE 0
PerlSetEnv EMBPERL_DEBUG 0
TESTS:
Test 1- Static HTML
Test 1(b) - Static HTML with special extension
Test 2- Hello World
Test 3- Big Print
Test 4- Small Database Query
Test 5- Big Database Query
Test 1: Static HTML
- This is a 6K HTML file called "test1.html".
- No embedded code here.
Test 1(b): Static HTML with extension
- Identical to the static HTML file in every way
*except* that extension is changed to ".epl",
".php3", or ".adp" according to web server.
- No embedded code here.
Test 2: Hello World
- Simple test to print "Hello World".
- For each of EmbPerl, PHP, AOLServer:
[+ "Hello World" +]
<% ns_puts "Hello World" %>
Test 3: Big Print
- 1000 iterations of incrementally printing "a":
a
aa
aaa
a
aa
...
- As an example: here's the EmbPerl code:
[-
for($i=0;$i < 1000;++$i) {
$a = $a . "a";
print OUT $a, "";
}
-]
- Returned page was approximately 500 K.
Test 4: Small Database Query
- Fetch and display 1 record from a products database of about 300
records, searching for an exact match on an indexed field.
- Returned page was approximately 5K.
- Used persistent db connection in all cases.
Test 5: Big Database Query
- Fetch and display 24 records from a product database of about
300 records, using a "like" search on a text field.
- Returned page was approximately 118K.
- Used persistent db connection in all cases.
RESULTS:
- Results are "Requests per second". I'm not sure how to
interpret the numbers on an absolute scale, but the relative
comparisons should be somewhat meaningful.
- Each test was conducted 5 times and the average is shown.
- "ab" was used from the same machine as the web servers because
something "strange" happened when I ran it on another machine.
(I'll send a separate email regarding this.)
1000 requests, 1 concurrent
ab -n 1000 -c 1
--
Test1 Test1(b) Test2 Test3Test4Test5
---
Apache w/
modperl/ 852.86 99.53217.2516.9678.1218.32
EmbPerl
Apache w/ 836.47100.06560.7816.1598.7618.80
PHP
AOLServer 100.01 99.72100.0612.89 156.3014.29
1000 requests, 10 concurrent
ab -n 1000 -c 10
--
Test1 Test1(b) Test2 Test3Test4 Test5
Apache w/
modperl/ 890.37248.00262.4730.31158.5045.17
EmbPerl
Apache w/ 957.30492.55559.7123.81268.3434.64
PHP
AOLServer 758.54227.76816.65 5.97141.19 7.45