This benchmark measures ‘out of the box’ performance of the above 3 frameworks. Framework versions are as follows: Cake 126.96.36.19911-beta, CodeIgniter 1.6.1, Kohana 2.1.1 (latest stable releases available at the time of testing). For this test I used a small static ‘hello world’ page, no dynamic elements other than framework internals. I chose not to use frameworks’ built in caching engines, since using them may actually be more expensive (than not using them) for caching static pages. Each benchmark was run 3 times, with the following parameters: concurrency level 5, number of requests 1000 (ab -c 5 -n 1000); the mean of those benchmarks was then derived. Here are the environment specs:
Linux Mint 4.0 (Ubuntu 7.10) Apache 2.2.4 PHP 5.2.3 eAccelerator 0.9.5.2
Static HTML file served by Apache resulted in 13528 RPS and 11397 RPS with eAccelerator enabled. Finally, here are the benchmarks:
Cake has so many nice features, too bad it’s so incredibly slow - even with eAccelerator enabled, it’s about 30% slower than a plain CI/Kohana installation. Unacceptable. CodeIgniter and Kohana, on the other hand, show great results and come up just about even (330 RPS, 326 RPS respectively) without eAccelerator. With eAccelerator turned on, CodeIgniter is clearly the winner. My wild guess is that eAccelerator does not play so nice with __autoload function, which is widely used in Kohana.