Not logged in. · Lost password · Register
Forum: News and announcements RSS
Quick & dirty performance test
Actually rather comparing PHP versions
Avatar
Yves (Administrator) #1
User title: UNB developer & webmaster
Member since Jan 2004 · 3814 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Subject: Quick & dirty performance test
Hi,
here is the results of my short performance test I just made. It was primarily meant to get an impression of the some PHP variants I have installed on my test server. But this may also be of public interest, so I simply published it here. The absolute performance values may of course vary on other systems.

Note: This can only cover the overall performance, no detailed information about database utilisation and thus how much faster UNB 1.7 can possibly be.

Scenario:
Software: Debian Linux 3.1, Kernel 2.6.14, Apache 2.0.55, MySQL 5.0.17-max, VMWare 5 inside Windows XP
Hardware: Athlon 64 3000+, 192MB guest RAM, 2xSATA-RAID0 disk on host
Clean install of UNB.devel.20051222
Created 3 empty forums, logged in as admin, benchmarked overview page

Test:
ab -n 50 -c 10 $URL
(ab is a benchmark tool provided with Apache2)
Ran some iterations until results became stable enough.

Results:
PHP4-CGI: 4,2#/sec at avg. 240ms (100%)
PHP4-FastCGI: 5,6#/sec at avg. 177ms (133%)
PHP5-FastCGI: 5,0#/sec at avg. 200ms (119%)
PHP5-FastCGI+APC: 14,8#/sec at avg. 68ms (352%)

Interpretation:
PHP5 is indeed slower than PHP4.
FastCGI seems faster than CGI, even for complex PHP applications.
APC can speed up UNB to 3x.

Maybe some background on the PHP installation:
PHP4-CGI is PHP 4.4.1 invoked through suPHP to get the script running in the correct user context. Configuration changes: register_globals, register_argc_argv. No further extensions.
PHP4-FastCGI is the same PHP, only invoked through Apache's suEXEC and mod_fastcgi.
PHP5-FastCGI is PHP 5.1.1 invoked through the same mod_fastcgi. Configuration changes: register_argc_argv. No further extensions.
PHP5-FastCGI+APC is the same PHP5-FastCGI, only with the APC extension loaded and active, with the APC optimiser disabled. This caches the compiled intermediate code inside PHP and thus saves parsing the large codebase on every request. This is the most impressive effect of the whole test.
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
Avatar
Yves (Administrator) #2
User title: UNB developer & webmaster
Member since Jan 2004 · 3814 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Small update. I don't really know if this test provided realistic results, since that "ab" tool always shows a very high number of "Failed requests" and under some conditions I can only watch a single PHP process serving out all the pages for a bunch of httpd processes. I've played some more with it, rebuilt the Apache server meanwhile, but still can't figure out, what "ab" actually does. The number of requests, the concurrency level, the displayed number of completed and failed requests and what UNB statistics say all won't fit together. Right now there's even been 10 completed and 173 failed requests on "ab -n 10 -c 1000". 10 + 173 == 10 * 1000? Reminds me a little of Google arithmetics. (Fast but inaccurate...)

So although the test results look not quite surprising, I'm not sure they're correct. Does anyone know a really understandable HTTP benchmarking tool?

Update 2: I tend to ignore those "Failed requests" and distrust the concurrency level. "ab -n 10 -c 100" caused 110 lines in the Apache access log and 110 adds to the UNB page hits counter. The result was "10 complete and 9 incomplete requests"...

But I like this blog article, well-written: http://www.macgeekery.com/tips/troubleshooting/stress-test…
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
This post was edited on 2006-01-04, 23:56 by Yves.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
This board is powered by the Unclassified NewsBoard software, 20110527-dev, © 2003-2011 by Yves Goergen
Page created in 185.4 ms (87.1 ms) · 39 database queries in 132.9 ms
Current time: 2012-02-07, 19:52:27 (UTC +01:00)