Performance check of CakePHP1.3.11 and CakePHP2beta

CakePHP1.3.11 and CakePHP2beta  released today. I appreciated great work of the CakeTeam.
CakePHP 1.3.11 and 2.0.0-beta released

CakePHP2 introduces lazy loading and some great futures. I’m interested in how CakePHP2 faster than CakePHP1.3, so I compared both performance.
I know CakePHP2 still beta release, maybe it will be faster more and more until the final release.

Measurement Tool
I use the Siege(measurement tool) to measure throughput and the XHPref to measure the number of functaion calls.
Before this test, I tried apache ab tool to measure throughput, but it doesn’t work well. Because it sends the request as HTTP/1.0, Cake2 sends the response as HTTP/1.1.  The ab waits a few seconds for  connection close request.

Server Spec
Server: Dell SC440 Pentium Dual  CPU  E2180  @ 2.00GHz / 2G Memory / SATA HDD
OS: Ubuntu11 64bit
PHP 5.3.5 with APC
Apache 2.2.17

Step
I ran the Siege on same server. Siege option is “siege -b -c 10 -t 3S”, it means concurrency 10, access to the server in 3 seconds.
I know it’s better to run the Siege on another host, but it slightly difficult for me to prepare 2 hosts. This test only compare CakePHP1.3 and Cake2beta on same environment.

SampleApps
I prepare the sample apps of Cake1.3 and Cake2. It’s very simple code made by bake.
Here is the code.
https://github.com/ichikaway/CakePHP-PerformanceCheckSample


Database

I prepare the posts table which has 25,000 records.


Result

Target action is PostController/index which is using pagination.

Cake2beta & Cakephp2.0.2

 Siege:  40 trans/sec
xhpref: 50msec, 11790calls


CakePHP1.3.11

Siege: 29 trans/sec
xhpref: 66msec, 16,931calls

Conclusion
Cake2beta and 2.0.2  are  30% faster than CakePHP1.3.10 and reduces 5000 function calls. Awesome!
I guess performance gap is wider on the apps using some DB relations and models.


Extra
The result of XHpref on CakePHP2 beta. It shows CakeRoute cost is high.  I guess the sample app are using paginator helper, it calls Router class a lot to make the URLs( sort, page number, etc)
The call-graph can be clicked to see original size.

xhpref-list of Cake2 beta

callgraph-cake2beta

5 Responses to “Performance check of CakePHP1.3.11 and CakePHP2beta”

  1. Saleh

    thx for publish results, i love CakePHP 2

  2. ichikaway

    Thanks your comment. I love CakePHP2 , too.

  3. Rodrigo Moyle

    And about CakePHP 2.0 release?

  4. ichikaway

    Cake2beta and CakePHP2.0.2 are same result.
    I added it.

  5. Christian Louboutin

    the dollar version of before. –1922 years ago and today’s dollars $appearance quite a difference, size of 17.8 X7.3 $old CM, and is a X6.6 15.1 CM, and that year and more than $500 of the money amount.

Leave a Reply