HTTP server comparison #2 Thu, Mar 13. 2008
As promised (well, I've posted link to the "article" on nginx mailing list, so it was about time..) I'm posting configuration files (.tar.bz2) and script (.sh.txt) that helped me with my benchmarks.
About configuration files: Most of them are basic, out-of-the-box (or debian package) configurations, trimmed down to minimum. I don't say they are fully optimized, and I will appreciate any constructive comment or change suggestion.
About the script: this is my first "bigger" (longer then 10 lines, with functions, conditions and loops, all in one) bash shell script, so be gentle ;>
Some interesting issues were raised on the mailing lists, as:
- serving such a small file I was mostly measuring connection and http protocol overhead -- point taken, I'll try to repeat tests with biger file.
- number of failed requests (if any) -- will add this.
- average time request and time for longest request -- will add this to.
And some additional details about the test:
- Tests were ran on same machine as web servers
- ApacheBenchmark was used
- Before each test all web-servers were shutdown and killed

- VPS software: VMWare Workstation 6.0.1 build-55017
I'll try to make another test by the end of this week.
File include performance in PHP Sat, Feb 23. 2008
I did a little comparison of /(include|require)(_once)?/ methods in PHP 5.2.5 (mostly to prove my coworker wrong).
This are values in microseconds, result is an average of 100 executions of each method
| empty txt file | empty php file* | "real" php file** | |
| include | 19.52 | 25.12 | 1247.75 |
| require | 40.42 | 45.81 | 1162.59 |
| include_once | 34.61 | 31.65 | 42.59 |
| require_once | 11.45 | 36.84 | 13.96 |
* only <?php and ?>
** with class definition and class_exists check
HTTP server comparison Thu, Feb 14. 2008
For my speech in Kiberpipa (Cyber-pipe) I've presented five "light-weight" HTTP servers: Boa, Cherokee, Lighttpd, Nginx and Thttpd, Apache (1.3, 2.2) and LiteSpeed: benchmark with keep-alive enabled and with keep-alive disabled.
Tests were made on my desktop PC (Intel Core2 CPU 6700 @ 2.66GHz) inside VMWare environment (memory: 256 MB, Debian Etch) with apache-benchmark tool, fetching 32 B long static text file.
Compared versions (configuration files will follow soon):
| Apache | 1.3.34 |
| Apache 2 (worker) | 2.2.3 |
| Litespeed | 3.3.4 |
| thttpd | 2.23beta1-5 |
| Nginx | 0.5.35 |
| Lighttpd | 1.4.13 |
| Cherokee | 0.5.5 |
| Boa | 0.94.14rc21-0.2 |